/* =========================================================================
   TAVAI TERASEI — Design System
   ========================================================================= */

:root {
  /* Color tokens — DARK ARCHITECTURAL PALETTE (default theme) */
  --bg:           #0a0a0a;
  --bg-elev:      #111113;
  --bg-elev-2:    #17181b;
  --line:         #23252a;
  --line-soft:    rgba(255, 255, 255, 0.08);
  --text:         #f4f4f2;
  --text-dim:     #b8b9bc;
  --text-faint:   #86878c;
  --accent:       #b07842;       /* rich teak wood — warm, saturated */
  --accent-hover: #c48a52;
  --accent-soft:  rgba(176, 120, 66, 0.14);
  --accent-ink:   #1a0f05;       /* dark text on wood button */
  --accent-2:     #6b9056;       /* forest green — deeper, richer */
  --accent-2-hover: #7da568;
  --accent-2-soft: rgba(107, 144, 86, 0.14);

  /* Scrim colors — used for image overlays and nav backdrop */
  --scrim-rgb:    10, 10, 10;       /* matches --bg */
  --on-hero-rgb:  244, 244, 242;    /* matches --text */

  /* Type scale */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.375rem;
  --fs-2xl:  1.875rem;
  --fs-3xl:  2.5rem;
  --fs-4xl:  3.5rem;
  --fs-5xl:  5rem;
  --fs-6xl:  6.5rem;

  /* Spacing / layout */
  --max-w:    1280px;
  --gutter:   1.5rem;
  --radius:   2px;
  --radius-lg: 6px;

  /* Motion */
  --ease:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur:      420ms;
}

/* ========================================================================
   LIGHT THEME — applied via <html data-theme="light">
   To make light the default, swap the values in :root above instead.
   ======================================================================== */
[data-theme="light"] {
  --bg:           #faf7f0;
  --bg-elev:      #ffffff;
  --bg-elev-2:    #f1ece1;
  --line:         #e2ddd2;
  --line-soft:    rgba(20, 20, 15, 0.10);
  --text:         #14140f;
  --text-dim:     #5a5955;
  --text-faint:   #8e8c85;
  --accent:       #6b3d12;        /* deep walnut wood — readable on cream */
  --accent-hover: #4f2c0c;
  --accent-soft:  rgba(107, 61, 18, 0.12);
  --accent-ink:   #ffffff;        /* white text on dark wood button */
  --accent-2:     #3e5e2c;        /* dark forest green — readable on cream */
  --accent-2-hover: #2d4a1e;
  --accent-2-soft: rgba(62, 94, 44, 0.12);
  --scrim-rgb:    250, 247, 240;
  --on-hero-rgb:  20, 20, 15;
}
[data-theme="light"] .mega { box-shadow: 0 30px 60px rgba(20, 20, 15, 0.15); }

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

img, picture, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }

/* ========== Typography ========== */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent-2);
}

.display {
  font-size: clamp(2.5rem, 7vw, var(--fs-6xl));
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.display .faint { color: var(--text-faint); font-weight: 300; }

.h1 { font-size: clamp(2rem, 5vw, var(--fs-4xl)); }
.h2 { font-size: clamp(1.75rem, 4vw, var(--fs-3xl)); }
.h3 { font-size: var(--fs-xl); }

.lead {
  font-size: var(--fs-lg);
  color: var(--text-dim);
  max-width: 58ch;
  line-height: 1.55;
}

p { margin: 0 0 1rem; color: var(--text-dim); }
p:last-child { margin-bottom: 0; }

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(4rem, 10vw, 8rem) 0;
}
.section--tight { padding: clamp(3rem, 6vw, 5rem) 0; }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.95rem 1.65rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--text); background: rgba(var(--on-hero-rgb),0.04); }

.btn svg { width: 14px; height: 14px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.25rem;
  transition: all var(--dur) var(--ease);
}
.link-arrow:hover { color: var(--accent); border-color: var(--accent); gap: 0.75rem; }

/* ========== Navigation ========== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(var(--scrim-rgb), 0.7);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: all var(--dur) var(--ease);
}
.site-nav.scrolled {
  padding: 0.85rem 0;
  background: rgba(var(--scrim-rgb), 0.88);
  border-bottom-color: var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  transition: color var(--dur) var(--ease);
}
.brand:hover { color: var(--accent); }
.brand-logo {
  display: inline-flex;
  align-items: center;
}
.brand-logo svg {
  width: auto;
  height: 38px;
  display: block;
  color: currentColor;
}
.brand--footer .brand-logo svg { height: 44px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav-menu a {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  position: relative;
  transition: color var(--dur) var(--ease);
}
.nav-menu a:hover,
.nav-menu a.active { color: var(--text); }
.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

.nav-item-dropdown { position: relative; }
.nav-item-dropdown > button {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
}
.nav-item-dropdown > button:hover { color: var(--text); }
.nav-item-dropdown > button svg { width: 10px; height: 10px; transition: transform var(--dur) var(--ease); }
.nav-item-dropdown:hover > button svg { transform: rotate(180deg); }
/* Invisible bridge so hover survives when moving from the button to the mega panel */
.nav-item-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, 90vw);
  height: 2rem;
  pointer-events: none;
}
.nav-item-dropdown:hover::before,
.nav-item-dropdown:focus-within::before { pointer-events: auto; }

.mega {
  position: absolute;
  top: calc(100% + 1.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(780px, 90vw);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur) var(--ease);
  box-shadow: 0 30px 60px rgba(20, 20, 15, 0.15);
}
.nav-item-dropdown:hover .mega,
.nav-item-dropdown:focus-within .mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-group h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  margin-bottom: 1rem;
  font-weight: 500;
}
.mega-group ul { display: flex; flex-direction: column; gap: 0.625rem; }
.mega-group a {
  color: var(--text);
  font-size: var(--fs-sm);
  padding: 0.25rem 0;
  display: inline-block;
  transition: color var(--dur) var(--ease);
}
.mega-group a:hover { color: var(--accent); }

.nav-cta { display: flex; align-items: center; gap: 1.25rem; }
.nav-phone {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}
.nav-phone:hover { color: var(--text); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ========== Hero (split layout) ========== */
.hero {
  padding: clamp(7rem, 12vw, 10rem) 0 clamp(3rem, 6vw, 5rem);
  background: var(--bg);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-copy .eyebrow { margin-bottom: 1.75rem; }
.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 2rem;
  color: var(--text);
}
.hero .hero-accent {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero p.lead {
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  color: var(--text-dim);
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 0 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-figure {
  position: relative;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-figure figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.75rem 2rem;
  background: linear-gradient(transparent, rgba(20, 20, 15, 0.85));
  color: #f4f4f2;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.hero-figure-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #e8c590;
}
.hero-figure-name {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: #f4f4f2;
  letter-spacing: -0.01em;
}

/* Compact page hero (for inner pages) */
.page-hero {
  position: relative;
  min-height: 68vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8rem 0 5rem;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line-soft);
}
.page-hero-media {
  position: absolute; inset: 0; z-index: -1;
}
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--scrim-rgb),0.3) 0%, rgba(var(--scrim-rgb),0.15) 30%, rgba(var(--scrim-rgb),0.75) 70%, rgba(var(--scrim-rgb),1) 100%),
    linear-gradient(90deg, rgba(var(--scrim-rgb),0.55) 0%, rgba(var(--scrim-rgb),0) 55%);
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 4rem); margin: 1rem 0 1.25rem; color: var(--text); line-height: 1.15; }
.page-hero h1 .hl,
.page-hero h1 span.hl {
  display: inline;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.05em 0.35em;
  font-weight: 400;
  font-style: normal;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  text-shadow: none;
}
.hl { text-shadow: none !important; }
.page-hero p.lead { max-width: 62ch; color: var(--text-dim); }
.page-hero p.lead .hl {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.15em 0.4em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.page-hero .eyebrow, .page-hero h1, .page-hero p.lead, .page-hero .breadcrumb { text-shadow: 0 1px 24px rgba(var(--scrim-rgb), 0.9); }

.breadcrumb {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  gap: 0.75rem;
}
.breadcrumb a { color: var(--text-faint); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { color: var(--accent-2); }

/* ========== Stats strip ========== */
.stats {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 3rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.stat-num {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.stat-num sup { color: var(--accent-2); font-size: 0.5em; font-weight: 400; vertical-align: top; }
.stat-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  margin-top: 0.75rem;
}

/* ========== Section header ========== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  flex-wrap: wrap;
}
.section-header-text { max-width: 640px; }
.section-header h2 { margin-top: 1rem; margin-bottom: 1rem; }

/* ========== Product cards ========== */
.family-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.family-card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  isolation: isolate;
  background: var(--bg-elev);
}
.family-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 800ms var(--ease);
}
.family-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10,10,10,0.2), rgba(10,10,10,0.95));
  transition: background 500ms var(--ease);
}
.family-card:hover img { transform: scale(1.05); }
.family-card:hover::after { background: linear-gradient(180deg, rgba(10,10,10,0.1), rgba(10,10,10,0.8)); }

.family-card-content { color: #f4f4f2; }
.family-card-num {
  font-size: var(--fs-xs);
  color: #e8c590;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}
.family-card h3 {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: #f4f4f2;
}
.family-card p { color: rgba(244, 244, 242, 0.75); font-size: var(--fs-sm); margin-bottom: 1.25rem; }
.family-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: #e8c590;
  font-weight: 500;
}

/* Product tile grid (catalog) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.product-grid--2 { grid-template-columns: repeat(2, 1fr); }
.product-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-elev);
  isolation: isolate;
  transition: transform var(--dur) var(--ease);
}
.product-tile.product-tile--wide { grid-column: span 3; aspect-ratio: 21 / 9; }
.product-tile.product-tile--span-2 { grid-column: span 2; aspect-ratio: auto; }
.product-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 800ms var(--ease);
}
.product-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,10,10,0.95));
  z-index: -1;
}
.product-tile:hover img { transform: scale(1.08); }

.product-tile-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1.5rem;
  color: #f4f4f2;
}
.product-tile h3 {
  font-size: var(--fs-lg);
  margin-bottom: 0.35rem;
  letter-spacing: -0.015em;
  color: #f4f4f2;
}
.product-tile span {
  font-size: var(--fs-xs);
  color: rgba(244, 244, 242, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ========== Factory feature ========== */
.factory-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.factory-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 560px;
  overflow: hidden;
}
.factory-images img {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  object-fit: cover;
}
.factory-text h2 { margin-bottom: 1.5rem; }
.factory-specs {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.factory-spec { border-top: 1px solid var(--line-soft); padding-top: 1rem; }
.factory-spec strong { display: block; font-size: var(--fs-2xl); font-weight: 500; letter-spacing: -0.02em; }
.factory-spec span { font-size: var(--fs-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.14em; }

/* ========== Process ========== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.process-step {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  position: relative;
}
.process-step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 48px;
  height: 1px;
  background: var(--accent-2);
}
.process-num {
  font-size: var(--fs-xs);
  color: var(--accent-2);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}
.process-step h3 {
  font-size: var(--fs-xl);
  margin-bottom: 0.75rem;
}
.process-step p { font-size: var(--fs-sm); color: var(--text-dim); }

/* ========== Gallery ========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-elev);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item--tall { aspect-ratio: 3 / 4; grid-row: span 2; }

/* Mini gallery (product page project photos) */
.gallery-grid--mini { grid-template-columns: repeat(3, 1fr); gap: 0.625rem; }
.gallery-grid--mini .gallery-item { aspect-ratio: 4 / 3; }

/* Project card (projekti.html named projects) */
.project-card {
  border-top: 1px solid var(--line-soft);
  padding-top: 3rem;
  margin-bottom: 5rem;
}
.project-card:last-child { margin-bottom: 0; }
.project-card-header {
  margin-bottom: 2rem;
}
.project-card-header h2 {
  font-size: var(--fs-3xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 0.75rem;
}
.project-card-header p { font-size: var(--fs-sm); color: var(--text-dim); max-width: 52ch; }
.project-card-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}
.project-card-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.project-card-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-card .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 0.625rem; }
.project-card .gallery-item { aspect-ratio: 4 / 3; }

/* ========== Why-us ========== */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.reason {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.reason-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1.5rem;
}
.reason-icon svg { width: 18px; height: 18px; }
.reason h3 { font-size: var(--fs-lg); margin-bottom: 0.5rem; }
.reason p { font-size: var(--fs-sm); }

/* ========== CTA banner ========== */
.cta-banner {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at top, var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { margin: 1rem auto 1.5rem; max-width: 20ch; }
.cta-banner p { max-width: 52ch; margin: 0 auto 2.5rem; }
.cta-banner .hero-actions { justify-content: center; }

/* ========== Footer ========== */
.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--line-soft);
  padding: 5rem 0 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-brand p { max-width: 36ch; margin-top: 1.5rem; font-size: var(--fs-sm); }
.footer-col h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a { font-size: var(--fs-sm); color: var(--text-dim); transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  letter-spacing: 0.08em;
}
.social-links { display: flex; gap: 1rem; }
.social-links a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: all var(--dur) var(--ease);
}
.social-links a svg { width: 14px; height: 14px; }
.social-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ========== Product page ========== */
.product-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.product-intro-text h2 { margin-bottom: 1.5rem; }
.product-intro-media { aspect-ratio: 4 / 5; overflow: hidden; }
.product-intro-media img { width: 100%; height: 100%; object-fit: cover; }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.benefit {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.benefit-num {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  letter-spacing: 0.2em;
  margin-bottom: 1.5rem;
}
.benefit h3 { font-size: var(--fs-lg); margin-bottom: 0.625rem; }
.benefit p { font-size: var(--fs-sm); }

.specs-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 4rem;
  row-gap: 0;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
}
.spec-row strong { color: var(--text); font-weight: 500; }
.spec-row span { color: var(--text-dim); text-align: right; }

.variants-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.variant {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 2rem;
}
.variant-tag {
  font-size: var(--fs-xs);
  color: var(--accent-2);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}
.variant h3 { margin-bottom: 0.75rem; }
.variant p { font-size: var(--fs-sm); }

/* ========== Spec media grid ========== */
.spec-media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.spec-media-grid img,
.spec-media-grid video {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* ========== Contact page ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.contact-info-list { display: flex; flex-direction: column; gap: 2.5rem; }
.contact-info-item h4 {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.contact-info-item p, .contact-info-item a {
  font-size: var(--fs-xl);
  color: var(--text);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.contact-info-item a:hover { color: var(--accent); }

.form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: 0.5rem; }
.form-field label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}
.form-field input,
.form-field textarea,
.form-field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0;
  font: inherit;
  font-size: var(--fs-base);
  color: var(--text);
  transition: border-color var(--dur) var(--ease);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.form .btn { align-self: flex-start; margin-top: 1rem; }

/* ========== Reveal animation ========== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .hero-figure { max-width: 560px; aspect-ratio: 4 / 3; }
  .factory-feature,
  .product-intro,
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .factory-images { height: 420px; }
  .family-grid,
  .product-grid,
  .gallery-grid,
  .reasons-grid,
  .benefits-grid,
  .process-grid,
  .variants-grid { grid-template-columns: repeat(2, 1fr); }
  .product-tile.product-tile--wide { grid-column: span 2; aspect-ratio: 16 / 9; }
  .product-tile.product-tile--span-2 { grid-column: span 2; aspect-ratio: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .specs-list { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav-menu,
  .nav-phone,
  .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav.open .nav-menu {
    display: flex;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem var(--gutter);
    gap: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 72px);
  }
  .site-nav.open .mega {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    width: 100%;
    grid-template-columns: 1fr;
    padding: 1rem 0 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    gap: 1.25rem;
  }
}

@media (max-width: 720px) {
  :root { --gutter: 1.25rem; }
  .family-grid,
  .product-grid,
  .gallery-grid,
  .reasons-grid,
  .benefits-grid,
  .process-grid,
  .variants-grid,
  .footer-grid,
  .stats-grid { grid-template-columns: 1fr; }
  .product-tile.product-tile--wide,
  .product-tile.product-tile--span-2 { grid-column: auto; aspect-ratio: 1 / 1; }
  .gallery-item--tall { grid-row: auto; aspect-ratio: 4 / 3; }
  .gallery-grid--mini { grid-template-columns: repeat(2, 1fr); }
  .spec-media-grid { grid-template-columns: repeat(2, 1fr); }
  .spec-media-grid img, .spec-media-grid video { height: 160px; }
  .project-card .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 7rem 0 3rem; }
  .hero-figure { aspect-ratio: 4 / 3; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .factory-images { height: 320px; }
}

/* Map embed — dark mode invert */
.map-embed { filter: invert(0.9) hue-rotate(180deg) saturate(0.3) brightness(0.85); }
[data-theme="light"] .map-embed { filter: none; }

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

/* ========================================================================
   DEV: THEME TOGGLE — REMOVE BEFORE LAUNCH
   See /assets/js/partials.js for the matching JS block.
   To remove: delete this block + the matching block in partials.js + the
   inline <script> tag in <head> of every HTML page.
   ======================================================================== */
.dev-theme-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.dev-theme-toggle:hover { background: var(--accent-hover); transform: translateY(-2px); }
.dev-theme-toggle::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
[data-theme="light"] .dev-theme-toggle::before { box-shadow: inset -3px -2px 0 0 var(--accent); }
/* ========== END DEV THEME TOGGLE ========================================= */
