/* ============================================================
   drh. Rajanti & Friends Clinic — light theme design system
   All narrative copy on pages = [CLIENT COPY] placeholders (.ph)
   ============================================================ */

:root {
  --paper: #FAF7F1;
  --card: #FFFFFF;
  --mist: #EDF5F1;
  --sand: #F4ECDF;
  --teal: #0E7C6B;
  --teal-deep: #0A5A4E;
  --leaf: #5FB89E;
  --amber: #E8A33D;
  --ink: #1E3833;
  --text: #44544F;
  --muted: #7C8C86;
  --line: #E2DED4;
  --ph-line: #C9C2B2;
  --night: #131022;
  --rt-grad: linear-gradient(120deg, #5B4FB5 0%, #0E7C6B 100%);
  --shadow: 0 14px 40px rgba(30, 56, 51, 0.09);
  --radius: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.65;
  padding-top: var(--cl-nav-h, 72px);
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.15;
  font-weight: 800;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.4rem); }

/* ---------- section rhythm ---------- */
.blk { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.blk-mist { background: var(--mist); }
.blk-sand { background: var(--sand); }
.blk-night {
  background: radial-gradient(ellipse at 30% 0%, #221a44 0%, var(--night) 60%);
  color: #E9E4F4;
}
.blk-night h2, .blk-night h3 { color: #fff; }

.eyebrow {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.9rem;
}
.blk-night .eyebrow { color: var(--leaf); }

.lead { font-size: 1.08rem; max-width: 44rem; }

.section-head { max-width: 46rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- placeholders ---------- */
.ph {
  border: 1.5px dashed var(--ph-line);
  border-radius: 14px;
  padding: 0.5em 0.8em;
  color: var(--muted);
  font-style: italic;
  background: rgba(30, 56, 51, 0.03);
}
h1.ph, h2.ph { font-weight: 700; font-style: italic; }
h1.ph { font-size: clamp(1.5rem, 3.4vw, 2.4rem); }
h2.ph { font-size: clamp(1.25rem, 2.6vw, 1.8rem); }
.blk-night .ph { border-color: rgba(255, 255, 255, 0.3); color: #B7AFD6; background: rgba(255, 255, 255, 0.05); }

.asset-note {
  border: 1.5px dashed var(--ph-line);
  border-radius: var(--radius);
  background: rgba(30, 56, 51, 0.035);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  aspect-ratio: 4 / 3;
  width: 100%;
}
.asset-note.wide { aspect-ratio: 16 / 9; }
.asset-note.portrait { aspect-ratio: 3 / 4; }
.asset-note.square { aspect-ratio: 1; }
.blk-night .asset-note { border-color: rgba(255, 255, 255, 0.3); color: #B7AFD6; background: rgba(255, 255, 255, 0.05); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.85em 1.8em;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, filter 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 8px 22px rgba(14, 124, 107, 0.28); }
.btn-teal:hover { background: var(--teal-deep); transform: translateY(-2px); }
.btn-rt { background: var(--rt-grad); color: #fff; box-shadow: 0 8px 24px rgba(91, 79, 181, 0.32); }
.btn-rt:hover { filter: brightness(1.12); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.blk-night .btn-ghost { color: #E9E4F4; border-color: rgba(255, 255, 255, 0.3); }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* ---------- grids & cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--mist);
  color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 0.94rem; }

/* feature card (signature programs) */
.feature-card {
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
}
.feature-card.night {
  background: radial-gradient(ellipse at 25% 0%, #2a2152 0%, var(--night) 65%);
  color: #E9E4F4;
  border: 1px solid rgba(91, 79, 181, 0.45);
  box-shadow: 0 18px 50px rgba(38, 28, 90, 0.3);
}
.feature-card.night h3 { color: #fff; font-size: 1.5rem; }
.feature-card.mist {
  background: var(--mist);
  border: 1px solid #DCEAE3;
}
.feature-card.mist h3 { font-size: 1.5rem; }
.feature-card .tag {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35em 0.9em;
  border-radius: 999px;
}
.feature-card.night .tag { background: var(--rt-grad); color: #fff; }
.feature-card.mist .tag { background: var(--teal); color: #fff; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; text-align: center; }
.stat .num {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  color: var(--teal);
}

/* numbered steps */
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step .n {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step h4 { margin-bottom: 0.3rem; }

/* quotes */
.quote-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--leaf);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}
.quote-card .who { margin-top: 0.9rem; font-size: 0.85rem; color: var(--muted); font-weight: 700; }

/* chips */
.chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3em 0.9em;
  border-radius: 999px;
  background: var(--mist);
  color: var(--teal);
}

/* ---------- FAQ accordion ---------- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 0.8rem;
  overflow: hidden;
}
.faq-item button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.1rem 1.3rem;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
  text-align: left;
}
.faq-item button::after { content: "+"; font-size: 1.3rem; color: var(--teal); transition: transform 0.25s; }
.faq-item.open button::after { transform: rotate(45deg); }
.faq-item .a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item .a > div { padding: 0 1.3rem 1.2rem; }

/* ---------- forms ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.05rem; }
.field label {
  display: block;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.field label .req { color: var(--amber); }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 0.96rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.75em 1em;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field textarea { resize: vertical; min-height: 96px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-err {
  display: none;
  background: #FBEDE7;
  border: 1px solid #EBC4B3;
  color: #9C4A2A;
  border-radius: 12px;
  padding: 0.7em 1em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.form-err.show { display: block; }
.sim-note {
  display: none;
  background: var(--sand);
  border: 1px solid #E4D4B4;
  color: #8A6A2E;
  border-radius: 12px;
  padding: 0.7em 1em;
  font-size: 0.85rem;
  margin-top: 1rem;
}
.sim-note.show { display: block; }
.form-success { display: none; text-align: center; padding: 1.5rem 0.5rem; }
.form-success.show { display: block; }
.form-success .big { font-size: 2.6rem; }
.form-success .ref {
  display: inline-block;
  margin-top: 1rem;
  font-family: "Plus Jakarta Sans", monospace;
  font-weight: 700;
  background: var(--mist);
  color: var(--teal);
  border-radius: 999px;
  padding: 0.4em 1.2em;
}
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--teal-deep), var(--teal));
  border-radius: calc(var(--radius) + 8px);
  color: #fff;
  text-align: center;
  padding: clamp(2.2rem, 5vw, 3.6rem) clamp(1.4rem, 4vw, 3rem);
}
.cta-band h2 { color: #fff; }
.cta-band .ph { border-color: rgba(255, 255, 255, 0.4); color: #CDE6DF; background: rgba(255, 255, 255, 0.07); }
.cta-band .btn-teal { background: #fff; color: var(--teal-deep); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
.cta-band .btn-teal:hover { background: var(--paper); }

/* ---------- live queue ---------- */
.q-entry-row { display: flex; gap: 0.8rem; }
.q-entry-row input {
  flex: 1;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 0.7em 1em;
  outline: none;
  min-width: 0;
}
.q-entry-row input:focus { border-color: var(--teal); }

.q-big {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.1;
}
.q-big.teal { color: var(--teal); }
.q-now .q-big { animation: q-pulse 2.4s ease-in-out infinite; }
@keyframes q-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .q-now .q-big { animation: none; } }
.q-meta { font-size: 0.8rem; color: var(--muted); }

.q-stats { display: flex; gap: 2rem; margin-top: 0.6rem; }
.q-stats > div { display: flex; flex-direction: column; }
.q-stat-num {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--ink);
}
.q-stat-label { font-size: 0.78rem; color: var(--muted); }

.q-alert[hidden] { display: none; }
.q-alert {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  align-items: baseline;
  background: #FFF3DC;
  border: 1.5px solid var(--amber);
  border-radius: 16px;
  padding: 1rem 1.3rem;
  margin-top: 1.4rem;
  color: #7A5A1C;
  animation: q-flash 1.6s ease-in-out infinite;
}
.q-alert.passed { background: #FBEDE7; border-color: #EBC4B3; color: #9C4A2A; animation: none; }
.q-alert strong { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 1.05rem; }
@keyframes q-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.4); } 50% { box-shadow: 0 0 0 7px rgba(232, 163, 61, 0); } }
@media (prefers-reduced-motion: reduce) { .q-alert { animation: none; } }

.q-track { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem 0; }
.q-dot {
  flex: 0 0 auto;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--mist);
  border: 1.5px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--muted);
}
.q-dot.serving { background: var(--teal); border-color: var(--teal); color: #fff; animation: q-pulse 2s ease-in-out infinite; }
.q-dot.you { background: var(--amber); border-color: var(--amber); color: #fff; font-size: 0.85rem; }
.q-dot.you.serving { background: var(--teal); border-color: var(--teal); }
.q-dot.more { background: var(--sand); }
.q-link { flex: 0 0 14px; height: 2px; background: var(--line); }

.q-board { display: grid; gap: 0.5rem; }
.q-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 1rem;
}
.q-row-id { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-weight: 800; letter-spacing: 0.05em; color: var(--ink); }
.q-row-status { font-size: 0.84rem; color: var(--muted); }
.q-row.serving { background: var(--mist); border-color: var(--teal); }
.q-row.serving .q-row-status { color: var(--teal); font-weight: 700; }
.q-row.mine { border-color: var(--amber); background: #FFF8EA; }
.q-row.mine .q-row-status { color: var(--amber); font-weight: 700; }

@media (max-width: 560px) {
  .q-entry-row { flex-direction: column; }
}

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.photo-card figcaption { margin-top: 0.6rem; font-size: 0.88rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(2.6rem, 6vw, 5rem) 0 clamp(2.4rem, 5vw, 4rem); }
.hero.short { padding-bottom: clamp(1.6rem, 3vw, 2.6rem); }

/* ---------- reveal on scroll (ported from bnw.js convention) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 1rem; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .grid-4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
}
