/* ═══════════════════════════════════════════════════════════════════════════
   Reef Auctions ZA — bespoke white-label theme.

   Fully custom build from the client's "Reef Auctions" design system
   (reef-design/ : BRAND.md + tokens.css). The brand is "a lit reef tank at
   night" — deep navy Abyss (default/dark) with electric lagoon-blue light;
   Shallows is the light alt. Component CSS is inherited from the BidAll
   white-label template and derives entirely from the tokens below, so the nav,
   hero, cards, footer, auction-card embed and platform (Laravel) pages all
   pick up the reef palette automatically.

   Palette source of truth: reef-design/tokens/tokens.css (abyss / shallows).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────── Fonts: Archivo (display + body) + Montserrat (labels) ─────────── */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Montserrat:wght@500;600;700&display=swap');

/* ───────────────────────── BRAND PALETTE ─────────────────────────────────── */
/* Abyss (dark) is the brand default. Shallows (light) under [data-theme="light"]. */
:root{
  --brand:        #22c4f0;   /* lagoon — the wordmark's water; links, live state, accents */
  --brand-deep:   #040a17;   /* abyss surface-000 — the always-dark hero band */
  --accent:       #22c4f0;   /* lagoon — primary CTA / badges */
  --accent-rgb:   34 196 240; /* lagoon as "R G B" for soft tints */
  --on-accent:    #03121f;   /* dark ink that sits ON lagoon */
  --radius:       14px;      /* radius-md (buttons/inputs); cards use 22px below */
  --max:          1180px;    /* reef content max width */
  --font:         "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-label:   "Montserrat", "Archivo", system-ui, sans-serif;
}

/* ─────────────────── Semantic tokens — Abyss (dark, DEFAULT) ──────────────── */
:root{
  --bg:#040a17; --surface:#0a1730; --surface-2:#112442;
  --text:#ecf7ff; --muted:#94b4d1; --line:#22406b;
  --accent-text:var(--accent);        /* bright lagoon on dark */
  --accent-text-on:var(--on-accent);  /* dark ink on the lagoon fill */
  --header-bg:rgba(4,10,23,.72);
  color-scheme:dark;
}
/* ─────────────────── Semantic tokens — Shallows (light) ───────────────────── */
:root[data-theme="light"]{
  --brand:#00679c; --accent:#00679c; --accent-rgb:0 103 156; --on-accent:#ffffff;
  --bg:#eef6fb; --surface:#ffffff; --surface-2:#e1eef7;
  --text:#061325; --muted:#3b5874; --line:#b9d1e3;
  --accent-text:var(--brand);
  --accent-text-on:#ffffff;
  --header-bg:rgba(255,255,255,.85);
  color-scheme:light;
}

/* ═══════════════════════ Components (derive from tokens) ══════════════════ */
  *{box-sizing:border-box;margin:0;padding:0}
  html{scroll-behavior:smooth;scrollbar-gutter:stable}
  section[id]{scroll-margin-top:76px}
  body{
    font-family:var(--font);
    color:var(--text); background:var(--bg); line-height:1.6; -webkit-font-smoothing:antialiased;
    transition:background .2s ease,color .2s ease;
  }
  a{color:inherit;text-decoration:none}
  img{max-width:100%;display:block}
  .wrap{width:100%;max-width:var(--max);margin:0 auto;padding:0 20px}
  .btn{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;
    min-height:48px;padding:0 22px;border-radius:var(--radius);
    font-family:var(--font-label);font-weight:700;font-size:.95rem;letter-spacing:.03em;
    border:2px solid transparent;cursor:pointer;transition:transform .12s ease,opacity .12s ease,box-shadow .15s ease;
  }
  .btn:active{transform:translateY(1px)}
  .btn-primary{background:var(--accent);color:var(--on-accent)}
  .btn-primary:hover{opacity:.92;box-shadow:0 0 0 1px rgb(var(--accent-rgb) / .45),0 10px 40px rgb(var(--accent-rgb) / .28)}
  /* WhatsApp actions are ALWAYS WhatsApp green, never the brand accent (global standard). */
  .btn-whatsapp{background:#25D366;color:#fff}
  .btn-whatsapp:hover{background:#1EBE5D}
  .btn-ghost{background:transparent;border-color:var(--line);color:var(--text)}
  .btn-ghost:hover{border-color:var(--accent-text);color:var(--accent-text)}

  /* ---- Header ---- */
  header{position:sticky;top:0;z-index:50;background:var(--header-bg);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
  .nav{display:flex;align-items:center;justify-content:space-between;min-height:64px;position:relative}
  .brand{display:flex;align-items:center;gap:11px}
  .brand .logo img{height:40px;width:auto;display:block}   /* round badge, works on both themes */
  .brand .brand-name{font-family:var(--font);font-weight:800;font-size:1.15rem;color:var(--text);letter-spacing:-.01em}
  .brand .brand-name span{color:var(--accent-text)}
  .nav-right{display:flex;align-items:center;gap:12px}
  .nav-controls{display:flex;align-items:center;gap:8px}
  .icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;background:transparent;border:1px solid var(--line);color:var(--text);cursor:pointer}
  .icon-btn svg{width:22px;height:22px}
  .theme-toggle .icon-sun{display:block}
  .theme-toggle .icon-moon{display:none}
  :root[data-theme="light"] .theme-toggle .icon-sun{display:none}
  :root[data-theme="light"] .theme-toggle .icon-moon{display:block}
  .nav-links{
    display:none;position:absolute;top:calc(100% + 1px);left:0;right:0;flex-direction:column;
    background:var(--surface);border-bottom:1px solid var(--line);padding:8px 20px 16px;
    box-shadow:0 14px 26px rgba(0,0,0,.35);z-index:60;
  }
  .nav-links.open{display:flex}
  .nav-links a:not(.btn){padding:13px 4px;font-size:1rem;color:var(--text);border-bottom:1px solid var(--line)}
  .nav-links a:not(.btn):hover{color:var(--accent-text)}
  .nav-links .btn{width:100%;margin-top:12px}

  /* ---- Hero (always deep Abyss water) ---- */
  .hero{position:relative;overflow:hidden;background:radial-gradient(120% 90% at 50% 0%,#16a3d2 0%,#0a1730 42%,#040a17 100%)}
  .hero .bg{position:absolute;inset:0;z-index:0;opacity:.55;object-fit:cover;object-position:center 60%;width:100%;height:100%}
  /* Scrim: darken top (nav/eyebrow) and bottom (buttons/seam), let the reef glow through the middle so the headline stays legible over the image. */
  .hero::after{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,rgba(4,10,23,.74) 0%,rgba(4,10,23,.44) 42%,rgba(4,10,23,.82) 100%)}
  .hero .wrap{position:relative;z-index:2;padding:64px 20px 72px;text-align:center}
  .eyebrow{display:inline-flex;align-items:center;gap:8px;font-family:var(--font-label);font-size:.76rem;letter-spacing:.22em;text-transform:uppercase;color:#6fe3ff;font-weight:700;margin-bottom:18px}
  .eyebrow .dot{width:8px;height:8px;border-radius:50%;background:#6fe3ff;box-shadow:0 0 0 4px rgb(var(--accent-rgb) / .2)}
  h1{font-family:var(--font);font-size:2.3rem;line-height:1.08;color:#fff;font-weight:900;font-stretch:125%;letter-spacing:-.01em;max-width:16ch;margin:0 auto}
  h1 .accent{color:var(--brand)}
  .hero p.lead{margin:20px auto 30px;max-width:720px;font-size:1.08rem;color:#cfe6f5}
  .hero-actions{display:flex;flex-direction:column;gap:12px;max-width:380px;margin:0 auto}
  .hero .btn-ghost{border-color:rgba(255,255,255,.28);color:#fff}
  .hero .btn-ghost:hover{border-color:var(--brand);color:var(--brand)}

  /* ---- Sections (themed) ---- */
  section.pad{padding:56px 0}
  .section-alt{background:var(--surface-2)}
  .section-head{text-align:center;max-width:720px;margin:0 auto 36px}
  .section-head .kicker{font-family:var(--font-label);color:var(--accent-text);font-weight:700;font-size:.76rem;letter-spacing:.22em;text-transform:uppercase}
  .section-head h2{font-family:var(--font);color:var(--text);font-size:1.9rem;font-weight:800;font-stretch:125%;margin-top:8px;letter-spacing:-.01em}
  .section-head p{color:var(--muted);margin-top:12px}

  .grid{display:grid;grid-template-columns:1fr;gap:16px}
  .card{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 12px 32px rgba(0,0,0,.35)}
  .card .ico{width:48px;height:48px;border-radius:999px;display:flex;align-items:center;justify-content:center;margin-bottom:14px;color:#fff}
  .card .ico svg{width:24px;height:24px}
  .card .ico.lagoon{background:#22c4f0;color:#03121f}
  .card .ico.coral{background:#ff6b2c;color:#1c0800}
  .card .ico.zoa{background:#a6f23f;color:#0b1a00}
  .card .ico.anemone{background:#c06bff;color:#12021f}
  .card h3{font-family:var(--font);color:var(--text);font-size:1.15rem;font-weight:700;margin-bottom:6px}
  .card p{color:var(--muted);font-size:.96rem}

  /* steps grid: 2-up tablet, 4-up desktop */
  @media(min-width:560px){ .grid.steps{grid-template-columns:repeat(2,1fr)} }

  /* for-sellers split band */
  .sellers{overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:22px;display:flex;flex-wrap:wrap;align-items:stretch}
  .sellers img{flex:1 1 320px;min-height:240px;max-height:340px;width:100%;object-fit:cover;display:block}
  .sellers .copy{flex:999 1 420px;padding:40px;display:flex;flex-direction:column;gap:14px;justify-content:center}
  .sellers .copy h2{font-family:var(--font);font-size:1.9rem;font-weight:800;font-stretch:125%;color:var(--text)}
  .sellers .copy p{color:var(--muted);max-width:560px;font-size:1.05rem}
  .sellers .copy .acts{display:flex;gap:12px;flex-wrap:wrap;padding-top:6px}

  /* contact (themed) */
  .contact{background:var(--surface-2)}
  .contact-grid{display:grid;grid-template-columns:1fr;gap:14px}
  .c-item{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px 18px}
  .c-item .ico{width:40px;height:40px;flex:0 0 40px;border-radius:10px;background:rgb(var(--accent-rgb) / .18);display:flex;align-items:center;justify-content:center}
  .c-item .k{font-size:.74rem;color:var(--muted);text-transform:uppercase;letter-spacing:.14em;font-family:var(--font-label)}
  .c-item .v{color:var(--text);font-weight:700}

  footer{background:var(--surface-2);border-top:1px solid var(--line);padding:34px 0;text-align:center;color:var(--muted);font-size:.88rem}
  footer .logo img{height:44px;width:auto;display:inline-block;margin-bottom:14px}
  footer .brand-name{font-family:var(--font);font-weight:800;font-size:1.2rem;color:var(--text);margin-bottom:8px}
  footer .brand-name span{color:var(--accent-text)}
  footer .slogan{font-family:var(--font-label);letter-spacing:.04em;color:var(--muted)}
  footer .built{margin-top:14px;font-size:.8rem;opacity:.8}
  footer a{color:var(--muted)}
  footer a:hover{color:var(--accent-text)}

  /* ---- Auction embed (inherits themed tokens; ONE embed, every client) ---- */
  #bidall-auction{
    --bidall-accent:var(--accent-text);
    --bidall-accent-text:var(--accent-text-on);
    --bidall-bg:transparent;
    --bidall-card-bg:var(--surface);
    --bidall-text:var(--text);
    --bidall-muted:var(--muted);
    --bidall-border:var(--line);
    --bidall-radius:22px;
    --bidall-gap:24px;
    display:block;min-height:120px;
  }
  .embed-empty{color:var(--muted);text-align:center;padding:28px;border:1px dashed var(--line);border-radius:22px}

  /* ---- Desktop ---- */
  @media(min-width:820px){
    h1{font-size:3.6rem}
    .nav-toggle{display:none}
    .nav-links{display:flex;flex-direction:row;position:static;background:transparent;border:0;box-shadow:none;padding:0;gap:26px;align-items:center;font-size:.95rem}
    .nav-links a:not(.btn){padding:0;border:0;color:var(--muted)}
    .nav-links .btn{width:auto;margin:0}
    .hero .wrap{padding:104px 20px 112px}
    .grid{grid-template-columns:repeat(4,1fr)}
    .contact-grid{grid-template-columns:repeat(2,1fr)}
    .hero-actions{flex-direction:row;max-width:none;justify-content:center}
  }

  /* Floating WhatsApp-group starburst CTA (shown by /embed/v1.js when the profile has a group link) */
  .wa-burst{position:fixed;right:16px;bottom:16px;z-index:90;width:132px;height:132px;display:grid;place-items:center;color:#fff;text-decoration:none;filter:drop-shadow(0 6px 16px rgba(0,0,0,.35));animation:wa-pulse 1.7s ease-in-out infinite}
  .wa-burst[hidden]{display:none}
  .wa-burst::before{content:"";position:absolute;inset:0;background:#25D366;clip-path:polygon(50% 0%,60% 15%,75% 5%,75% 22%,92% 20%,84% 35%,100% 40%,88% 50%,100% 60%,84% 65%,92% 80%,75% 78%,75% 95%,60% 85%,50% 100%,40% 85%,25% 95%,25% 78%,8% 80%,16% 65%,0% 60%,12% 50%,0% 40%,16% 35%,8% 20%,25% 22%,25% 5%,40% 15%);z-index:-1}
  .wa-burst .wa-in{text-align:center;font-weight:800;font-size:10.5px;line-height:1.2;letter-spacing:.3px;text-transform:uppercase;font-family:var(--font-label)}
  .wa-burst svg{width:22px;height:22px;display:block;margin:0 auto 3px}
  .wa-burst:hover{filter:drop-shadow(0 9px 24px rgba(0,0,0,.5))}
  @keyframes wa-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
  @media(max-width:600px){.wa-burst{width:104px;height:104px;right:12px;bottom:12px}.wa-burst .wa-in{font-size:9px}.wa-burst svg{width:18px;height:18px}}

  /* POPIA cookie-consent banner (rendered by consent.js; analytics stay denied until Accept). */
  #cookie-consent{position:fixed;left:0;right:0;bottom:0;z-index:120;background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -10px 30px rgba(0,0,0,.35)}
  #cookie-consent .cc-wrap{max-width:var(--max);margin:0 auto;padding:16px 22px;display:flex;flex-direction:column;gap:14px;align-items:flex-start}
  #cookie-consent .cc-text{color:var(--text);font-size:14.5px;line-height:1.55;margin:0}
  #cookie-consent .cc-text a{color:var(--accent-text);text-decoration:underline}
  #cookie-consent .cc-actions{display:flex;gap:12px;width:100%}
  #cookie-consent .cc-actions .btn{flex:1;min-height:44px}
  @media(min-width:560px){
    #cookie-consent .cc-wrap{flex-direction:row;align-items:center;justify-content:space-between}
    #cookie-consent .cc-text{flex:1}
    #cookie-consent .cc-actions{width:auto}
    #cookie-consent .cc-actions .btn{flex:0 0 auto}
  }

  /* Legal / privacy page. */
  .legal{padding:40px 0 64px}
  .legal .doc{max-width:760px;margin:0 auto}
  .legal h1{font-family:var(--font);font-size:clamp(30px,5vw,44px);color:var(--accent-text);line-height:1.1;font-stretch:125%}
  .legal h2{font-family:var(--font);font-size:clamp(20px,3vw,26px);color:var(--accent-text);margin:34px 0 10px}
  .legal .updated{color:var(--muted);font-size:14px;margin-top:10px}
  .legal p,.legal li{color:var(--text);font-size:16px;line-height:1.7}
  .legal ul{margin:8px 0 8px 22px}
  .legal li{margin:6px 0}
  .legal a{color:var(--accent-text);text-decoration:underline}
  .legal .lead{font-size:17.5px;color:var(--muted);margin-top:16px}
  .cookie-box{margin-top:16px;padding:20px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2)}
