/* ============================================
   GEMA — Landscape Structures
   ============================================ */

:root {
  --ink: #16211B;
  --ink-2: #4A564E;
  --ink-3: #7C877F;
  --paper: #F7F5F1;
  --paper-2: #EFEBE2;
  --white: #FFFFFF;
  --forest: #1B3226;
  --forest-2: #26402F;
  --line: rgba(22, 33, 27, 0.13);
  --line-strong: rgba(22, 33, 27, 0.28);
  --accent: #A84A1B;
  --accent-soft: #C9764A;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1320px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #fff;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
}

.h1 {
  font-size: clamp(2.5rem, 6.6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.038em;
}

.h2 {
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.04;
}

.h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.15;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
}

.muted {
  color: var(--ink-2);
}

.mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(247, 245, 241, 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 2.4vw, 34px);
  align-items: center;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 100px;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  margin-right: -8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- hero ---------- */
.hero {
  padding-top: 132px;
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

.hero-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.hero-eyebrow-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.hero h1 {
  max-width: 17ch;
}

.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.hero-foot {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-top: 30px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), background 0.25s,
    color 0.25s, border-color 0.25s;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.btn .arw {
  transition: transform 0.25s;
}

.btn:hover .arw {
  transform: translateX(3px);
}

.hero-visual {
  margin-top: clamp(30px, 5vw, 54px);
  position: relative;
  border-radius: 6px 6px 0 0;
  padding: clamp(10px, 3vw, 40px) clamp(10px, 3vw, 40px) 0;
}

.hero-visual img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.hero-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

/* ---------- stats ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.stat {
  padding: clamp(22px, 3.4vw, 38px) 0;
  border-right: 1px solid var(--line);
  padding-right: 18px;
}

.stat:last-child {
  border-right: none;
}

.stat-num {
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stat-num small {
  font-size: 0.5em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-left: 3px;
}

.stat-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 10px;
  line-height: 1.4;
}

/* ---------- sections ---------- */
.section {
  padding: clamp(64px, 10vw, 130px) 0;
}

.section-head {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

/* ---------- families ---------- */
.families {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.family {
  display: grid;
  grid-template-columns: 70px 1.1fr 1fr 230px;
  gap: clamp(14px, 3vw, 40px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.35s;
}

.family:hover {
  background: rgba(239, 235, 226, 0.5);
}

.family-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

.family h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
}

.family p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

.family-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: right;
  line-height: 1.6;
}

/* ---------- engineering (dark) ---------- */
.eng {
  background: var(--forest);
  color: #EDE9DF;
  padding: clamp(64px, 10vw, 130px) 0;
  position: relative;
  overflow: hidden;
}

.eng .eyebrow {
  color: rgba(237, 233, 223, 0.5);
}

.eng .lede {
  color: rgba(237, 233, 223, 0.72);
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(237, 233, 223, 0.16);
  margin-top: clamp(34px, 5vw, 60px);
  border: 1px solid rgba(237, 233, 223, 0.16);
}

.eng-card {
  background: var(--forest);
  padding: clamp(22px, 2.8vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.35s;
}

.eng-card:hover {
  background: var(--forest-2);
}

.eng-card .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-soft);
}

.eng-card h4 {
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.eng-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(237, 233, 223, 0.66);
}

.eng-card .spec {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(237, 233, 223, 0.16);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(237, 233, 223, 0.85);
}

/* ---------- products ---------- */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 3vw, 36px);
}

.filter {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: all 0.2s;
}

.filter:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 26px);
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.4s, border-color 0.3s;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -24px rgba(22, 33, 27, 0.4);
}

.card-img {
  aspect-ratio: 4 / 3.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2vw, 26px);
  background: var(--white);
  overflow: hidden;
}

.card-img img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.card:hover .card-img img {
  transform: scale(1.045);
}

.card-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-model {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.card-title {
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.card-cn {
  font-size: 12px;
  color: var(--ink-3);
}

.card-spec {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  line-height: 1.5;
}

.card.is-hidden {
  display: none;
}

/* ---------- catalogue strip ---------- */
.cat-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2vw, 26px);
  margin-top: clamp(14px, 2vw, 26px);
}

.cat-block {
  background: var(--paper-2);
  border-radius: 5px;
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cat-block h4 {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(22, 33, 27, 0.09);
  color: var(--ink-2);
}

.spec-list li span:last-child {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- projects ---------- */
.projects {
  border-top: 1px solid var(--line);
}

.project-row {
  display: grid;
  grid-template-columns: 90px 1.4fr 1fr 1fr;
  gap: clamp(12px, 3vw, 32px);
  padding: clamp(18px, 2.4vw, 26px) 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-left 0.35s, background 0.35s;
}

.project-row:hover {
  padding-left: 12px;
  background: rgba(239, 235, 226, 0.45);
}

.project-row .yr {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}

.project-row .nm {
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.project-row .ct,
.project-row .ty {
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ---------- factory ---------- */
.factory {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
}

.factory-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.f-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.f-item:first-child {
  border-top: 1px solid var(--line);
}

.f-item .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}

.f-item .v {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.f-item .v strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- contact ---------- */
.contact {
  background: var(--forest);
  color: #EDE9DF;
  padding: clamp(64px, 9vw, 120px) 0;
}

.contact .eyebrow {
  color: rgba(237, 233, 223, 0.5);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  margin-top: clamp(28px, 4vw, 48px);
}

.contact h2 {
  color: #EDE9DF;
}

.c-lines {
  display: grid;
  gap: 26px;
  margin-top: 34px;
}

.c-line .lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(237, 233, 223, 0.45);
  margin-bottom: 6px;
}

.c-line .val {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(237, 233, 223, 0.92);
}

.c-line a:hover {
  color: var(--accent-soft);
}

form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(237, 233, 223, 0.5);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(237, 233, 223, 0.06);
  border: 1px solid rgba(237, 233, 223, 0.2);
  border-radius: 4px;
  padding: 12px 13px;
  color: #EDE9DF;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.field select option {
  color: #16211B;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(237, 233, 223, 0.55);
  background: rgba(237, 233, 223, 0.1);
}

.field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.submit {
  margin-top: 6px;
  background: #EDE9DF;
  color: var(--forest);
  border: none;
  border-radius: 100px;
  padding: 14px 30px;
  font-size: 14px;
  font-weight: 500;
  justify-self: start;
  transition: background 0.25s, transform 0.25s;
}

.submit:hover {
  background: var(--accent-soft);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--forest);
  color: rgba(237, 233, 223, 0.55);
  border-top: 1px solid rgba(237, 233, 223, 0.14);
  padding: 30px 0;
  font-size: 12.5px;
}

.footer-in {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-in a:hover {
  color: #EDE9DF;
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat:nth-child(3) {
    border-right: none;
  }
  .stat:nth-child(1),
  .stat:nth-child(2),
  .stat:nth-child(3) {
    border-bottom: 1px solid var(--line);
  }
  .eng-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .family {
    grid-template-columns: 46px 1fr 210px;
  }
  .family p {
    grid-column: 2 / 3;
  }
  .family-meta {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-row {
    grid-template-columns: 70px 1.2fr 1fr;
  }
  .project-row .ty {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .brand-sub {
    display: none;
  }
  .hero {
    padding-top: 108px;
  }
  .hero-foot,
  .section-head,
  .factory,
  .contact-grid,
  .cat-strip {
    grid-template-columns: 1fr;
  }
  .hero-foot {
    gap: 20px;
  }
  .hero-actions {
    margin-top: 4px;
  }
  .family {
    grid-template-columns: 34px 1fr;
    gap: 10px 14px;
    align-items: start;
  }
  .family p {
    grid-column: 2 / 3;
  }
  .family-meta {
    grid-column: 2 / 3;
    grid-row: auto;
    text-align: left;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat {
    border-bottom: 1px solid var(--line);
  }
  .stat:nth-child(2n) {
    border-right: none;
  }
  .eng-grid {
    grid-template-columns: 1fr;
  }
  .project-row {
    grid-template-columns: 52px 1fr;
    gap: 6px 12px;
  }
  .project-row .ct {
    grid-column: 2 / 3;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .f-item {
    grid-template-columns: 68px 1fr;
    gap: 12px;
  }
}

/* ---------- mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 68px 0 auto 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 18px var(--pad) 26px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 99;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
}

.mobile-menu.is-open {
  display: flex;
  transform: none;
  opacity: 1;
}

.mobile-menu a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.mobile-menu a:last-child {
  border-bottom: none;
  margin-top: 10px;
  font-weight: 500;
  color: var(--accent);
}
