/* ==========================================================================
   NZ beauty — base: tokens, reset, typography, buttons, header, hero
   ========================================================================== */

:root {
  /* Light — ivory, parchment, bottle green, brass, oxblood */
  --bg: #F3EEE5;
  --bg-alt: #EBE4D7;
  --surface: #FAF7F1;
  --surface-2: #F1EADF;
  --ink: #1D1A16;
  --ink-soft: #4A433B;
  --muted: #776D61;
  --line: rgba(29, 26, 22, .12);
  --line-strong: rgba(29, 26, 22, .26);

  --accent: #8A6A3A;          /* brass, text-safe */
  --accent-soft: #B89968;     /* brass, decorative */
  --wine: #6E2B30;
  --wine-ink: #F6EFE4;

  --btn-bg: #22392E;
  --btn-bg-hover: #182A21;
  --btn-ink: #F6F1E7;

  --deep: #1F3129;
  --deep-2: #243A30;
  --deep-ink: #EFE7D8;
  --deep-muted: rgba(239, 231, 216, .66);
  --deep-line: rgba(239, 231, 216, .16);

  --shadow-lg: 0 40px 80px -40px rgba(45, 34, 20, .38);
  --shadow-md: 0 18px 40px -24px rgba(45, 34, 20, .30);
  --grain-opacity: .045;
  --map-filter: grayscale(1) sepia(.28) contrast(.92) brightness(1.04);

  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-script: "Great Vibes", "Snell Roundhand", cursive;

  --container: 1320px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(88px, 11vw, 168px);
  --header-h: 84px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  /* Dark — espresso, green-black, warm ivory, brass */
  --bg: #12110E;
  --bg-alt: #181612;
  --surface: #1C1A16;
  --surface-2: #232019;
  --ink: #ECE4D6;
  --ink-soft: #CBC1B1;
  --muted: #999082;
  --line: rgba(236, 228, 214, .10);
  --line-strong: rgba(236, 228, 214, .24);

  --accent: #CDB083;
  --accent-soft: #B39767;
  --wine: #8E4449;
  --wine-ink: #F6EFE4;

  --btn-bg: #CBAE80;
  --btn-bg-hover: #DAC196;
  --btn-ink: #15130F;

  --deep: #17201B;
  --deep-2: #1C2721;
  --deep-ink: #ECE4D6;
  --deep-muted: rgba(236, 228, 214, .62);
  --deep-line: rgba(236, 228, 214, .12);

  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, .7);
  --shadow-md: 0 18px 40px -24px rgba(0, 0, 0, .6);
  --grain-opacity: .06;
  --map-filter: grayscale(1) invert(.9) sepia(.22) contrast(.88) brightness(.92);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
body.is-locked { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.theme-img--dark { display: none; }
:root[data-theme="dark"] .theme-img--light { display: none; }
:root[data-theme="dark"] .theme-img--dark { display: block; }
::selection { background: var(--accent-soft); color: #15130F; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 300;
  padding: 10px 18px; background: var(--btn-bg); color: var(--btn-ink);
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }

/* ---------- Typography ---------- */
.display, .section-title, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.02;
}
.display em, .section-title em { font-style: italic; color: var(--accent); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .7; }

.section-head { max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: .7; }
.section-title { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.6rem); margin-top: 22px; }
.section-lead { margin-top: 22px; font-size: 1.06rem; color: var(--ink-soft); max-width: 58ch; }
.section-head--center .section-lead { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 56px; padding: 0 32px;
  font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1;
  border-radius: var(--radius); white-space: nowrap;
  transition: color .45s var(--ease), background-color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .45s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-bg-hover);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease);
}
.btn--primary:hover::before { transform: scaleY(1); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: var(--deep-ink); color: #1B1813; }
.btn--light:hover { background: #fff; }
.btn--outline-light { border: 1px solid var(--deep-line); color: var(--deep-ink); }
.btn--outline-light:hover { border-color: var(--deep-ink); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: .68rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  padding-bottom: 6px; border-bottom: 1px solid var(--line-strong);
  transition: border-color .4s var(--ease), color .4s var(--ease);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.link-arrow:hover { border-color: var(--accent); color: var(--accent); }
.link-arrow:hover svg { transform: translateX(4px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Grain & preloader ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.preloader {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  background: var(--bg);
  animation: preloader-out .8s var(--ease) 2.6s forwards;
}
.preloader.is-done { opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; animation: none; }
.no-preloader .preloader { display: none; }
.preloader__logo { width: min(230px, 56vw); opacity: 0; transform: translateY(12px); animation: logo-in 1.3s var(--ease) .05s forwards; }
.preloader__logo img { width: 100%; height: auto; }
.preloader__line { width: 96px; height: 1px; background: var(--accent-soft); transform: scaleX(0); animation: line-in 1.1s var(--ease-in-out) .4s forwards; }
@keyframes logo-in { to { opacity: 1; transform: none; } }
@keyframes line-in { to { transform: scaleX(1); } }
@keyframes preloader-out { to { opacity: 0; visibility: hidden; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background-color .5s var(--ease), border-color .5s var(--ease), backdrop-filter .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  border-bottom-color: var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); transition: height .5s var(--ease);
}
.header.is-scrolled .header__inner { height: 70px; }
.header__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; }
.header__progress span { display: block; height: 100%; width: 100%; background: var(--accent-soft); transform-origin: left; transform: scaleX(0); }

.logo { display: inline-flex; align-items: center; gap: 14px; flex: none; }
.logo__emblem { position: relative; display: block; flex: none; height: 54px; transition: height .5s var(--ease); }
.logo__emblem img { width: auto; height: 100%; }
.header.is-scrolled .logo__emblem { height: 44px; }
.logo__text { display: flex; flex-direction: column; justify-content: center; line-height: 1; padding-left: 14px; border-left: 1px solid var(--line); }
.logo__name { font-family: var(--font-display); font-size: 1.18rem; font-weight: 500; letter-spacing: .44em; margin-right: -.44em; text-transform: uppercase; white-space: nowrap; }
.logo__sub { margin-top: 5px; font-size: .56rem; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }

.nav__list { display: flex; gap: clamp(18px, 2.4vw, 38px); }
.nav__link {
  position: relative; display: inline-block; padding: 8px 0;
  font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); transition: color .35s var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transition: transform .45s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--ink); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.header__tools { display: flex; align-items: center; gap: 12px; }

.lang { display: inline-flex; align-items: center; gap: 2px; }
.lang__btn {
  position: relative; padding: 8px 7px;
  font-size: .68rem; font-weight: 600; letter-spacing: .14em; color: var(--muted);
  transition: color .3s var(--ease);
}
.lang__btn + .lang__btn::before {
  content: ""; position: absolute; left: -1px; top: 50%; width: 1px; height: 10px;
  background: var(--line-strong); transform: translateY(-50%);
}
.lang__btn:hover { color: var(--ink); }
.lang__btn[aria-pressed="true"] { color: var(--accent); }

.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }

.burger { display: none; }
.burger__lines { position: relative; width: 18px; height: 8px; }
.burger__lines::before, .burger__lines::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor;
  transition: transform .45s var(--ease), top .45s var(--ease);
}
.burger__lines::before { top: 0; }
.burger__lines::after { top: 7px; }
.burger[aria-expanded="true"] .burger__lines::before { top: 3.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] .burger__lines::after { top: 3.5px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
  background: var(--bg);
  opacity: 0; visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: opacity .5s var(--ease), clip-path .7s var(--ease-in-out), visibility 0s .7s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; clip-path: inset(0); transition: opacity .5s var(--ease), clip-path .7s var(--ease-in-out); }
.mobile-menu__list { counter-reset: menu; }
.mobile-menu__list li { border-top: 1px solid var(--line); }
.mobile-menu__list li:last-child { border-bottom: 1px solid var(--line); }
.mobile-menu__link {
  display: flex; align-items: baseline; gap: 18px; padding: 16px 0;
  font-family: var(--font-display); font-size: clamp(2rem, 8vw, 2.8rem); line-height: 1.1;
}
.mobile-menu__link::before {
  counter-increment: menu; content: counter(menu, upper-roman) ".";
  min-width: 40px; font-family: var(--font-body); font-size: .7rem; letter-spacing: .2em; color: var(--accent);
}
.mobile-menu__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 20%, var(--line) 80%, transparent);
  pointer-events: none;
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.hero__title { margin-top: 28px; font-size: clamp(3.2rem, 1.4rem + 6vw, 7.4rem); line-height: .96; letter-spacing: -.02em; }
.hero__title em { display: inline-block; }
.hero__lead { margin-top: 32px; max-width: 46ch; font-size: 1.1rem; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 42px; }
.hero__notes {
  display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: clamp(24px, 3.5vw, 56px);
  margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--line);
}
.hero__notes li { display: flex; flex-direction: column; gap: 6px; max-width: 150px; }
.hero__num { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--ink); }
.hero__num--icon { display: flex; align-items: center; height: 1em; color: var(--accent); }
.hero__num--icon svg { width: .6em; height: .6em; }
.hero__notes span:last-child { font-size: .78rem; line-height: 1.45; color: var(--muted); }

.hero__visual { position: relative; padding: 0 0 12% 14%; }
.arch { position: relative; margin: 0; }
.arch__media { position: relative; overflow: hidden; border-radius: 999px 999px var(--radius) var(--radius); background: var(--surface-2); }
.arch__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 2.2s var(--ease); }
.is-in .arch__media img, .arch.is-in .arch__media img { transform: scale(1); }
.arch--main .arch__media { aspect-ratio: 3 / 4; box-shadow: var(--shadow-lg); }
.arch--main::before {
  content: ""; position: absolute; inset: -16px -16px 16px 16px; z-index: -1;
  border: 1px solid var(--accent-soft); border-radius: 999px 999px var(--radius) var(--radius); opacity: .7;
}
.arch__caption {
  position: absolute; right: -8px; bottom: 34px;
  padding: 12px 18px; background: var(--surface); box-shadow: var(--shadow-md);
  font-family: var(--font-display); font-size: 1.1rem; font-style: italic; line-height: 1;
}
.arch--small { position: absolute; left: 0; bottom: 0; width: 42%; }
.arch--small .arch__media { aspect-ratio: 3 / 4; border: 10px solid var(--bg); box-shadow: var(--shadow-md); transition: border-color .5s var(--ease); }

.seal {
  position: absolute; top: 4%; left: 2%; z-index: 2;
  display: grid; place-items: center; width: 138px; height: 138px;
  border-radius: 50%; background: var(--wine); color: var(--wine-ink);
  box-shadow: var(--shadow-md);
  transition: transform .6s var(--ease);
}
.seal:hover { transform: rotate(-6deg) scale(1.04); }
.seal__ring { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); animation: spin 28s linear infinite; }
.seal__ring text { font-size: 9.4px; letter-spacing: 2.6px; text-transform: uppercase; fill: currentColor; font-family: var(--font-body); font-weight: 600; }
.seal__center { position: relative; font-family: var(--font-display); font-size: 1.9rem; font-style: italic; line-height: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__scroll {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: .62rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll i { position: relative; width: 1px; height: 44px; background: var(--line); overflow: hidden; }
.hero__scroll i::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 1px; height: 50%;
  background: var(--accent); animation: scroll-line 2.4s var(--ease-in-out) infinite;
}
@keyframes scroll-line { to { top: 100%; } }

/* ---------- Marquee ---------- */
.marquee {
  position: relative; overflow: hidden;
  border-block: 1px solid var(--line); padding-block: 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee__group { display: flex; align-items: center; }
.marquee__item {
  display: inline-flex; align-items: center; gap: 44px; padding-right: 44px;
  font-family: var(--font-display); font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem); font-style: italic; white-space: nowrap;
}
.marquee__star { flex: none; width: 13px; height: 13px; color: var(--accent-soft); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Theme switch (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }

/* ---------- Responsive (base) ---------- */
@media (max-width: 1140px) {
  .nav { display: none; }
  .burger { display: inline-grid; }
}
@media (max-width: 960px) {
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 40px); }
  .hero::before { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; width: 100%; margin: 12px auto 0; }
  .hero__scroll { display: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 72px; }
  .header__cta { display: none; }
  .header .lang { display: none; }
  .logo__sub { display: none; }
  .logo__name { font-size: .9rem; letter-spacing: .36em; margin-right: -.36em; }
  .logo__text { padding-left: 12px; }
  .logo__emblem { height: 44px; }
  .header.is-scrolled .logo__emblem { height: 40px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__notes { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero__num { font-size: 2rem; }
  .seal { width: 112px; height: 112px; }
  .seal__ring text { font-size: 7.6px; letter-spacing: 2px; }
  .seal__center { font-size: 1.55rem; }
  .arch__caption { right: 0; bottom: 20px; font-size: .95rem; padding: 10px 14px; }
  .arch--small .arch__media { border-width: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}
