/* ═══════════════════════ MERIDIAN — design system ═══════════════════════ */
:root {
  --bg: #0b0c0e;
  --bg-2: #121417;
  --ink: #f2f0ea;
  --ink-dim: #9aa0a6;
  --accent: #ff5c1a;
  --line: rgba(242, 240, 234, 0.12);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.accent { color: var(--accent); font-style: normal; }
.container { width: min(1440px, 100%); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(90px, 12vw, 180px); position: relative; }

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

/* ═══════════════ Preloader ═══════════════ */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.preloader__inner {
  width: min(1440px, 100%); padding-inline: var(--pad);
  display: flex; align-items: flex-end; justify-content: space-between;
}
.preloader__logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 56px); letter-spacing: -0.02em;
}
.preloader__count {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(60px, 12vw, 180px); line-height: 0.9;
  letter-spacing: -0.04em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.preloader__bar {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: var(--line);
}
.preloader__bar span {
  display: block; height: 100%; width: 0%;
  background: var(--accent);
}

/* ═══════════════ Nav ═══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 102;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(11, 12, 14, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; letter-spacing: -0.02em; z-index: 102;
}
.nav__links { display: flex; gap: 34px; }
.nav__links a {
  font-size: 14px; font-weight: 500; color: var(--ink-dim);
  position: relative; transition: color 0.3s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; z-index: 102;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.nav__burger span {
  display: block; width: 26px; height: 2px; background: var(--ink);
  transition: transform 0.35s, opacity 0.35s;
}
.nav__burger.is-open span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 101;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}
.menu.is-open { clip-path: inset(0 0 0% 0); }
.menu__links { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.menu__links a {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(36px, 9vw, 64px); letter-spacing: -0.03em;
  transition: color 0.3s;
}
.menu__links a:hover { color: var(--accent); }

/* ═══════════════ Buttons ═══════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 13px 24px; border-radius: 100px;
  border: 1px solid var(--line);
  transition: background 0.35s, color 0.35s, border-color 0.35s, transform 0.35s;
  cursor: pointer; white-space: nowrap;
}
.btn__arrow { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn--nav { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--nav:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 15px; padding: 16px 30px; }
.btn--solid:hover { background: #ff7a42; border-color: #ff7a42; }

/* ═══════════════ Hero ═══════════════ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__video {
  width: 100%; height: 100%; object-fit: cover;
  transform-origin: center;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,12,14,0.55) 0%, rgba(11,12,14,0.15) 40%, rgba(11,12,14,0.88) 100%);
}
.hero__content {
  position: relative; z-index: 1;
  width: min(1440px, 100%); margin-inline: auto;
  padding: 0 var(--pad) clamp(48px, 7vh, 90px);
}
.hero__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-dim);
  margin-bottom: clamp(14px, 2vh, 26px);
}
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(56px, 11vw, 176px);
  line-height: 0.94; letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: clamp(28px, 4vh, 56px);
}
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: inline-block; will-change: transform; }
.hero__bottom {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: clamp(20px, 3vh, 32px);
}
.hero__sub { max-width: 420px; color: var(--ink-dim); font-size: 15px; }
.hero__stats { display: flex; gap: clamp(28px, 4vw, 64px); }
.hero__stat strong {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 3vw, 44px); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.hero__stat span { font-size: 12.5px; color: var(--ink-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.hero__scrollhint {
  position: absolute; right: var(--pad); top: 50%; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-dim);
  writing-mode: vertical-rl;
}
.hero__scrollhint span {
  width: 1px; height: 56px; background: var(--line); position: relative; overflow: hidden;
}
.hero__scrollhint span::after {
  content: ""; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%; background: var(--accent);
  animation: scrollhint 1.8s cubic-bezier(0.76, 0, 0.24, 1) infinite;
}
@keyframes scrollhint { to { top: 110%; } }

/* ═══════════════ Marquee ═══════════════ */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  padding-block: 22px; background: var(--bg);
}
.marquee__track {
  display: flex; align-items: center; gap: 48px;
  width: max-content; will-change: transform;
}
.marquee__track span {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(18px, 2.2vw, 30px); letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-dim); white-space: nowrap;
}
.marquee__track i { color: var(--accent); font-size: 10px; font-style: normal; }

/* ═══════════════ Section furniture ═══════════════ */
.section__label {
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: clamp(20px, 3vw, 40px);
}
.section__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px, 6.5vw, 104px);
  line-height: 1.0; letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-bottom: clamp(24px, 3vw, 48px);
}

/* split/reveal primitives (JS enhances these) */
.reveal-line { overflow: hidden; }
.reveal-line > span { display: inline-block; }
.split-lines .sl-line { display: block; overflow: hidden; }
.split-lines .sl-line > span { display: block; will-change: transform; }

.img-reveal { overflow: hidden; border-radius: var(--radius); }
.img-reveal img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }

/* ═══════════════ Intro ═══════════════ */
.intro__text {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(26px, 3.6vw, 56px);
  line-height: 1.18; letter-spacing: -0.02em;
  max-width: 22ch;
  margin-bottom: clamp(48px, 7vw, 110px);
}
.intro__text .word { opacity: 0.14; }
.intro__row {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(32px, 5vw, 90px); align-items: end;
}
.intro__img { aspect-ratio: 4 / 5; max-height: 640px; }
.intro__aside { display: flex; flex-direction: column; gap: 32px; padding-bottom: 8px; }
.intro__aside p { color: var(--ink-dim); font-size: 17px; max-width: 44ch; }
.intro__aside .btn { align-self: flex-start; }

/* ═══════════════ Services ═══════════════ */
.services { padding-bottom: 0; }
.services__list { margin-top: clamp(20px, 3vw, 50px); border-top: 1px solid var(--line); }
.service {
  position: relative; border-bottom: 1px solid var(--line);
  cursor: pointer; overflow: hidden;
}
.service__inner {
  display: grid;
  grid-template-columns: 80px 1fr 1.1fr 60px;
  align-items: center; gap: clamp(16px, 3vw, 48px);
  padding-block: clamp(28px, 4vw, 56px);
  position: relative; z-index: 1;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.service__index {
  font-family: var(--font-display); font-weight: 500;
  color: var(--ink-dim); font-size: 15px;
  transition: color 0.4s;
}
.service__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 64px); letter-spacing: -0.03em;
  text-transform: uppercase; line-height: 1;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.service__desc { color: var(--ink-dim); font-size: 15px; max-width: 46ch; }
.service__arrow {
  font-size: 28px; justify-self: end;
  transform: translateX(-12px) rotate(45deg); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s;
}
.service__preview {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0; transition: opacity 0.5s;
  pointer-events: none;
}
.service__preview::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11,12,14,0.92) 20%, rgba(11,12,14,0.55) 100%);
}
.service__preview img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.service:hover .service__preview { opacity: 1; }
.service:hover .service__preview img { transform: scale(1); }
.service:hover .service__name { transform: translateX(14px); }
.service:hover .service__index { color: var(--accent); }
.service:hover .service__arrow { transform: translateX(0) rotate(0deg); opacity: 1; }

/* ═══════════════ Horizontal process ═══════════════ */
.process { position: relative; }
.process__pin {
  min-height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(70px, 8vh, 110px);
}
.process__head { margin-bottom: clamp(36px, 6vh, 70px); }
.process__head .section__title { margin-bottom: 0; }
.process__track {
  display: flex; gap: clamp(20px, 2.5vw, 40px);
  padding-inline: var(--pad);
  width: max-content; will-change: transform;
}
.pcard {
  position: relative;
  width: clamp(300px, 34vw, 480px);
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  padding: clamp(20px, 2vw, 30px);
  display: flex; flex-direction: column; gap: 14px;
}
.pcard img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: calc(var(--radius) - 6px);
  filter: saturate(0.9);
}
.pcard__num {
  font-family: var(--font-display); font-weight: 600;
  color: var(--accent); font-size: 15px;
}
.pcard h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 2vw, 28px); letter-spacing: -0.02em;
}
.pcard p { color: var(--ink-dim); font-size: 14.5px; }

/* ═══════════════ Stats ═══════════════ */
.stats {
  position: relative; overflow: hidden;
  padding-block: clamp(110px, 16vw, 220px);
}
.stats__bg { position: absolute; inset: -18% 0; z-index: 0; }
.stats__bg img { width: 100%; height: 100%; object-fit: cover; }
.stats__bg::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(11, 12, 14, 0.78);
}
.stats__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(28px, 4vw, 60px);
}
.stat { border-left: 2px solid var(--accent); padding-left: clamp(16px, 1.6vw, 26px); }
.stat strong {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(38px, 5vw, 80px); letter-spacing: -0.03em; line-height: 1;
  margin-bottom: 10px; font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--ink-dim); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ═══════════════ Network ═══════════════ */
.network { overflow: hidden; }
.network__bg { position: absolute; inset: -15% 0; z-index: 0; opacity: 0.45; }
.network__bg img { width: 100%; height: 100%; object-fit: cover; }
.network::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(11,12,14,0.35) 45%, var(--bg) 100%);
}
.network__content { position: relative; z-index: 1; }
.network__sub { max-width: 52ch; color: var(--ink-dim); font-size: 17px; }
.network__routes { margin-top: clamp(40px, 5vw, 80px); }
.network__routes svg { width: 100%; height: auto; overflow: visible; }
.route {
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-linecap: round; opacity: 0.9;
}
.route--2 { stroke: var(--ink); opacity: 0.35; }
.route--3 { stroke: var(--accent); opacity: 0.5; }
.node { fill: var(--ink); }

/* ═══════════════ Sustainability ═══════════════ */
.sustain__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 110px); align-items: center;
}
.sustain__img { aspect-ratio: 4 / 5; max-height: 700px; }
.sustain__copy p { color: var(--ink-dim); font-size: 17px; max-width: 46ch; }
.sustain__list { list-style: none; margin-top: clamp(28px, 3vw, 44px); }
.sustain__list li {
  display: flex; align-items: baseline; gap: 18px;
  padding-block: 18px; border-top: 1px solid var(--line);
  color: var(--ink-dim); font-size: 15px;
}
.sustain__list strong {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(22px, 2.4vw, 34px); color: var(--ink);
  letter-spacing: -0.02em; min-width: 120px;
}

/* ═══════════════ Gallery ═══════════════ */
.gallery { padding-bottom: clamp(60px, 8vw, 120px); }
.gallery__grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 32px);
}
.gallery__item { border-radius: var(--radius); }
.gallery__item:nth-child(1) { grid-column: 1 / 6; aspect-ratio: 3 / 4; margin-top: clamp(40px, 6vw, 110px); }
.gallery__item:nth-child(2) { grid-column: 6 / 13; aspect-ratio: 16 / 10; }
.gallery__item:nth-child(3) { grid-column: 1 / 8; aspect-ratio: 16 / 10; }
.gallery__item:nth-child(4) { grid-column: 8 / 13; aspect-ratio: 3 / 4; margin-top: clamp(-60px, -4vw, -20px); }

/* ═══════════════ CTA ═══════════════ */
.cta {
  background: var(--accent); color: #14100d;
  padding-block: clamp(100px, 14vw, 200px);
  position: relative; overflow: hidden;
}
.cta__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(64px, 13vw, 210px);
  line-height: 0.92; letter-spacing: -0.045em;
  text-transform: uppercase;
  margin-bottom: clamp(24px, 3vw, 44px);
}
.cta__title em { font-style: normal; color: #14100d; }
.cta__sub { font-size: clamp(16px, 1.6vw, 20px); font-weight: 500; margin-bottom: 40px; }
.cta__form { display: flex; gap: 14px; max-width: 560px; flex-wrap: wrap; }
.cta__form input {
  flex: 1; min-width: 240px;
  background: rgba(20, 16, 13, 0.1);
  border: 1px solid rgba(20, 16, 13, 0.35);
  border-radius: 100px; padding: 16px 26px;
  font-family: var(--font-body); font-size: 15px; color: #14100d;
  outline: none; transition: border-color 0.3s, background 0.3s;
}
.cta__form input::placeholder { color: rgba(20, 16, 13, 0.55); }
.cta__form input:focus { border-color: #14100d; background: rgba(20, 16, 13, 0.16); }
.cta .btn--solid { background: #14100d; border-color: #14100d; color: var(--ink); }
.cta .btn--solid:hover { background: #000; }

/* ═══════════════ Footer ═══════════════ */
.footer { background: var(--bg); border-top: 1px solid var(--line); overflow: hidden; }
.footer__top {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 40px; padding-block: clamp(56px, 7vw, 100px);
}
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__col h4 {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim);
  margin-bottom: 8px;
}
.footer__col a, .footer__col span { font-size: 15px; color: var(--ink); opacity: 0.85; transition: color 0.3s, opacity 0.3s; }
.footer__col a:hover { color: var(--accent); opacity: 1; }
.footer__wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(64px, 13.5vw, 232px);
  line-height: 0.8; letter-spacing: -0.04em;
  text-align: center; white-space: nowrap;
  color: var(--ink); opacity: 0.95;
  transform: translateY(0.12em);
  user-select: none;
}
.footer__legal {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-block: 26px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-dim);
}

/* ═══════════════ Responsive ═══════════════ */
@media (max-width: 900px) {
  .nav__links, .btn--nav { display: none; }
  .nav__burger { display: flex; }
  .hero__stats { gap: 24px; }
  .hero__scrollhint { display: none; }
  .intro__row, .sustain__grid { grid-template-columns: 1fr; }
  .service__inner { grid-template-columns: 48px 1fr 40px; grid-template-rows: auto auto; row-gap: 12px; }
  .service__index { grid-column: 1; grid-row: 1; }
  .service__name { grid-column: 2; grid-row: 1; }
  .service__desc { grid-column: 2 / 4; grid-row: 2; }
  .service__arrow { grid-column: 3; grid-row: 1; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__item:nth-child(n) { grid-column: 1 / 13; margin-top: 0; aspect-ratio: 16 / 11; }
  .footer__top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
