/* Daacter — public pages: the landing page and every screen you can reach
   without being signed in (log in, accept an invite, await approval). */

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

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(15,23,42,.06);
}
.site-header .container { display: flex; align-items: center; gap: var(--sp-5); height: 68px; }

.brand { display: inline-flex; align-items: center; gap: var(--sp-3); color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  background: var(--accent);
  box-shadow: var(--shadow-teal);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-weight: 800; font-size: 1.125rem; letter-spacing: -0.035em; }
.brand-sub {
  font-family: var(--font-data);
  font-size: var(--fs-micro); font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim);
  padding-inline-start: var(--sp-3); margin-inline-start: var(--sp-1);
  border-inline-start: 1px solid var(--line);
}

.site-nav { display: flex; align-items: center; gap: var(--sp-1); margin-inline-start: var(--sp-4); }
.nav-link {
  padding: 0.4rem 0.7rem; border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-600);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-link:hover { background: var(--ink-100); color: var(--text); }
.nav-link[aria-current="page"] { color: var(--accent-ink); background: var(--teal-050); }

.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--sp-3); }

/* --- Sections --------------------------------------------------------- */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--white { background: var(--surface); }
.section--slate { background: var(--clinical-slate); }
.section--ink   { background: var(--ink-900); color: #E2E8F0; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section--ink .lede { color: var(--ink-400); }

.section-head { max-width: 62ch; margin-bottom: var(--sp-7); }
.section-head p { margin-top: var(--sp-4); }

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

.hero {
  position: relative;
  background: var(--surface);
  padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto -10% -60% 40%;
  height: 620px;
  background: radial-gradient(60% 50% at 50% 50%, rgba(13,148,136,.09), rgba(13,148,136,0) 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero h1 { margin-bottom: var(--sp-5); }
.hero .lede { margin-bottom: var(--sp-6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }

.hero-proof { display: grid; gap: var(--sp-3); max-width: 46ch; }
.hero-proof li {
  display: grid; grid-template-columns: 18px 1fr; gap: var(--sp-3);
  align-items: start;
  font-size: var(--fs-sm); color: var(--ink-600);
}
.hero-proof svg { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.hero-proof strong { color: var(--text); font-weight: 650; }

/* --- Console: the case card that sits beside the hero copy ------------ */

.console { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; }
.console-bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--ink-900); color: #fff;
}
.console-bar .console-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); }
.console-bar .case-id {
  font-family: var(--font-data); font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums; letter-spacing: .08em;
  color: var(--teal-300); font-weight: 650;
}
.console-body { padding: var(--sp-5); }
.console-foot { padding: var(--sp-4) var(--sp-5); background: var(--surface-sunk); box-shadow: inset 0 1px 0 var(--line-soft); }

.patient-line { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.patient-line .who { min-width: 0; flex: 1; }
.patient-line .who strong { display: block; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.015em; }
.patient-line .who span { font-size: var(--fs-xs); color: var(--text-muted); }

.note-quote {
  margin: var(--sp-4) 0;
  padding-inline-start: var(--sp-4);
  border-inline-start: 2px solid var(--teal-100);
  font-size: var(--fs-sm); color: var(--ink-600); line-height: 1.6;
}
.note-quote em { color: var(--ink-700); font-style: normal; background: var(--teal-050); padding: 0 3px; border-radius: 3px; }

/* --- The recording, as it sits in a case ------------------------------
   Stands where the reference design put its waveform. There is no waveform
   here on purpose: the complaint is a video, and drawing a fake audio trace
   for it would be a picture of a feature this product does not have. */

.vidnote {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface-sunk);
  box-shadow: inset 0 0 0 1px var(--line);
}
.vidnote-play {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow-teal);
}
.vidnote-play svg { width: 14px; height: 14px; }
.vidnote-body { min-width: 0; flex: 1; }
.vidnote-label {
  display: block;
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm);
  letter-spacing: -0.012em;
}
.vidnote-meta {
  display: block; margin-top: 1px;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs); color: var(--text-muted);
}

/* --- Three views ------------------------------------------------------ */

.views-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); align-items: stretch; }
.view-card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); overflow: hidden;
  transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out);
}
.view-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.view-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); box-shadow: inset 0 -1px 0 var(--line-soft); }
.view-head .role { font-family: var(--font-data); font-size: var(--fs-micro); font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.view-head h3 { font-size: var(--fs-body); }
.view-body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
/* Pin each card's action to the bottom so the CTAs line up across the row. */
.view-body > .btn:last-child, .view-body > .button-link:last-child { margin-top: auto; }

/* --- The fee (Secure Gold) --------------------------------------------
   The one place gold is allowed to dominate, because the whole section is
   about money. */

.pay-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.payout-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.payout-hero {
  padding: var(--sp-5);
  background: linear-gradient(180deg, var(--gold-050), var(--pristine-white));
  box-shadow: inset 0 -1px 0 var(--line-soft);
}
.payout-amount {
  display: flex; align-items: baseline; gap: var(--sp-3);
  font-family: var(--font-data);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  color: var(--text); line-height: 1.1;
  margin-block: var(--sp-2) var(--sp-3);
}
.payout-amount .cur {
  font-size: .5em; font-weight: 650; color: var(--gold-700);
  vertical-align: .42em; margin-inline-end: .18em; letter-spacing: 0;
}
.payout-amount .unit {
  font-size: .26em; font-weight: 650;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-700);
}
.payout-foot {
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-sunk);
  box-shadow: inset 0 1px 0 var(--line-soft);
}

.fee-note {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--gold-050);
  box-shadow: inset 0 0 0 1px var(--gold-200);
  font-size: var(--fs-sm); color: var(--gold-700); line-height: 1.55;
}
.fee-note svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }

/* --- Trust strip (on ink) --------------------------------------------- */

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin-top: var(--sp-6); }
.trust-item { padding: var(--sp-5); border-radius: var(--r-lg); background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.trust-item h3 { color: #fff; font-size: var(--fs-body); margin-bottom: var(--sp-2); }
.trust-item p { font-size: var(--fs-sm); color: var(--ink-400); line-height: 1.6; }
.trust-item svg { width: 20px; height: 20px; color: var(--teal-300); margin-bottom: var(--sp-3); }

/* --- Closing CTA ------------------------------------------------------ */

.cta-panel {
  position: relative;
  border-radius: var(--r-xl);
  background: var(--accent); color: #fff;
  padding: clamp(2.25rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-3); overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-6); align-items: center;
}
.cta-panel::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 460px; height: 460px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.16), rgba(255,255,255,0) 68%);
  pointer-events: none;
}
.cta-panel h2 { color: #fff; position: relative; }
.cta-panel p { color: rgba(255,255,255,.86); margin-top: var(--sp-3); max-width: 48ch; position: relative; }
.cta-actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.cta-panel .btn--ghost { --btn-fg: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.cta-panel .btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }

/* --- Auth pages -------------------------------------------------------
   Log in, accept an invite, await approval: one narrow card, centred, with
   nothing else on screen to reach for. */

.auth { display: grid; place-items: center; padding-block: clamp(2.5rem, 7vw, 5rem); min-height: 60vh; }
.auth-card {
  width: 100%; max-width: 27rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: var(--sp-6);
}
.auth-card h1 { font-size: 1.625rem; letter-spacing: -0.032em; margin-bottom: var(--sp-2); }
.auth-card > p { color: var(--ink-600); font-size: var(--fs-sm); }
.auth-card form { margin-top: var(--sp-5); }
.auth-card form button[type="submit"] { width: 100%; }
/* A secondary action under the primary button, styled as a plain link. */
.auth-card form button.auth-alt {
  width: auto; min-height: 0; padding: var(--sp-2) 0; margin-top: var(--sp-3);
  background: none; box-shadow: none; color: var(--accent-ink);
  font-size: var(--fs-sm); text-decoration: underline;
}
.auth-foot { margin-top: var(--sp-5); padding-top: var(--sp-4); box-shadow: inset 0 1px 0 var(--line-soft); }
.auth-foot p { font-size: var(--fs-sm); color: var(--text-muted); }
.auth-foot p + p { margin-top: var(--sp-2); }

/* --- Site footer ------------------------------------------------------ */

.site-footer { background: var(--ink-900); color: var(--ink-400); padding-block: var(--sp-8) var(--sp-6); }
.site-footer a { color: var(--ink-300); }
.site-footer a:hover { color: var(--teal-300); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-6); padding-bottom: var(--sp-6); }
.site-footer .brand-name { color: #fff; }
.footer-col h4 {
  color: #fff; font-size: var(--fs-xs); letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: var(--sp-3);
  font-family: var(--font-data); font-weight: 650;
}
.footer-col li + li { margin-top: var(--sp-2); }
.footer-col a { font-size: var(--fs-sm); }
.footer-base {
  display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center;
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,.09);
  font-size: var(--fs-xs);
}

/* --- Responsive ------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .pay-grid { grid-template-columns: 1fr; }
  .hero-console { max-width: 560px; }
  .views-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-panel { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header .container { gap: var(--sp-3); }
  .brand-sub { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .console-body, .console-foot { padding: var(--sp-4); }
  .hero-cta .btn, .hero-cta .button-link { flex: 1; }
  /* The prescriber column is the least load-bearing on a phone. */
  .ledger th:nth-child(2), .ledger td:nth-child(2) { display: none; }
  .auth-card { padding: var(--sp-5); }
}

@media (max-width: 460px) {
  .header-actions .btn--ghost { display: none; }
  /* The language toggle is not optional chrome — keep it on small screens. */
  .header-actions .lang-switch .btn { display: inline-flex; }
}

/* The switcher sits inline in the header slot; no new chrome, just a form. */
.lang-switch { display: inline-flex; }

@media print {
  .site-header, .site-footer, .cta-panel { display: none; }
}

/* A footer with only the destinations that actually exist. */
.footer-grid--sparse { grid-template-columns: 1.6fr 1fr 1fr; }
@media (max-width: 1024px) { .footer-grid--sparse { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px)  { .footer-grid--sparse { grid-template-columns: 1fr; } }

/* --- Urdu / RTL --------------------------------------------------------- *
   The layout is direction-agnostic (logical properties + flex/grid), so it
   mirrors on its own under dir="rtl". This block holds only what logical
   properties cannot express: a couple of physical offsets, and the extra
   line-height Nastaliq needs to breathe. Loaded on public pages only, and
   every rule is gated on dir/lang, so the English LTR pages are untouched. */

/* Nastaliq is a tall script; give running text and headings room. */
[lang="ur"] p, [lang="ur"] li,
[lang="ur"] .lede, [lang="ur"] .eyebrow,
[lang="ur"] .spine-label, [lang="ur"] .spine-who, [lang="ur"] .spine-note,
[lang="ur"] .small, [lang="ur"] .muted { line-height: 2; }
[lang="ur"] h1, [lang="ur"] h2, [lang="ur"] h3 { line-height: 1.7; }

/* The vertical spine's connector is an absolutely-positioned line aligned to
   the dot column; in RTL that column is on the right. */
[dir="rtl"] .spine-step::before {
  left: auto;
  right: calc(76px + var(--sp-3) + 9px);
}
/* The horizontal rail's finishing gradient points the way the eye travels. */
[dir="rtl"] .spine--rail .spine-step:last-child::before {
  background: linear-gradient(270deg, var(--teal-100), rgba(204,251,241,0));
}

/* Decorative background glows — mirror their physical insets so they sit on
   the same visual side of the composition. */
[dir="rtl"] .hero::after { inset: auto 40% -60% -10%; }
[dir="rtl"] .cta-panel::before { inset: -40% auto auto -10%; }
