/* premadefans.com — design system (LOCKED 2026-06-21, James).
   Direction: Vietnamese (Lii Lash family) — mint/teal accent on warm white, near-retail
   polish kept at 2B factory trust density. NOT DTC.
   Standing bans (bridge/CLAUDE.md): no gradients, no emoji, no pill badges,
   no GREEN CTA (CTA = ink), no pure-white wash, no "beautified" WhatsApp bubble.
   teal = brand/section accent ONLY. */

:root {
  --ink: #16201d;          /* text + primary CTA (deep, near-black green-ink, NOT green) */
  --ink-soft: #2c3a36;
  --teal: #1f8f82;         /* brand accent — labels, rules, links, icons */
  --teal-deep: #135a51;    /* announcement bar, accents on tint */
  --teal-wash: #eaf4f1;    /* tinted section background */
  --teal-line: #cfe4df;
  --warm: #faf7f1;         /* page background (warm white, never pure white) */
  --panel: #fffdfa;        /* card surface */
  --line: #e6e0d6;         /* hairlines on warm */
  --muted: #5e645f;
  --amber: #b86a36;        /* warm accent — used sparingly for emphasis, never as CTA fill */
  --max: 1100px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--warm); -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.01em; font-weight: 700; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ---- Announcement bar ---- */
.anno { background: var(--teal-deep); color: #eafaf6; font-size: .82rem; letter-spacing: .01em; }
.anno .wrap { display: flex; flex-wrap: wrap; gap: .35rem 1.4rem; justify-content: center; padding: .5rem 1.5rem; }
.anno b { font-weight: 600; color: #fff; }
.anno span { white-space: nowrap; }

/* ---- Header / nav ---- */
.site-header { background: var(--warm); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); }
.brand b { color: var(--teal); font-weight: 800; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.15rem; }
.nav a { color: var(--ink-soft); font-size: .92rem; font-weight: 500; }
.nav a:hover { color: var(--teal-deep); text-decoration: none; }
.nav .nav-cta { border: 1px solid var(--ink); color: var(--ink); padding: .4rem .8rem; border-radius: var(--radius); font-weight: 600; }
.nav .nav-cta:hover { background: var(--ink); color: #fff; }

/* ---- Buttons (CTA = ink, never green) ---- */
.btn { display: inline-block; font-size: .98rem; font-weight: 600; padding: .72rem 1.3rem; border-radius: var(--radius); border: 1px solid var(--ink); color: var(--ink); background: transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #0d1816; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: #efe9df; }
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.4rem 0; }

/* ---- Section scaffolding ---- */
.section { padding: 3.4rem 0; }
.section--tint { background: var(--teal-wash); border-top: 1px solid var(--teal-line); border-bottom: 1px solid var(--teal-line); }
.section--ink { background: var(--ink); color: #eef2f0; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink a { color: #9fe0d4; }
.eyebrow { display: inline-block; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin: 0 0 .6rem; }
.section--ink .eyebrow { color: #6fd0c0; }
.section h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); margin: 0 0 .5rem; }
.section > .wrap > p.lead, p.lead { color: var(--muted); font-size: 1.08rem; max-width: 56ch; margin: .2rem 0 1.4rem; }
.section--ink p.lead { color: #c4cfca; }

/* ---- Hero ---- */
.hero { padding: 3.6rem 0 2.6rem; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: .3rem 0 .7rem; max-width: 18ch; }
.hero .sub { color: var(--ink-soft); font-size: 1.18rem; max-width: 60ch; margin: 0 0 .4rem; }
.hero .spec-line { color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; margin: .6rem 0 0; }
.hero .spec-line b { color: var(--teal-deep); }

/* ---- Trust pillars ---- */
.pillars { display: grid; gap: 1px; grid-template-columns: repeat(6, 1fr); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillar { background: var(--panel); padding: 1.1rem 1rem; }
.pillar .k { font-size: .92rem; font-weight: 700; color: var(--ink); margin: 0 0 .15rem; }
.pillar .v { font-size: .82rem; color: var(--muted); margin: 0; line-height: 1.45; }
@media (max-width: 860px) { .pillars { grid-template-columns: repeat(2, 1fr); } }

/* ---- Generic card grid ---- */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.card h3 { font-size: 1.08rem; margin: 0 0 .4rem; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }
.card a.more { display: inline-block; margin-top: .7rem; font-size: .88rem; font-weight: 600; color: var(--teal-deep); }

/* ---- D-count selector ---- */
.dgrid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dgrid a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--ink); }
.dgrid a:hover { border-color: var(--teal); text-decoration: none; }
.dgrid a .d { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.dgrid a .d small { font-size: .7rem; font-weight: 600; color: var(--teal); letter-spacing: .08em; }
.dgrid a .desc { display: block; font-size: .82rem; color: var(--muted); margin-top: .25rem; }

/* ---- Spec table ---- */
.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-table caption { text-align: left; font-size: .8rem; color: var(--muted); padding: 0 0 .6rem; }
.spec-table th, .spec-table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table thead th { background: var(--teal-wash); color: var(--ink); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table td.code { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* ---- Numbered process / QC flow ---- */
.flow { list-style: none; counter-reset: step; padding: 0; margin: 1.4rem 0 0; display: grid; gap: 1px; grid-template-columns: repeat(5, 1fr); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.flow li { background: var(--panel); padding: 1.2rem 1rem; counter-increment: step; }
.flow li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--teal-wash); color: var(--teal-deep); font-weight: 800; font-size: .9rem; margin-bottom: .5rem; }
.flow li b { display: block; font-size: .95rem; margin-bottom: .2rem; }
.flow li span { font-size: .82rem; color: var(--muted); }
@media (max-width: 820px) { .flow { grid-template-columns: 1fr 1fr; } }

/* ---- Glossary ---- */
.glossary { display: grid; gap: 1px; grid-template-columns: 1fr 1fr; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0; }
.glossary div { background: var(--panel); padding: 1rem 1.1rem; }
.glossary dt { font-weight: 700; font-size: .95rem; color: var(--ink); }
.glossary dd { margin: .2rem 0 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 680px) { .glossary { grid-template-columns: 1fr; } }

/* ---- Media / factory photo slots (placeholders until real assets land) ---- */
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.media-slot { aspect-ratio: 4 / 3; background: var(--teal-wash); border: 1px dashed var(--teal-line); border-radius: var(--radius); display: grid; place-items: center; color: var(--teal-deep); font-size: .82rem; text-align: center; padding: 1rem; }

/* ---- Compliance / COA badges (text, not pills) ---- */
.proof-row { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.2rem; font-size: .9rem; }
.proof-row span { color: var(--ink-soft); }
.proof-row span b { color: var(--teal-deep); }

/* ---- Callout ---- */
.callout { border-left: 3px solid var(--teal); background: var(--panel); padding: 1.1rem 1.3rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.4rem 0; }
.callout p { margin: 0; color: var(--ink-soft); }

/* ---- Prose (blog / long copy) ---- */
.prose { max-width: 70ch; }
.prose h2 { margin: 2rem 0 .6rem; font-size: 1.4rem; }
.prose h3 { margin: 1.5rem 0 .4rem; font-size: 1.12rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; }

/* ---- Breadcrumb ---- */
.crumb { font-size: .82rem; color: var(--muted); padding: 1rem 0 0; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--teal-deep); }

/* ---- Inquiry form ---- */
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; max-width: 560px; }
.field { display: block; margin: 0 0 .9rem; }
.field span { display: block; font-size: .86rem; font-weight: 600; margin-bottom: .3rem; }
.field input, .field textarea, .field select { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; background: var(--warm); color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }

/* ---- Footer ---- */
.site-footer { background: var(--ink); color: #c8d0cc; font-size: .9rem; padding: 2.6rem 0 1.8rem; margin-top: 0; }
.site-footer .cols { display: grid; gap: 1.6rem; grid-template-columns: 2fr 1fr 1fr 1fr; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .7rem; }
.site-footer a { color: #c8d0cc; display: block; padding: .15rem 0; }
.site-footer a:hover { color: #fff; }
.site-footer .fbrand { font-weight: 800; font-size: 1.1rem; color: #fff; }
.site-footer .fbrand b { color: var(--teal); }
.site-footer .legal { border-top: 1px solid #2c3a36; margin-top: 1.8rem; padding-top: 1.2rem; color: #8a938e; font-size: .82rem; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---- Utilities ---- */
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.center { text-align: center; }
.soft-link { color: var(--muted); font-size: .95rem; }

/* ---- WhatsApp float (functional, restrained — NOT a glossy green bubble) ---- */
.wa-float { position: fixed; left: 1rem; bottom: 1rem; z-index: 40; background: var(--ink); color: #fff; padding: .55rem .9rem; border-radius: var(--radius); font-size: .85rem; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.wa-float:hover { background: #0d1816; text-decoration: none; }

/* ---- Bot widget (chat.js) — re-themed to brand, restrained ---- */
.chat-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; border: none; cursor: pointer; background: var(--ink); color: #fff; border-radius: var(--radius); padding: .6rem 1rem; font: inherit; font-weight: 600; display: flex; align-items: center; gap: .45rem; box-shadow: 0 4px 16px rgba(0,0,0,.18); }
.chat-fab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); display: inline-block; }
.chat-panel { position: fixed; right: 1rem; bottom: 4.2rem; z-index: 50; width: min(370px, calc(100vw - 2rem)); height: min(540px, 72vh); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 48px rgba(0,0,0,.22); display: none; flex-direction: column; overflow: hidden; }
.chat-panel.open { display: flex; }
.chat-head { display: flex; align-items: center; gap: .5rem; padding: .8rem .95rem; border-bottom: 1px solid var(--line); background: var(--teal-wash); }
.chat-head .who { font-weight: 700; font-size: .98rem; color: var(--ink); }
.chat-head .who span { display: block; font-weight: 400; font-size: .72rem; color: var(--muted); }
.chat-wa { margin-left: auto; font-size: .8rem; font-weight: 600; border: 1px solid var(--ink); color: var(--ink); padding: .28rem .6rem; border-radius: var(--radius); }
.chat-wa:hover { background: var(--ink); color: #fff; text-decoration: none; }
.chat-close { background: none; border: none; font-size: 1.35rem; cursor: pointer; color: var(--muted); line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; }
.chat-row { display: flex; } .chat-row.user { justify-content: flex-end; }
.chat-bubble { max-width: 82%; padding: .55rem .75rem; border-radius: 10px; font-size: .9rem; background: var(--teal-wash); color: var(--ink); }
.chat-row.user .chat-bubble { background: var(--ink); color: #fff; }
.chat-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .9rem .6rem; }
.chat-chip { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: var(--warm); border-radius: var(--radius); padding: .35rem .6rem; cursor: pointer; color: var(--ink); }
.chat-chip:hover { border-color: var(--teal); }
.chat-input-row { display: flex; border-top: 1px solid var(--line); }
.chat-input { flex: 1; border: none; padding: .75rem; font: inherit; background: var(--panel); color: var(--ink); }
.chat-input:focus { outline: none; }
.chat-send { border: none; background: var(--ink); color: #fff; padding: 0 1.05rem; cursor: pointer; font-size: 1.1rem; }
