/* ═══════════════════════════════════════════════════════════════════════════
   AquaBid SA — bespoke white-label theme (group site, sister of Reef Auctions SA).

   Cloned from reef-auctions-za and re-skinned from the client's one brand image
   (F:\aquabidsa\client docs\): a white "AquaBid" wordmark with a red "SA" on a
   planted tank at night. Dark (the "Night tank") is the default; light is the
   "Daylight" alt. Component CSS derives from the tokens below, so the nav, hero,
   cards, footer, auction-card embed and platform (Laravel) pages all pick up
   the palette automatically. Brand notes: F:\aquabidsa\design\BRAND.md.

   Red contrast (checked): white on --accent #e11d27 = 4.8:1, --accent-text
   #ff5257 on the dark surface = 5.5:1, light-mode red #c8161e on white = 5.9:1.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Font: Montserrat, loaded by a <link> in each page head (one family keeps it light). */

/* ───────────────────────── BRAND PALETTE ─────────────────────────────────── */
/* DB brand_primary_color = brand_secondary_color = #e11d27 (keep in step with --brand / --accent). */
:root{
  --brand:        #e11d27;   /* the wordmark's red "SA" */
  --brand-deep:   #050d0b;   /* night-tank black — the always-dark hero band */
  --accent:       #e11d27;   /* red — primary CTA / badges (white text on it) */
  --accent-rgb:   225 29 39; /* red as "R G B" for soft tints */
  --on-accent:    #ffffff;   /* white sits ON the red */
  --radius:       12px;      /* buttons / inputs; cards use 22px below */
  --max:          1180px;
  --font:         "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-label:   var(--font);
}

/* ─────────────────── Semantic tokens — Night tank (dark, DEFAULT) ─────────── */
:root{
  --bg:#050d0b; --surface:#0b1814; --surface-2:#10221c;
  --text:#eef6f2; --muted:#9db3aa; --line:#1f3a31;
  --accent-text:#ff5257;              /* brighter red for TEXT on dark (5.5:1) */
  --accent-text-on:var(--on-accent);  /* white on the red fill */
  --header-bg:rgba(5,13,11,.78);
  color-scheme:dark;
}
/* ─────────────────── Semantic tokens — Daylight (light) ───────────────────── */
:root[data-theme="light"]{
  --brand:#c8161e; --accent:#c8161e; --accent-rgb:200 22 30; --on-accent:#ffffff;
  --bg:#f2f6f4; --surface:#ffffff; --surface-2:#e6efeb;
  --text:#0a1612; --muted:#4a5d56; --line:#c9d8d1;
  --accent-text:var(--brand);
  --accent-text-on:#ffffff;
  --header-bg:rgba(255,255,255,.88);
  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:72px;position:relative}
  .brand{display:flex;align-items:center;gap:12px}
  /* Text wordmark (no DB logo) — matches the platform's two-tone wordmark across the seam. */
  .brand .brand-name{font-family:var(--font);font-weight:800;font-style:italic;font-size:1.5rem;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 the night tank: plant-green glow left, betta-red glow right) ---- */
  .hero{position:relative;overflow:hidden;background:
    radial-gradient(70% 80% at 0% 0%,rgba(34,120,64,.55) 0%,rgba(34,120,64,0) 60%),
    radial-gradient(60% 70% at 100% 10%,rgba(225,29,39,.30) 0%,rgba(225,29,39,0) 60%),
    radial-gradient(60% 60% at 85% 100%,rgba(37,99,235,.22) 0%,rgba(37,99,235,0) 60%),
    #050d0b}
  .hero .wrap{position:relative;z-index:2;padding:40px 20px 56px;text-align:center}
  /* The client's brand image, shown whole (its wordmark is part of the picture). */
  .hero .poster{display:block;margin:0 auto 30px;max-width:980px;border-radius:14px;overflow:hidden;
    box-shadow:0 0 0 1px rgba(255,255,255,.08),0 24px 60px rgba(0,0,0,.55),0 0 80px rgba(225,29,39,.18)}
  .hero .poster img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;background:#050d0b}
  .eyebrow{display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:4px 10px;font-family:var(--font-label);font-size:.85rem;letter-spacing:.22em;text-transform:uppercase;color:#dfeee7;font-weight:700;margin-bottom:16px}
  .eyebrow .dot{width:6px;height:6px;border-radius:50%;background:#ff3b41;box-shadow:0 0 0 3px rgba(255,59,65,.18)}
  h1{font-family:var(--font);font-size:2.4rem;line-height:1.1;color:#fff;font-weight:800;letter-spacing:-.01em;max-width:18ch;margin:0 auto}
  h1 .accent{color:#ff5257}
  .hero p.lead{margin:18px auto 28px;max-width:720px;font-size:1.15rem;line-height:1.55;color:#cfe3d9}
  .hero-actions .btn{min-height:56px;padding:0 30px;font-size:1.1rem}
  .hero-actions{display:flex;flex-direction:column;gap:12px;max-width:420px;margin:0 auto}
  .hero .btn-ghost{border-color:rgba(255,255,255,.28);color:#fff}
  .hero .btn-ghost:hover{border-color:#ff5257;color:#ff5257}

  /* ---- 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.8rem;font-weight:800;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,.25)}
  .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.plant{background:#4ade80;color:#052e16}
  .card .ico.red{background:#e11d27;color:#fff}
  .card .ico.betta{background:#3b82f6;color:#fff}
  .card .ico.wood{background:#f59e0b;color:#1f1300}
  .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)} }

  /* 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[hidden]{display:none}   /* the embed hides a card whose profile field is empty */
  .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: always the night tank (like the hero), no photo — text forced light in both themes. */
  footer{position:relative;overflow:hidden;background:
    radial-gradient(60% 120% at 0% 100%,rgba(34,120,64,.45) 0%,rgba(34,120,64,0) 60%),
    radial-gradient(50% 100% at 100% 0%,rgba(225,29,39,.18) 0%,rgba(225,29,39,0) 60%),
    #050d0b;border-top:1px solid var(--line);padding:44px 0 30px;color:#cfe3d9;font-size:.88rem}
  footer .wrap{position:relative;z-index:2}
  footer p{margin:0}
  /* 2 columns: brand name + slogan | contact buttons; small-print bar below. Stacks centred on mobile. */
  footer .foot-grid{display:flex;flex-direction:column;gap:18px;align-items:center;text-align:center}
  footer .foot-brand{display:flex;flex-direction:column;gap:6px}
  footer .brand-name{font-family:var(--font);font-weight:800;font-style:italic;font-size:1.8rem;color:#fff;letter-spacing:-.01em}
  footer .brand-name span{color:#ff5257}
  footer .slogan{font-family:var(--font-label);letter-spacing:.18em;text-transform:uppercase;font-size:.8rem;color:#cfe3d9}
  footer .foot-col{display:flex;flex-direction:column;gap:10px;align-items:center}
  footer .foot-bottom{margin-top:26px;padding-top:18px;border-top:1px solid rgba(255,255,255,.14);display:flex;flex-direction:column;gap:8px;align-items:center;text-align:center}
  footer .built{font-size:.8rem;opacity:.85}
  footer a{color:rgba(255,255,255,.8)}
  footer a:hover{color:#ff5257}
  @media(min-width:820px){
    footer .foot-grid{flex-direction:row;align-items:center;text-align:left;gap:28px}
    footer .brand-name{font-size:2.2rem}
    footer .foot-col{margin-left:auto;align-items:flex-end}
    footer .foot-bottom{flex-direction:row;justify-content:space-between;text-align:left}
  }

  /* ---- Auction embed (inherits themed tokens; ONE embed, every client) ---- */
  /* The embed uses ONE accent for button fills AND price text. Red can't pass both on dark,
     so fills use the deep red (white text, 4.8:1) and card prices get the brighter text red. */
  #bidall-auction{
    --bidall-accent:var(--accent);
    --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;
  }
  #bidall-auction .bidall-embed__price{color:var(--accent-text)}
  .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.4rem}
    .eyebrow{font-size:.95rem}
    .hero p.lead{font-size:1.3rem}
    .hero-actions .btn{min-height:60px;padding:0 36px;font-size:1.18rem}
    .nav{min-height:80px}
    .brand .brand-name{font-size:1.7rem}
    .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:56px 20px 88px}
    .hero .poster{border-radius:22px;margin-bottom:40px}
    .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}
  }
  /* Wide screens: copy left, brand poster right, so the heading + CTA stay above the fold. */
  @media(min-width:1024px){
    .hero .wrap:has(.poster){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:48px;align-items:center;text-align:left;padding:64px 20px 80px}
    .hero .poster{order:2;margin:0}
    .hero .intro{order:1}
    .hero .intro .eyebrow{justify-content:flex-start}
    .hero .intro h1{margin:0;max-width:none;font-size:3rem}
    .hero .intro p.lead{margin:18px 0 28px;font-size:1.15rem}
    .hero .intro .hero-actions{justify-content:flex-start}
  }

  /* 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}}
  @media (prefers-reduced-motion: reduce){.wa-burst{animation:none}}

  /* Back-to-top (added by to-top.js). Bottom-left so it never sits on the WhatsApp burst (right). */
  .to-top{position:fixed;left:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:80;width:48px;height:48px;border:0;border-radius:50%;
    display:flex;align-items:center;justify-content:center;cursor:pointer;background:var(--accent);color:var(--on-accent);
    box-shadow:0 0 0 1px rgb(var(--accent-rgb) / .45),0 10px 30px rgba(0,0,0,.35);
    opacity:0;visibility:hidden;transform:translateY(12px);transition:opacity .2s,transform .2s,visibility .2s}
  .to-top.is-visible{opacity:1;visibility:visible;transform:none}
  .to-top:hover{opacity:.92}
  .to-top:focus-visible{outline:3px solid var(--accent-text);outline-offset:3px}
  .to-top svg{width:22px;height:22px}
  @media (prefers-reduced-motion: reduce){.to-top{transition:none}}

  /* 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;margin:0}
  .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)}
