/* ============================================================
   AyurSetu design system
   Palette: deep leaf green, turmeric gold, sandal paper, iron ink
   Type: Fraunces (display serif) + Karla (body)
   Signature: the tri-dot dosha mark (Vata/Pitta/Kapha) reused as
   progress markers, meters and section eyebrows.
   ============================================================ */

:root {
  --leaf:   #2E5E4E;   /* primary — deep herbal green */
  --leaf-d: #1F4237;
  --gold:   #C98A1B;   /* accent — turmeric */
  --gold-s: #F3E3C2;
  --clay:   #8A4B2E;   /* kapha earth */
  --paper:  #F7F4EC;   /* sandal paper background */
  --card:   #FFFFFF;
  --ink:    #22301F;
  --ink-2:  #55614F;
  --line:   #E3DECE;
  --danger: #A93226;
  --ok:     #2E7D4F;
  --r-s: 8px; --r-m: 14px; --r-l: 22px;
  --shadow: 0 6px 24px rgba(34, 48, 31, .08);
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: 'Karla', system-ui, sans-serif;
  font-size: 17px; line-height: 1.65;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: 'Fraunces', Georgia, serif; line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 650; letter-spacing: -.01em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; margin: 0 0 .5em; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 .4em; }
p  { margin: 0 0 1em; }
a  { color: var(--leaf); text-underline-offset: 3px; }
a:hover { color: var(--leaf-d); }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-s); z-index: 200; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-head { position: sticky; top: 0; z-index: 100; background: rgba(247,244,236,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: 'Fraunces', serif; font-weight: 700; font-size: 1.35rem; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { text-decoration: none; font-weight: 500; color: var(--ink-2); padding: 6px 2px; }
.site-nav a:hover { color: var(--leaf-d); }
.nav-cta { background: var(--leaf); color: #fff !important; padding: 10px 18px !important; border-radius: 999px; }
.nav-cta:hover { background: var(--leaf-d); }
.nav-cta.ghost { background: transparent; color: var(--leaf) !important; border: 1.5px solid var(--leaf); }
.nav-toggle { display: none; background: none; border: 0; padding: 12px; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 4px; box-shadow: var(--shadow); }
  .site-nav a { padding: 13px 8px; font-size: 1.05rem; border-radius: var(--r-s); }
  .site-nav a:hover { background: var(--gold-s); }
  body.nav-open .site-nav { display: flex; }
}

/* ---------- Buttons ---------- */
/* The hidden attribute must always win, even over display rules like .btn —
   without this, the wizard's Continue button stays visible on the final step. */
[hidden] { display: none !important; }

.btn { display: inline-block; background: var(--leaf); color: #fff; border: 0; font: inherit; font-weight: 700; padding: 13px 26px; border-radius: 999px; cursor: pointer; text-decoration: none; text-align: center; min-height: 48px; }
.btn:hover { background: var(--leaf-d); color: #fff; }
.btn.gold { background: var(--gold); color: #2b1d05; }
.btn.gold:hover { filter: brightness(.95); }
.btn.ghost { background: transparent; color: var(--leaf); border: 1.5px solid var(--leaf); }
.btn.sm { padding: 9px 18px; min-height: 40px; font-size: .95rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--clay); margin-bottom: 14px; }
.eyebrow::before { content: ''; width: 26px; height: 8px; background: radial-gradient(circle at 4px 4px, var(--gold) 3px, transparent 3.5px), radial-gradient(circle at 13px 4px, var(--leaf) 3px, transparent 3.5px), radial-gradient(circle at 22px 4px, var(--clay) 3px, transparent 3.5px); }
.hero p.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 26px; }
.hero-card h3 { display: flex; gap: 8px; align-items: center; }
.hero-steps { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: st; }
.hero-steps li { counter-increment: st; position: relative; padding: 10px 0 10px 44px; border-top: 1px dashed var(--line); color: var(--ink-2); }
.hero-steps li:first-child { border-top: 0; }
.hero-steps li::before { content: counter(st); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-s); color: var(--clay); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding: 36px 0 24px; } }

/* ---------- Sections & cards ---------- */
.section { padding: 48px 0; }
.section.tint { background: #EFEAD9; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.c4, .grid.c3 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 22px; box-shadow: 0 2px 10px rgba(34,48,31,.04); display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); }
.card .tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--gold-s); color: var(--clay); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.card a.stretch { text-decoration: none; color: inherit; }
.card p.meta { color: var(--ink-2); font-size: .95rem; flex: 1; }
.card .cta { margin-top: 10px; font-weight: 700; }

/* dosha chips */
.dosha-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chip { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: capitalize; }
.chip.vata  { background: #E8EEF6; color: #33506B; }
.chip.pitta { background: #FBE9DC; color: #9A4A18; }
.chip.kapha { background: #E5EFE2; color: #37603B; }

/* ---------- Product cards ---------- */
.pcard .price { font-size: 1.2rem; font-weight: 700; }
.pcard .mrp { color: var(--ink-2); text-decoration: line-through; font-size: .92rem; margin-left: 8px; font-weight: 400; }
.pcard .pimg { height: 150px; border-radius: var(--r-s); background: linear-gradient(135deg, var(--gold-s), #EDE5CE); display: grid; place-items: center; margin-bottom: 14px; font-family: 'Fraunces', serif; color: var(--clay); font-size: 1.6rem; }
.pcard .pimg img { width: 100%; height: 150px; object-fit: cover; border-radius: var(--r-s); }

/* ---------- Search bar ---------- */
.searchbar { display: flex; gap: 10px; margin: 20px 0; }
.searchbar input { flex: 1; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--r-s);
  padding: 12px 14px; width: 100%; min-height: 48px;
}
input:focus, select:focus, textarea:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px rgba(46,94,78,.15); }
label { font-weight: 700; display: block; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.hint { color: var(--ink-2); font-size: .9rem; margin-top: 4px; }

/* ---------- Notices ---------- */
.notice { border-radius: var(--r-m); padding: 14px 18px; margin: 14px 0; border: 1px solid; }
.notice.warn { background: #FBEFEC; border-color: #E4B7AD; color: #7A2A1D; }
.notice.info { background: #EDF3EF; border-color: #BFD6C8; color: #1F4237; }
.notice.ok   { background: #EDF6EE; border-color: #BAD8BF; color: #24582F; }

/* ---------- Consultation wizard ---------- */
.wizard { max-width: 760px; margin: 0 auto; }
.wiz-progress { display: flex; align-items: center; gap: 6px; margin: 26px 0 18px; }
.wiz-progress .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: transform .2s, background .2s; }
.wiz-progress .dot.done { background: var(--gold); }
.wiz-progress .dot.now  { background: var(--leaf); transform: scale(1.35); }
.wiz-progress .bar { flex: 1; height: 2px; background: var(--line); }
.wiz-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 30px; box-shadow: var(--shadow); }
.wiz-step h2 { margin-bottom: 4px; }
.wiz-step .doc-note { color: var(--ink-2); margin-bottom: 22px; font-size: 1.02rem; }
.wiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }

.opt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .opt-grid { grid-template-columns: 1fr; } .wiz-step { padding: 22px 18px; } }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt .opt-box { display: block; border: 1.5px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; min-height: 52px; background: #fff; cursor: pointer; font-weight: 500; }
.opt input:checked + .opt-box { border-color: var(--leaf); background: #EDF3EF; box-shadow: inset 0 0 0 1px var(--leaf); }
.opt input:focus-visible + .opt-box { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt .sub { display: block; font-weight: 400; color: var(--ink-2); font-size: .9rem; margin-top: 2px; }

/* dosha result meters */
.meter { margin: 10px 0 16px; }
.meter .row { display: flex; justify-content: space-between; font-weight: 700; text-transform: capitalize; }
.meter .track { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 4px; }
.meter .fill { height: 100%; border-radius: 999px; }
.meter.vata  .fill { background: #33506B; }
.meter.pitta .fill { background: #C96A1B; }
.meter.kapha .fill { background: var(--leaf); }

.result-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; margin-bottom: 20px; }
.ai-box { white-space: pre-wrap; background: #FCFAF4; border: 1px dashed var(--gold); border-radius: var(--r-m); padding: 20px; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid var(--gold-s); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -4px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Remedy detail ---------- */
.remedy-hero { background: linear-gradient(180deg, #EFEAD9, var(--paper)); padding: 44px 0 30px; }
.remedy-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
@media (max-width: 900px) { .remedy-grid { grid-template-columns: 1fr; } }
.rem-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); padding: 24px; margin-bottom: 18px; }
.rem-section h2 { font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.rem-section h2 .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--gold-s); display: inline-grid; place-items: center; font-size: 1rem; }
.sidebar-card { background: var(--leaf); color: #F3EFE2; border-radius: var(--r-l); padding: 26px; position: sticky; top: 84px; }
.sidebar-card h3 { color: #fff; }
.sidebar-card a.btn { background: var(--gold); color: #2b1d05; width: 100%; margin-top: 10px; }
.sidebar-card .src { font-size: .85rem; opacity: .85; margin-top: 14px; }

/* two-column do/avoid */
.do-avoid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .do-avoid { grid-template-columns: 1fr; } }
.do-avoid .col { border-radius: var(--r-m); padding: 18px; }
.do-avoid .do    { background: #EDF6EE; border: 1px solid #BAD8BF; }
.do-avoid .avoid { background: #FBEFEC; border: 1px solid #E4B7AD; }

/* ---------- Tables (admin) ---------- */
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: var(--leaf); color: #fff; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; }
table.data tr:hover td { background: #FBF9F2; }
.table-scroll { overflow-x: auto; }

/* ---------- Footer ---------- */
.site-foot { background: var(--leaf-d); color: #D9E2D6; margin-top: 56px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; padding: 44px 20px 24px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { font-family: 'Fraunces', serif; font-size: 1.4rem; color: #fff; margin: 0; }
.foot-tag { color: var(--gold-s); margin: 4px 0 12px; }
.foot-disc { font-size: .85rem; opacity: .8; }
.foot-h { font-weight: 700; color: #fff; margin-bottom: 8px; }
.site-foot nav a { display: block; color: #D9E2D6; text-decoration: none; padding: 5px 0; }
.site-foot nav a:hover { color: var(--gold-s); }
.foot-base { border-top: 1px solid rgba(255,255,255,.15); padding: 16px 20px; font-size: .85rem; opacity: .8; }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { background: var(--leaf-d); color: #D9E2D6; padding: 22px 0; }
.admin-side .brand-name { color: #fff; padding: 0 20px 18px; display: block; }
.admin-side a { display: block; color: #D9E2D6; text-decoration: none; padding: 11px 20px; font-weight: 500; }
.admin-side a.on, .admin-side a:hover { background: rgba(255,255,255,.1); color: #fff; border-left: 3px solid var(--gold); padding-left: 17px; }
.admin-main { padding: 28px; background: var(--paper); }
@media (max-width: 800px) { .admin-shell { grid-template-columns: 1fr; } .admin-side { display: flex; overflow-x: auto; padding: 0; } .admin-side a { white-space: nowrap; } .admin-side .brand-name { display: none; } }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; }
.stat .n { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 700; color: var(--leaf); }
.stat .l { color: var(--ink-2); font-size: .9rem; }

/* ---------- FAQ ---------- */
details.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--r-m); padding: 4px 20px; margin-bottom: 10px; }
details.faq summary { font-weight: 700; cursor: pointer; padding: 14px 0; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; float: right; font-size: 1.3rem; color: var(--gold); }
details.faq[open] summary::after { content: '–'; }

/* utility */
.center { text-align: center; }
.mt0{margin-top:0}.mb0{margin-bottom:0}
.muted { color: var(--ink-2); }
.badge-src { display: inline-block; background: #EFEAD9; color: var(--clay); border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 700; }
