@layer reset, base, theme, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
  }
  body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
  img, video, svg { display: block; max-width: 100%; height: auto; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
  ul, ol { list-style: none; padding: 0; }
}

@layer theme {
  :root{--bg:#F7F4F0;--ink:#2A1A10;--muted:#6B5648;--line:#DDD2C4;--accent:#E0A020;--footer:#1A120C;--soft:#F5E4C0;--header-dark:#030312;--header-hover:#F0C050;--slate: #141A24;
    --char: #1C2433;
    --mist: #A8B0BC;
    --silver: #C7CED8;
    --foil: #C9A227;
    --champagne: #E8D5A3;
    --cream: #F3EEE4;
    --paper: #FAF7F1;
    --ink-text: #12161F;
    --teal: #1F6F78;
    
    --radius: 14px;
    --shadow: 0 24px 60px rgba(0,0,0,.35);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Sora", system-ui, sans-serif;
    --header-h: 5.25rem;
    --ease: cubic-bezier(.22,1,.36,1)}
}

@layer base {
  @media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
  }
  body {
    font-family: var(--font-body);
    color: var(--cream);
    background: var(--ink);
    line-height: 1.65;
    min-height: 100vh;
    text-wrap: pretty;
    overflow-x: hidden;
    padding-bottom: 7.5rem; /* clear sticky .cta-rail + Ask AI / WhatsApp corners */
  }
  h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 550;
    line-height: 1.12;
    text-wrap: balance;
    letter-spacing: -0.02em;
  }
  h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
  h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
  h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
  p { max-width: 68ch; }
  :focus-visible { outline: 2px solid var(--foil); outline-offset: 3px; }
}

@layer components {
  .container { width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }
  .container-wide { width: min(1360px, calc(100% - 2rem)); margin-inline: auto; }

  /* Header — vertical gold hairline under sticky bar (distinct from siblings) */
  .site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--ink) 88%, transparent);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid var(--line);
  }
  .site-header::after {
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--foil) 20%, var(--champagne) 50%, var(--foil) 80%, transparent);
  }
  .nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; min-height: var(--header-h);
    width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto;
  }
  .logo-link {
    display: inline-flex; align-items: center; gap: .85rem;
    font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
  }
  .logo-link img.logo-lockup { width: auto; height: 64px; max-height: 64px; }
  .logo-link img:not(.logo-lockup) { width: 48px; height: 48px; }
  .footer-brand .logo-link img.logo-lockup { height: 44px; max-height: 44px; }
  .nav-links { display: flex; align-items: center; gap: 1.1rem; font-size: .88rem; }
  .nav-links a:not(.btn) { color: var(--silver); }
  .nav-links a:not(.btn):hover { color: var(--champagne); }
  .nav-toggle { display: none; width: 2.5rem; height: 2.5rem; flex-direction: column; justify-content: center; gap: 5px; }
  .nav-toggle span { display: block; height: 2px; background: var(--cream); border-radius: 2px; }

  @media (max-width: 920px) {
    .nav-toggle { display: flex; }
    .nav-links {
      position: fixed; inset: calc(var(--header-h) + 2px) 0 auto 0;
      background: var(--slate); flex-direction: column; align-items: stretch;
      padding: 1.25rem; gap: .75rem; transform: translateY(-120%);
      transition: transform .35s var(--ease); border-bottom: 1px solid var(--line);
    }
    .site-header:has(.nav-toggle[aria-expanded="true"]) .nav-links { transform: none; }
  }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 1.35rem; border-radius: 999px; font-size: .9rem; font-weight: 600;
    transition: transform .25s var(--ease), background .25s, color .25s, box-shadow .25s;
  }
  .btn:hover:not(:disabled) { transform: translateY(-1px); }
  .btn-primary { background: var(--foil); color: var(--ink); box-shadow: 0 10px 30px rgba(201,162,39,.28); }
  .btn-primary:hover:not(:disabled) { background: var(--champagne); }
  .btn-ghost { border: 1px solid var(--line); color: var(--cream); }
  .btn-ghost:hover:not(:disabled) { border-color: var(--foil); color: var(--champagne); }
  .btn-light { background: var(--cream); color: var(--ink-text); }
  .btn-teal { background: var(--teal); color: white; }

  /* Hero */
  .hero {
    position: relative; min-height: min(88vh, 820px);
    display: grid; align-items: end; overflow: clip;
    padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  }
  @media (max-width: 920px) {
    .hero {
      min-height: auto;
      padding-bottom: calc(6.5rem + 5.5rem); /* keep hero CTAs above sticky rail + widgets */
    }
    .hero-scroll-hint { display: none; }
  }
  .hero-bg { position: absolute; inset: 0; }
  .hero-bg img {
    width: 100%; height: 100%; object-fit: cover;
    filter: saturate(.85) contrast(1.05);
  }
  .hero-overlay {
    position: absolute; inset: 0;
    background:
      linear-gradient(105deg, rgba(11,14,20,.92) 0%, rgba(11,14,20,.72) 42%, rgba(11,14,20,.35) 100%),
      linear-gradient(to top, rgba(11,14,20,.85), transparent 45%);
  }
  .hero-content { position: relative; z-index: 2; max-width: 40rem; }
  .eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    color: var(--foil); text-transform: uppercase; letter-spacing: .16em;
    font-size: .72rem; font-weight: 600; margin-bottom: 1rem;
  }
  .eyebrow::before { content: ""; width: 1.4rem; height: 1px; background: var(--foil); }
  .hero .lede { color: var(--silver); font-size: 1.08rem; margin: 1.1rem 0 1.75rem; }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
  .hero-scroll-hint {
    position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
    font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mist);
  }

  .marquee { overflow: hidden; max-width: 100%; border-block: 1px solid var(--line); background: var(--slate); }
  .marquee-track {
    display: flex; gap: 1.5rem; width: max-content; padding: .9rem 0;
    font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mist);
  }
  @media (prefers-reduced-motion: no-preference) {
    .marquee-track { animation: marquee 42s linear infinite; }
  }
  @keyframes marquee { to { transform: translateX(-50%); } }

  .section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
  .section-cream { background: var(--cream); color: var(--ink-text); }
  .section-cream .eyebrow { color: var(--teal); }
  .section-cream .eyebrow::before { background: var(--teal); }
  .section-slate { background: var(--slate); }
  .section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3rem); max-width: 46rem; }
  .section-head--split {
    display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: end;
    max-width: none;
  }
  @media (max-width: 800px) { .section-head--split { grid-template-columns: 1fr; } }
  .section-head .aside { color: var(--mist); font-size: .98rem; }
  .section-cream .aside { color: color-mix(in srgb, var(--ink-text) 65%, transparent); }

  .ed-rule {
    width: 4rem; height: 2px; border: 0;
    background: linear-gradient(90deg, var(--foil), transparent);
    margin: .75rem 0 1rem;
  }

  /* Asymmetric feature band */
  .split-feature {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
  }
  .split-feature.reverse { direction: rtl; }
  .split-feature.reverse > * { direction: ltr; }
  @media (max-width: 860px) {
    .split-feature, .split-feature.reverse { grid-template-columns: 1fr; direction: ltr; }
  }
  .split-media {
    position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden;
    aspect-ratio: 4/3; box-shadow: var(--shadow);
  }
  .split-media img { width: 100%; height: 100%; object-fit: cover; }
  .split-media::after {
    content: ""; position: absolute; inset: auto -8% -8% auto; width: 42%; height: 42%;
    border: 1px solid color-mix(in srgb, var(--foil) 55%, transparent);
    border-radius: var(--radius); pointer-events: none;
  }
  .split-copy h2 { margin-bottom: .9rem; }
  .split-copy p { color: var(--mist); margin-bottom: 1rem; }
  .section-cream .split-copy p { color: color-mix(in srgb, var(--ink-text) 70%, transparent); }

  /* Cards */
  .card-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem;
  }
  @media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }
  .card {
    container-type: inline-size;
    background: var(--char); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    transition: border-color .25s, transform .3s var(--ease);
  }
  .card:hover { border-color: color-mix(in srgb, var(--foil) 55%, var(--line)); transform: translateY(-3px); }
  .card-media { aspect-ratio: 16/10; overflow: hidden; background: var(--slate); }
  .card-media img { width: 100%; height: 100%; object-fit: cover; }
  .card-body { padding: 1.15rem 1.2rem 1.35rem; }
  .card-body .chip {
    display: inline-block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--foil); margin-bottom: .45rem;
  }
  .card-body p { color: var(--mist); font-size: .92rem; margin-top: .45rem; }
  .card-link { display: inline-flex; margin-top: .9rem; color: var(--champagne); font-size: .88rem; font-weight: 600; }

  .stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
    padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: color-mix(in srgb, var(--slate) 80%, transparent);
  }
  @media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
  .stat-num {
    font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--foil); line-height: 1;
  }
  .stat-label { color: var(--mist); font-size: .82rem; margin-top: .35rem; }

  /* Product atlas — broken grid */
  .range-atlas {
    display: grid; grid-template-columns: 1.35fr 1fr 1fr; grid-auto-rows: minmax(160px, auto);
    gap: 1rem;
  }
  @media (max-width: 900px) { .range-atlas { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .range-atlas { grid-template-columns: 1fr; } }
  .atlas-feature {
    grid-row: span 2; position: relative; border-radius: var(--radius); overflow: hidden;
    min-height: 420px; display: flex; align-items: flex-end;
  }
  .atlas-feature img, .atlas-tile img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  }
  .atlas-feature .af-body, .atlas-tile .af-body {
    position: relative; z-index: 2; padding: 1.4rem;
    background: linear-gradient(to top, rgba(11,14,20,.92), transparent);
    width: 100%;
  }
  .atlas-tile {
    position: relative; border-radius: var(--radius); overflow: hidden; min-height: 200px;
    display: flex; align-items: flex-end; border: 1px solid var(--line);
  }

  /* Page hero (inner) */
  .page-hero {
    padding: clamp(3rem, 7vw, 5rem) 0 2.5rem;
    border-bottom: 1px solid var(--line);
    background:
      radial-gradient(ellipse 60% 80% at 100% 0%, rgba(201,162,39,.12), transparent),
      var(--ink);
  }
  .breadcrumbs { font-size: .8rem; color: var(--mist); margin-bottom: 1rem; }
  .breadcrumbs a:hover { color: var(--champagne); }
  .page-hero .lede { color: var(--silver); margin-top: 1rem; font-size: 1.05rem; }

  .prose { display: grid; gap: 1rem; color: var(--mist); }
  .prose h2, .prose h3 { color: var(--cream); margin-top: .5rem; }
  .section-cream .prose { color: color-mix(in srgb, var(--ink-text) 72%, transparent); }
  .section-cream .prose h2, .section-cream .prose h3 { color: var(--ink-text); }
  .prose ul { display: grid; gap: .45rem; padding-left: 1.1rem; list-style: disc; }
  .prose li::marker { color: var(--foil); }

  .spec-table {
    width: 100%; border-collapse: collapse; font-size: .92rem;
  }
  .spec-table th, .spec-table td {
    text-align: start; padding: .7rem .85rem; border-bottom: 1px solid var(--line);
  }
  .spec-table th { color: var(--champagne); font-weight: 600; width: 38%; }

  /* Side rail CTA — clear Ask AI + WhatsApp */
  .cta-rail {
    position: sticky; bottom: 0; z-index: 40;
    padding: .75rem 1rem calc(6.5rem + .75rem);
    background: linear-gradient(to top, var(--ink) 60%, transparent);
    pointer-events: none;
    max-width: 100vw;
  }
  .cta-rail .cta-inner {
    pointer-events: auto;
    display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center;
    width: min(1180px, calc(100% - 1.5rem)); margin-inline: auto;
    max-width: 100%;
  }
  @media (max-width: 920px) {
    .cta-rail .cta-inner { justify-content: center; }
    .cta-rail .btn { flex: 1 1 auto; min-width: 0; max-width: 100%; }
    .page-hero, .section, .site-footer {
      padding-bottom: calc(var(--section-pad, 0px));
    }
    /* Extra clearance so last cards / page-cta clear the sticky rail */
    .site-footer { padding-bottom: calc(3.5rem + 6.5rem); }
  }
  .page-cta {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1.6rem 1.75rem; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--char), var(--slate));
    border: 1px solid color-mix(in srgb, var(--foil) 40%, var(--line));
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  }
  .page-cta > div { flex: 1 1 16rem; min-width: 0; }
  .page-cta p { color: var(--silver); margin: 0; max-width: none; }
  .page-cta h2 { margin: 0 0 .45rem; }

  /* Footer */
  .site-footer {
    background: #07090e; border-top: 1px solid var(--line);
    padding: 3.5rem 0 2rem; color: var(--mist); font-size: .9rem;
  }
  .footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem;
    margin-bottom: 2.5rem;
  }
  @media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
  .site-footer h4 { color: var(--cream); font-family: var(--font-body); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .9rem; }
  .site-footer a:hover { color: var(--champagne); }
  .footer-brand .logo-link { margin-bottom: .85rem; }
  .footer-meta { border-top: 1px solid var(--line); padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
  .footer-meta a { color: var(--foil); }

  /* Scroll reveals */
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @media (prefers-reduced-motion: no-preference) {
      .reveal {
        animation: rise-in linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 35%;
      }
      .reveal-delay-1 { animation-range: entry 8% entry 42%; }
      .reveal-delay-2 { animation-range: entry 14% entry 48%; }
      .reveal-fade {
        animation: fade-soft linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 40%;
      }
    }
  }
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes fade-soft {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .chip-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; }
  .chip-pill {
    border: 1px solid var(--line); border-radius: 999px; padding: .35rem .75rem;
    font-size: .75rem; color: var(--silver);
  }

  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
  @media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

  .list-links { display: grid; gap: .55rem; }
  .list-links a {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .85rem 1rem; border-radius: 10px; border: 1px solid var(--line);
    background: var(--char);
  }
  .list-links a:hover { border-color: var(--foil); }

  .note {
    font-size: .85rem; color: var(--mist); border-left: 2px solid var(--foil);
    padding-left: .85rem; margin-top: 1rem;
  }
}

@layer utilities {
  .sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
  }
  .text-foil { color: var(--foil); }
  .text-champagne { color: var(--champagne); }
  .mt-1 { margin-top: .5rem; }
  .mt-2 { margin-top: 1rem; }
  .mt-3 { margin-top: 1.5rem; }
}


/* Remote AM.CO.ZA review cards (fetch live JSON) */
.reviews-band .testimonials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .reviews-band .testimonials { grid-template-columns: 1fr; }
}
.reviews-band .testimonial,
.bd-review {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.bd-review-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.bd-review-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: var(--mist);
}
.bd-review-meta { min-width: 0; flex: 1; }
.bd-review .who { margin: 0; color: var(--ink); }
.bd-review-date {
  display: block;
  font-size: 0.78rem;
  color: var(--mist);
  margin-top: 0.15rem;
}
.bd-review-stars {
  margin: 0.25rem 0 0;
  color: var(--foil);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  line-height: 1;
}
.bd-review-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.bd-review blockquote {
  margin: 0;
  flex: 1;
  color: var(--ink);
}
.bd-review-link {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--foil);
  text-decoration: none;
}
.bd-review-link:hover { text-decoration: underline; }
.reviews-band .eyebrow { letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; color: var(--mist); }
.reviews-band .muted { color: var(--mist); }

/* wf-dual-header */
.site-header,.header{position:sticky;top:0;z-index:40;background:#030312;backdrop-filter:blur(12px);border-bottom:1px solid rgba(255,255,255,.12);color:#fff;transition:background .22s ease,border-color .22s ease,color .22s ease,box-shadow .22s ease}
.site-header .nav-links a,.site-header .rack-nav a,.header .navlinks a,.header .links a{color:rgba(255,255,255,.9)}
.site-header .nav-links a:hover,.site-header .nav-links a.active,.header .navlinks a:hover,.header .links a:hover{color:#F0C050}
.site-header .nav-toggle span,.header .nav-toggle span,.header .menu{color:#fff}
.site-header .nav-toggle span{background:#fff}
.site-header.is-scrolled,.site-header.scrolled,.header.is-scrolled,.header.scrolled{background:color-mix(in srgb,var(--bg) 92%,transparent);border-bottom:1px solid var(--line);color:var(--ink);box-shadow:0 8px 24px rgba(42,26,16,.08)}
.site-header.is-scrolled .nav-links a,.site-header.scrolled .nav-links a,.header.is-scrolled .navlinks a,.header.scrolled .navlinks a,.header.is-scrolled .links a,.header.scrolled .links a{color:inherit}
.site-header.is-scrolled .nav-links a:hover,.site-header.is-scrolled .nav-links a.active,.site-header.scrolled .nav-links a:hover,.header.is-scrolled .navlinks a:hover,.header.scrolled .links a:hover{color:var(--accent)}
.site-header.is-scrolled .nav-toggle span,.site-header.scrolled .nav-toggle span{background:var(--ink)}
.logo-link img.logo-primary,.logo img.logo-primary,.brand img.logo-primary,a.logo img.logo-primary,.logo-link img.logo-lockup{height:3.25rem;width:auto;max-width:min(280px,70vw)}
.site-footer .logo-link img.logo-primary,.footer .logo img.logo-primary,.footer .brand img.logo-primary,.footer-brand .logo-link img.logo-lockup{height:2.75rem;filter:none}
.logo-link .logo-lockup--on-light{display:none!important}
.site-header.scrolled .logo-link .logo-lockup--on-dark,.site-header.is-scrolled .logo-link .logo-lockup--on-dark{display:none!important}
.site-header.scrolled .logo-link .logo-lockup--on-light,.site-header.is-scrolled .logo-link .logo-lockup--on-light{display:block!important}
/* end-wf-dual-header */
