/* ==========================================================================
   Evolution Haus. Quiet Editorial.
   Tokens come straight from the approved plan ("Visual direction").
   Rules that shape everything below:
   - Black is for text and lines only, never a fill.
   - Lilac fills the Audit button (cream on lilac blocks); apricot fills the one secondary button.
   - One italic accent word per headline: apricot, or lilac on a white wash in peach sections.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face { font-family: "The Seasons"; src: url("/fonts/TheSeasons-Light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "The Seasons"; src: url("/fonts/TheSeasons-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "The Seasons"; src: url("/fonts/TheSeasons-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "The Seasons"; src: url("/fonts/TheSeasons-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "The Seasons"; src: url("/fonts/TheSeasons-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "The Seasons"; src: url("/fonts/TheSeasons-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* Visby is OTF for now. Convert to woff2 once the web licence is confirmed. */
@font-face { font-family: "Visby CF"; src: url("/fonts/VisbyCF-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Visby CF"; src: url("/fonts/VisbyCF-Medium.otf") format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Visby CF"; src: url("/fonts/VisbyCF-DemiBold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Visby CF"; src: url("/fonts/VisbyCF-Bold.otf") format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Visby CF"; src: url("/fonts/VisbyCF-RegularOblique.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Visby CF"; src: url("/fonts/VisbyCF-MediumOblique.otf") format("opentype"); font-weight: 500; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --cream: #faf7f2;
  --black: #11120d;
  --lilac: #d8c2ec;
  --apricot: #f2a579;

  /* Only two section colours: --cream and --lilac-25. Cards use --surface, nested pieces --surface-2; both flip on tinted sections. */
  --surface: #f2eaf0;
  --surface-2: #fff;
  --lilac-50: #f2eaf0;
  --lilac-25: #f2eaf0;
  --apricot-50: #f2a579;
  --apricot-25: #f2eaf0;
  --apricot-deep: #da956d;
  --lilac-deep: #c6a8e2;
  --ink: #34342f;
  --hairline: #d9d7d2;

  /* Type */
  --font-display: "The Seasons", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Visby CF", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;

  /* Radii */
  --r-pill: 999px;
  --r: 3px;
  --r-lg: 3px;
  --r-md: 3px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

@media (min-width: 900px) {
  :root { --header-h: 80px; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;      /* 16px on phone, 17px from tablet up */
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (min-width: 768px) {
  body { font-size: 1.0625rem; line-height: 1.65; }
}

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

/* Anything marked hidden stays hidden, whatever display its class sets (the Regenerate Australia content depends on this) */
[hidden] { display: none !important; }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 12px 20px; border-radius: var(--r-pill);
  background: var(--cream); color: var(--black); border: 1px solid var(--black);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- The sparkle (signature) ---------- */
.sparkle { width: 28px; height: 28px; fill: currentColor; color: var(--apricot); }

/* ---------- Header ---------- */
/* Inside a phone app the page sits under a system bar: the header sticks below it and the band above is painted cream */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--cream); }

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
  /* A soft shadow under the bar, always on, so it lifts off whatever sits beneath */
  box-shadow: 0 10px 30px -18px rgba(17, 18, 13, 0.22);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: var(--header-h);
}

.site-header__logo { display: block; flex: none; }
.site-header__logo img { display: block; width: 84px; height: auto; }
@media (min-width: 900px) { .site-header__logo img { width: 100px; } }

.site-nav { display: none; }
@media (min-width: 900px) {
  .site-nav { display: block; margin-inline: auto; }
  .site-nav__list { display: flex; gap: 40px; }
  .site-nav__list a {
    font-weight: 500; font-size: 0.9375rem; line-height: 1.25; letter-spacing: 0.01em;
    color: var(--black); text-decoration: none;
    padding-block: 8px;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
    transition: background-size 200ms var(--ease-std);
  }
  .site-nav__list a:hover, .site-nav__list a:focus-visible { background-size: 100% 1px; }
}

.site-header__actions { display: flex; align-items: center; gap: 8px; }

/* Menu toggle (phone) */
.menu-toggle {
  position: relative; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; border-radius: var(--r-pill); cursor: pointer; color: var(--black);
}
.menu-toggle__bars, .menu-toggle__bars::before {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; content: "";
  transition: transform 200ms var(--ease-std);
}
.menu-toggle__bars { top: 21px; }
.menu-toggle__bars::before { left: 0; right: 0; top: -6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(-90deg); }
@media (min-width: 900px) { .menu-toggle { display: none; border-radius: var(--r); } }

.mobile-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--cream); border-bottom: 1px solid var(--hairline);
  padding-block: 8px 16px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__list a {
  display: flex; align-items: center; min-height: 56px;
  font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.2;
  color: var(--black); text-decoration: none;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu__list li:last-child a { border-bottom: 0; }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }

/* ---------- Button (the one button) ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 40px 0 32px;
  background: var(--lilac); color: var(--black);
  border: 0; border-radius: var(--r-pill);
  box-shadow: 0 6px 16px -8px rgba(150, 110, 190, 0.45);
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1.25; letter-spacing: 0.01em;
  text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color 200ms var(--ease-std), transform 200ms var(--ease-std), box-shadow 200ms var(--ease-std);
}
/* No outline: a soft tinted shadow sits under the button and lifts with it on hover */
.btn:hover { background: var(--lilac-deep); transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(150, 110, 190, 0.55); }
/* The secondary button is solid apricot */
.btn--peach { background: var(--apricot); box-shadow: 0 6px 16px -8px rgba(218, 149, 109, 0.55); }
.btn--peach:hover { background: var(--apricot-deep); box-shadow: 0 14px 28px -12px rgba(218, 149, 109, 0.65); }
/* A lilac button would vanish on a lilac block, so there it turns cream */


.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; box-shadow: 0 0 0 7px var(--lilac); }

.btn__spark {
  position: absolute; right: 14px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  fill: currentColor; color: var(--black);
  opacity: 0; transform: translateX(-8px) scale(0.6);
  transition: opacity 200ms var(--ease-std), transform 240ms var(--ease-out);
}
.btn:hover .btn__spark, .btn:focus-visible .btn__spark { opacity: 1; transform: none; }
/* On hover the sparkle slides in, then keeps turning while the pointer stays */
@keyframes btn-spark-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.btn:hover .btn__spark, .btn:focus-visible .btn__spark { animation: btn-spark-spin 1.6s linear 240ms infinite; }
@media (prefers-reduced-motion: reduce) { .btn:hover .btn__spark, .btn:focus-visible .btn__spark { animation: none; } }

.btn--small { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; }
/* The nav button stays symmetrical at rest; on hover the label shifts left to make room for the sparkle */
.btn--small > span { transition: transform 240ms var(--ease-out); }
.btn--small:hover > span, .btn--small:focus-visible > span { transform: translateX(-8px); }
.btn--small .btn__spark { right: 11px; width: 12px; height: 12px; margin-top: -6px; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-weight: 500; font-size: 0.75rem; line-height: 1.33; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--black);
}

/* ---------- Lead ---------- */
.lead { font-size: 1.125rem; line-height: 1.55; color: var(--ink); max-width: 34rem; }
@media (min-width: 768px) { .lead { font-size: 1.25rem; line-height: 1.6; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  --pad-start: max(var(--gutter), calc((100% - var(--max)) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 48px;
  padding: 32px var(--gutter) 64px;
}

.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }

.hero__title {
  isolation: isolate;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.625rem, 1.2rem + 4.2vw, 5rem);
  line-height: 1.05; letter-spacing: -0.01em;
  color: var(--black);
  text-wrap: balance;
}
.hero__line { display: block; }
/* Longer headlines on inner pages */
.hero__title--long { font-size: clamp(2.25rem, 1.1rem + 2.9vw, 3.75rem); line-height: 1.08; }
/* Home headline: each sentence always holds its own line, so it scales with the screen on phones and tablets */
.hero__title:not(.hero__title--long) { font-size: min(5rem, 9.4vw); }
.hero__title:not(.hero__title--long) .hero__line { white-space: nowrap; }

/* The one italic accent word: apricot (lilac on peach sections), with a soft wash behind its lower half */
.accent { position: relative; display: inline; margin-inline: 0.04em; font-style: italic; font-weight: 300; color: var(--accent-ink, var(--apricot)); }
.accent::before {
  content: ""; position: absolute; z-index: -1;
  left: -0.08em; right: -0.04em; bottom: 0.1em; height: 0.42em;
  background: var(--wash, var(--lilac-50));
  transform-origin: left center; border-radius: var(--r); }
/* The wash only draws on at page load, in the hero */
.hero__title .accent::before { animation: wash 520ms var(--ease-out) 600ms backwards; }
.accent__spark {
  position: absolute; top: -0.05em; right: -0.5em;
  width: 0.4em; height: 0.4em; color: var(--apricot);
  /* spins in, then keeps turning slowly */
  animation: spark-spin-in 1100ms var(--ease-out) 1250ms backwards, btn-spark-spin 9s linear 2350ms infinite;
}

.hero__cta { width: 100%; }
.hero__cta .btn { width: 100%; }

.hero__facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.875rem; line-height: 1.4; color: var(--ink); }
.hero__facts li { display: flex; align-items: center; gap: 8px; }
/* Each fact is marked with a small magic wand */
.hero__facts li::before {
  content: ""; flex: none; width: 16px; height: 16px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 20.5 13.5 11' stroke='%2311120D' stroke-width='2' stroke-linecap='round'/><path d='M17 1.5c.4 3 2.1 4.7 5 5-2.9.3-4.6 2-5 5-.4-3-2.1-4.7-5-5 2.9-.3 4.6-2 5-5z' fill='%23F2A579'/><circle cx='7.5' cy='5' r='1.3' fill='%23F2A579'/><circle cx='20' cy='16' r='1.3' fill='%23D8C2EC'/></svg>") center / contain no-repeat;
}

/* Media */
.hero__media { position: relative; }
.hero__plate {
  position: absolute; z-index: 0; left: -12px; bottom: -16px;
  width: 68%; height: 68%;
  background: var(--lilac); border-radius: var(--r); }
.hero__photo {
  position: relative; z-index: 1;
  aspect-ratio: 4 / 5; width: 100%; overflow: hidden;
  background: var(--apricot-25);
  display: flex; align-items: center; justify-content: center; border-radius: var(--r); }
.hero__photo img, .hero__photo video { width: 100%; height: 100%; object-fit: cover; }
.hero__spark { position: absolute; z-index: 2; top: 7%; left: -10px; width: 36px; height: 36px; color: var(--apricot); }

/* Photo slots read as deliberate art-direction frames until the real photos arrive: an inset hairline and a caption bottom-left */
.hero__photo::after, .photo::after {
  content: ""; position: absolute; inset: 14px; z-index: 0; pointer-events: none;
  border: 1px solid rgba(17, 18, 13, 0.14); border-radius: var(--r); }
@media (min-width: 960px) { .hero__photo::after { border-radius: var(--r); } }
.placeholder {
  position: absolute; z-index: 1; left: 32px; right: 32px; bottom: 28px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  max-width: 20rem; padding: 0;
  font-size: 0.875rem; line-height: 1.45; text-align: left; color: var(--ink);
}
.placeholder__tag {
  padding: 4px 12px; border: 1px solid var(--black);
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--black); border-radius: var(--r); }

/* Wide phones and small tablets: the photo leads as a landscape frame, the copy follows, button hugs its label */
@media (min-width: 600px) and (max-width: 959px) {
  .hero__media { order: -1; }
  .hero__cta { width: auto; }
  .hero__cta .btn { width: auto; }
  .hero__photo { aspect-ratio: 3 / 2; border-radius: var(--r); }
}

/* The eyebrow becomes an outlined pill once there's room for it on one line (a soft hairline, not black) */
@media (min-width: 600px) {
  .hero .eyebrow { padding: 7px 16px; border: 1px solid rgba(17, 18, 13, 0.18); border-radius: var(--r-pill); }
}

/* Laptop and up, after NEXO: big headline on the left, a framed photo on the right with the lilac plate behind it and the badge on it */
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    column-gap: clamp(48px, 5vw, 88px);
    min-height: min(86vh, 820px);
    padding: clamp(40px, 5vw, 72px) var(--pad-start) clamp(56px, 6vw, 96px);
    row-gap: 0;
  }
  .hero__copy { grid-column: 1; grid-row: 1; }
  .hero__media { grid-column: 2; grid-row: 1; }
  .hero__photo { aspect-ratio: 4 / 5; max-height: min(72vh, 680px); box-shadow: 0 40px 80px -40px rgba(17, 18, 13, 0.35); border-radius: var(--r); }
  .hero__plate { left: -24px; bottom: -24px; border-radius: var(--r); }
  .hero__cta { width: auto; }
  .hero__cta .btn { width: auto; }
  /* Home headline: each sentence holds its own line, sized to fill the copy column */
  .hero__title { line-height: 1.02; }
  .hero__title:not(.hero__title--long) { font-size: clamp(3rem, 1rem + 3.9vw, 4.75rem); }
  .hero__title:not(.hero__title--long) .hero__line { white-space: nowrap; }
  .hero__title--long { font-size: clamp(2.25rem, 1rem + 2.6vw, 3.5rem); }
}

/* Social proof strip, straight under the hero (Doc: proof bar), small and quiet, one row on a pale lilac band (NEXO's trusted-by bar) */
.proof-strip { background: var(--lilac-25); border-block: 1px solid var(--hairline); padding-block: 20px; }
.proof-strip .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 28px; font-size: 0.875rem; line-height: 1.4; }

/* ---------- Load sequence (the one orchestrated moment) ---------- */
[data-rise] { animation: rise 700ms var(--ease-out) backwards; animation-delay: calc(120ms + var(--i, 0) * 80ms); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes wash { from { transform: scaleX(0); } }
@keyframes pop { from { opacity: 0; transform: scale(0.4) rotate(-20deg); } }
@keyframes reveal { from { clip-path: inset(8% 8% 8% 8% round var(--r-lg)); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-right { from { opacity: 0; transform: translateX(-32px); } }
@keyframes fade-left { from { opacity: 0; transform: translateX(48px); } }
@keyframes hold-x { from { transform: translateX(32px); } }
@keyframes spark-spin-in { from { opacity: 0; transform: scale(0.3) rotate(-540deg); } 60% { opacity: 1; } }

/* Hero entrance, in order: the eyebrow fades in; each headline line slides in to the right,
   except the word magic, which stays put and fades in on its own before its sparkle spins in;
   the paragraph slides in to the right; the button fades in; the facts rise; the photo slides in from the right. */
.hero .eyebrow[data-rise], .hero__cta[data-rise] { animation-name: fade; }
.hero__line[data-rise], .hero .lead[data-rise] { animation-name: fade-right; animation-duration: 800ms; }
.hero__title .accent { display: inline-block; animation: hold-x 800ms var(--ease-out) calc(120ms + var(--i, 0) * 80ms) backwards, fade 700ms var(--ease-std) 750ms backwards; }
.hero__title .accent::before { animation-delay: 1050ms; }
.hero__media { animation: fade-left 900ms var(--ease-out) 300ms backwards; }

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

/* Italic capitals with a leading swash (M) reach back into the word before; give them room */
.accent--swash { margin-left: 0.22em; }

/* The Build: the hero mirrors the home page, photo on the left and the copy on the right */
@media (min-width: 960px) {
  .page-build .hero, .page-about .hero { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .page-build .hero__copy, .page-about .hero__copy { grid-column: 2; }
  .page-build .hero__media, .page-about .hero__media { grid-column: 1; animation-name: fade-right; }
  .page-build .hero__plate, .page-about .hero__plate { left: auto; right: -24px; }
}
