/* ==========================================================================
   Nayat Herbal Clinic — public website
   Standalone from app.css. Brand continuity, marketing register.
   Signature: the root-spine, a hairline that branches to a node at each
   section, taken from the roots in the clinic's own mark.
   ========================================================================== */

:root {
  /* Colour — the clinic's own greens, plus the system's paper mint.
     Deliberately not the warm-cream/terracotta default. */
  --ink-deep:  #06251c;   /* hero ground, near-black pine */
  --pine:      #0e3a32;   /* system continuity */
  --root:      #046a38;   /* the green in the logo */
  --leaf:      #22836f;   /* mid green, links and rules */
  --brass:     #c9a24b;   /* accent, used sparingly */
  --mint:      #f4f7f5;   /* page ground */
  --sage:      #cbdcd2;   /* hairlines, washes */
  --ink:       #132521;   /* body text */
  --ink-soft:  #4d635c;   /* secondary text */
  --paper:     #ffffff;

  --display: 'Fraunces', Georgia, serif;
  --body:    'Public Sans', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 48px);
  --rail: 56px;                     /* width of the root-spine column */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--mint);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--root); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ---- Type scale -------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  color: var(--pine);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.35rem); letter-spacing: -0.01em; }
p  { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--leaf);
  margin: 0 0 14px;
}
.lede { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-soft); }

/* ---- Layout ------------------------------------------------------------ */

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(64px, 9vw, 116px); }
.section + .section { padding-top: 0; }

/* ---- Signature: the root-spine ---------------------------------------- */

.rooted { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }

.rooted > .spine {
  position: relative;
}
/* the hairline itself */
.rooted > .spine::before {
  content: '';
  position: absolute;
  left: 11px; top: 6px; bottom: -1px;
  width: 1px;
  background: linear-gradient(180deg, var(--sage), var(--sage) 82%, transparent);
}
/* the node where this section attaches */
.rooted > .spine::after {
  content: '';
  position: absolute;
  left: 6px; top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--mint);
  border: 1.5px solid var(--leaf);
}
.rooted.tip > .spine::before { bottom: auto; height: 34px; }

@media (max-width: 820px) {
  .rooted { grid-template-columns: 1fr; }
  .rooted > .spine { display: none; }
}

/* ---- Site header ------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 247, 245, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sage);
}
.site-head-in {
  max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gut);
  display: flex; align-items: center; gap: 18px;
}
.site-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.site-brand img { width: 38px; height: 38px; object-fit: contain; }
.site-brand b {
  font-family: var(--display); font-size: 17px; font-weight: 600;
  color: var(--pine); display: block; line-height: 1.1; letter-spacing: -.01em;
}
.site-brand span {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--leaf);
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
}
.site-nav a:hover { color: var(--pine); background: rgba(4,106,56,.07); }
.site-nav a[aria-current] { color: var(--pine); background: rgba(4,106,56,.1); font-weight: 600; }
.site-nav .staff { color: var(--ink-soft); font-size: 13.5px; opacity: .75; }

.nav-toggle {
  margin-left: auto; display: none; width: 42px; height: 42px;
  border: 1px solid var(--sage); background: var(--paper);
  border-radius: 10px; cursor: pointer; color: var(--pine);
}
@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    position: absolute; inset: 100% 0 auto; flex-direction: column;
    align-items: stretch; gap: 2px; margin: 0;
    background: var(--paper); border-bottom: 1px solid var(--sage);
    padding: 10px var(--gut) 18px;
    box-shadow: 0 18px 30px -22px rgba(6,37,28,.5);
  }
  .site-nav[hidden] { display: none; }
  .site-nav a { padding: 12px 14px; border-radius: var(--r-sm); font-size: 16px; }
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--body); font-size: 15.5px; font-weight: 600;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--root); color: #fff; }
.btn-solid:hover { background: #035c30; }
.btn-line { border-color: var(--sage); color: var(--pine); background: transparent; }
.btn-line:hover { border-color: var(--leaf); background: rgba(4,106,56,.06); }
.btn-onDark { background: var(--brass); color: var(--ink-deep); }
.btn-onDark:hover { background: #d6b163; }
.btn-lineDark { border-color: rgba(255,255,255,.28); color: #fff; }
.btn-lineDark:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.08); }

/* ---- Hero -------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--ink-deep); color: #fff;
  padding-block: clamp(72px, 11vw, 140px);
}
.hero::after {          /* the mark, held back as ground rather than ornament */
  content: '';
  position: absolute; right: -8%; top: 50%; transform: translateY(-50%);
  width: min(560px, 52vw); aspect-ratio: 1;
  background: url('../img/logo-mark-light.png') center/contain no-repeat;
  opacity: .07; pointer-events: none;
}
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 em {
  font-style: normal; color: var(--brass);
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.hero .eyebrow { color: var(--brass); }
.hero .lede { color: rgba(255,255,255,.76); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-in { position: relative; z-index: 1; }

/* facts strip under the hero */
.facts {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: clamp(48px, 7vw, 80px); padding-top: 26px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 22px;
}
.fact b {
  display: block; font-family: var(--display); font-size: 1.7rem;
  color: var(--brass); font-weight: 600; line-height: 1;
}
.fact span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
}

/* ---- Cards ------------------------------------------------------------- */

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--sage);
  border-radius: var(--r-md); padding: 26px 24px;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card-ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(4,106,56,.09); color: var(--root); margin-bottom: 16px;
}
.card-ico svg { width: 21px; height: 21px; }

/* ---- Steps (order genuinely matters here) ------------------------------ */

.steps { counter-reset: step; display: grid; gap: 2px; }
.step {
  display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 18px;
  padding: 22px 0; border-bottom: 1px solid var(--sage);
}
.step:last-child { border-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: var(--brass); padding-top: 3px;
}
.step h3 { margin-bottom: .2em; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* ---- Products ---------------------------------------------------------- */

.products { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.product {
  background: var(--paper); border: 1px solid var(--sage); border-radius: var(--r-md);
  padding: 22px; display: flex; flex-direction: column; gap: 8px;
}
.product .cat {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--leaf);
}
.product h3 { font-size: 1.15rem; margin: 0; }
.product p { font-size: 15px; color: var(--ink-soft); margin: 0; flex: 1; }
.product .price {
  font-family: var(--mono); font-weight: 600; font-size: 17px; color: var(--pine);
  padding-top: 10px; border-top: 1px solid var(--sage); margin-top: 6px;
}

/* ---- Panels & forms ---------------------------------------------------- */

.panel {
  background: var(--paper); border: 1px solid var(--sage);
  border-radius: var(--r-lg); padding: clamp(26px, 4vw, 42px);
}
.panel-dark { background: var(--pine); color: #fff; border-color: transparent; }
.panel-dark h2, .panel-dark h3 { color: #fff; }
.panel-dark .lede, .panel-dark p { color: rgba(255,255,255,.78); }

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--pine); margin-bottom: 7px;
}
.field .req { color: var(--root); }
.control {
  width: 100%; padding: 13px 15px; font-family: var(--body); font-size: 16px;
  color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--sage); border-radius: var(--r-sm);
}
.control:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px rgba(4,106,56,.12); }
textarea.control { min-height: 118px; resize: vertical; }
.field-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.hint { font-size: 13px; color: var(--ink-soft); margin: 7px 0 0; }

.note {
  border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 24px;
  font-size: 15px; display: flex; gap: 11px; align-items: flex-start;
}
.note-ok  { background: rgba(4,106,56,.09);  border-left: 3px solid var(--root); }
.note-bad { background: rgba(214,69,51,.09); border-left: 3px solid #d64533; }

/* honeypot — present for bots, never for people */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Detail list ------------------------------------------------------- */

.dl { display: grid; gap: 0; }
.dl div {
  display: flex; justify-content: space-between; gap: 18px;
  padding: 13px 0; border-bottom: 1px solid var(--sage);
}
.dl div:last-child { border-bottom: 0; }
.dl dt { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.dl dd { margin: 0; font-weight: 600; text-align: right; }
.panel-dark .dl div { border-color: rgba(255,255,255,.14); }
.panel-dark .dl dt { color: rgba(255,255,255,.62); }

/* ---- Footer ------------------------------------------------------------ */

.site-foot { background: var(--ink-deep); color: rgba(255,255,255,.66); margin-top: clamp(64px, 8vw, 100px); }
.site-foot-in {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 72px) var(--gut) 34px;
  display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr;
}
@media (max-width: 780px) { .site-foot-in { grid-template-columns: 1fr; } }
.site-foot h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brass); margin: 0 0 14px; font-weight: 600;
}
.site-foot a { color: rgba(255,255,255,.8); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 15px; }
.site-foot img { width: 44px; margin-bottom: 14px; }
.foot-base {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px var(--gut) 26px; max-width: var(--wrap); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: 13px; color: rgba(255,255,255,.45);
}
.foot-base a { color: rgba(255,255,255,.6); }

/* ---- Motion ------------------------------------------------------------ */

.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
