/* ============================================================
   Remedi — marketing site
   Brand: Mist & Ember (src/theme.ts). Visual idea stays a
   pharmacy leaflet — dashed tear-lines, dotted "spec sheet"
   declarations — now built on the app's real palette and type.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  --paper: #eef1ee;      /* Mist — background */
  --paper-alt: #f7f9f6;  /* near-white, for surfaces + light text on dark ink */
  --ink: #1e2420;        /* Ink — primary text */
  --ink-soft: #667066;   /* secondary text */
  --ink-faint: #9ca49c;  /* tertiary / mono labels */
  --amber: #ff5a36;      /* Ember — the one saturated accent */
  --amber-deep: #cc482b; /* Ember, darkened for hover/contrast */
  --amber-tint: #ffe7e0; /* Ember at ~12% over white, for icon chips */
  --sage: #2e6b4c;       /* Moss — success / positive status only */
  --sage-deep: #234f38;
  --line: #e2e7e2;       /* border */
  --line-strong: #c9d2c9;
  --card: #ffffff;

  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 10px;

  --sans-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --max: 1120px;
  --pad: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--amber-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

h1, h2, h3 {
  font-family: var(--sans-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

h3 { font-weight: 600; }

p { margin: 0; }

.muted { color: var(--ink-soft); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 15.5px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--ink);
  color: var(--paper-alt);
}
.btn--primary:hover { background: #1a1d16; }

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--amber {
  background: var(--amber);
  color: var(--paper-alt);
}
.btn--amber:hover { background: var(--amber-deep); }

.btn svg { width: 17px; height: 17px; flex: none; }

/* ---------- perforated divider (leaflet tear-line) ---------- */

.tear {
  height: 0;
  border-top: 1.5px dashed var(--line-strong);
  position: relative;
}
.tear::before,
.tear::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
}
.tear::before { left: calc(var(--pad) - 6px); }
.tear::after { right: calc(var(--pad) - 6px); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(238, 241, 238, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1.5px dashed var(--line-strong);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 26px;
  height: 26px;
  flex: none;
  transform: translateY(2px);
}
.brand__word {
  font-family: var(--sans-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.brand__tag {
  display: none;
}
@media (min-width: 640px) {
  .brand__tag {
    display: inline;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
    border-left: 1px dashed var(--line-strong);
    padding-left: 9px;
    margin-left: 2px;
  }
}

.main-nav {
  display: none;
  align-items: center;
  gap: 26px;
}
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--ink); }

@media (min-width: 860px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .btn { padding: 10px 18px; font-size: 14.5px; }

.nav-toggle {
  border: 1px solid var(--line-strong);
  background: var(--card);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-bottom: 1.5px dashed var(--line-strong);
  background: var(--paper-alt);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  padding: 14px var(--pad);
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  border-top: 1px solid var(--line);
}
@media (min-width: 860px) {
  .mobile-nav { display: none !important; }
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 940px) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 40px; }
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.hero__eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sage) 22%, transparent);
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.06;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber-deep);
}

.hero__sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 18px;
  color: var(--ink-soft);
}

.hero__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.hero__meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero__meta span { white-space: nowrap; }

.hero__figure { display: flex; justify-content: center; }

/* ---------- phone mockup ---------- */

.phone {
  width: min(280px, 72vw);
  aspect-ratio: 9 / 19.3;
  background: #101210;
  border-radius: 52px;
  padding: 12px;
  box-shadow:
    0 1.5px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 60px -25px rgba(38, 42, 34, 0.45),
    0 10px 24px -12px rgba(38, 42, 34, 0.35);
  position: relative;
  flex: none;
}
.phone::before {
  content: "";
  position: absolute;
  right: -2px;
  top: 100px;
  width: 3px;
  height: 56px;
  background: #05060a;
  border-radius: 2px 0 0 2px;
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--paper-alt);
  border-radius: 40px;
  overflow: hidden;
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.phone__island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 22px;
  background: #0a0b09;
  border-radius: 999px;
  z-index: 3;
}
.phone--sm { width: min(190px, 60vw); border-radius: 40px; padding: 9px; }
.phone--sm .phone__screen { border-radius: 31px; }
.phone--sm .phone__island { top: 10px; height: 16px; }
.phone--sm::before { top: 74px; height: 40px; }

.phone__caption {
  margin-top: 16px;
  text-align: center;
}
.phone__caption .label { display: block; margin-bottom: 3px; }
.phone__caption p { font-size: 14px; line-height: 1.4; color: var(--ink-soft); min-height: 4.2em; }

/* ---------- section scaffolding ---------- */

.section { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); }
.section__head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 52px); }
.section__head .label { display: block; margin-bottom: 12px; }
.section__head h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; }
.section__head h2 span { color: var(--ink-faint); }
.section__head p { margin-top: 14px; font-size: 16.5px; color: var(--ink-soft); }

/* ---------- screenshots strip ---------- */

.strip {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; }
.strip > figure {
  scroll-snap-align: start;
  flex: none;
  width: min(190px, 60vw);
  margin: 0;
}

/* ---------- features ---------- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5px;
  background: var(--line-strong);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (min-width: 700px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  background: var(--card);
  padding: 30px 26px;
}
.feature__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--amber-tint);
  color: var(--amber-deep);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.feature__icon svg { width: 19px; height: 19px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 15px; color: var(--ink-soft); }

/* ---------- privacy declaration panel (signature) ---------- */

.decl {
  background: var(--ink);
  color: var(--paper-alt);
  border-radius: var(--radius-lg);
  padding: clamp(30px, 5vw, 52px);
}
.decl__top {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1.5px dashed rgba(238, 241, 238, 0.25);
  padding-bottom: 20px;
  margin-bottom: 22px;
}
.decl__top .label { color: var(--amber); }
.decl__top h2 { color: var(--paper-alt); font-size: clamp(22px, 2.8vw, 28px); }
.decl__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 40px;
}
@media (min-width: 760px) {
  .decl__grid { grid-template-columns: 1fr 1fr; }
}
.decl__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 0;
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(238, 241, 238, 0.12);
}
.decl__row .k {
  text-transform: uppercase;
  color: rgba(238, 241, 238, 0.6);
  white-space: nowrap;
}
.decl__row .leader {
  flex: 1;
  border-bottom: 1.5px dotted rgba(238, 241, 238, 0.28);
  margin-bottom: 4px;
  min-width: 12px;
}
.decl__row .v {
  color: var(--paper-alt);
  font-weight: 500;
  white-space: nowrap;
}
.decl__foot {
  margin-top: 26px;
  font-size: 14.5px;
  color: rgba(238, 241, 238, 0.72);
  max-width: 56ch;
}
.decl__foot a { color: var(--amber); text-decoration-color: rgba(255, 90, 54, 0.5); }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; }
.faq-item {
  border-top: 1.5px dashed var(--line-strong);
}
.faq-item:last-child { border-bottom: 1.5px dashed var(--line-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 2px;
  font-weight: 600;
  font-size: 16.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  position: relative;
}
.faq-item summary .plus::before,
.faq-item summary .plus::after {
  content: "";
  position: absolute;
  background: var(--ink);
}
.faq-item summary .plus::before { width: 10px; height: 1.5px; }
.faq-item summary .plus::after { width: 1.5px; height: 10px; transition: transform 0.2s ease; }
.faq-item[open] summary .plus::after { transform: rotate(90deg); opacity: 0; }
.faq-item[open] summary .plus { background: var(--amber-tint); border-color: transparent; }
.faq-item p {
  padding: 0 34px 22px 2px;
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 60ch;
}

/* ---------- final CTA ---------- */

.cta-band {
  background: var(--amber);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { color: var(--ink); font-size: clamp(24px, 3vw, 32px); max-width: 20ch; }
.cta-band p { margin-top: 10px; color: rgba(30, 36, 32, 0.72); font-size: 15.5px; }
.cta-band .btn--primary { background: var(--ink); color: var(--paper-alt); }
.cta-band .btn--primary:hover { background: #0f130f; }

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

.site-footer {
  border-top: 1.5px dashed var(--line-strong);
  padding-top: clamp(44px, 6vw, 64px);
  padding-bottom: 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { color: var(--ink-soft); font-size: 14.5px; max-width: 34ch; }
.footer-col .label { display: block; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { text-decoration: none; font-size: 14.5px; color: var(--ink-soft); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- legal pages ---------- */

.legal {
  max-width: 720px;
  padding-top: clamp(48px, 7vw, 80px);
  padding-bottom: clamp(56px, 8vw, 96px);
}
.legal__eyebrow { margin-bottom: 18px; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 10px; }
.legal__updated {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.legal__intro {
  margin-top: 24px;
  font-size: 17.5px;
  color: var(--ink-soft);
}
.legal section {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1.5px dashed var(--line-strong);
}
.legal h2 { font-size: 20px; margin-bottom: 14px; }
.legal p { color: var(--ink-soft); margin-top: 12px; }
.legal p:first-of-type { margin-top: 0; }
.legal ul { margin: 14px 0 0; padding-left: 22px; color: var(--ink-soft); }
.legal ul li { margin-top: 8px; }
.legal ul.plain { list-style: none; padding-left: 0; }
.legal ul.plain li {
  padding-left: 22px;
  position: relative;
}
.legal ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}
.legal ul.plain b { color: var(--ink); font-weight: 600; }
.legal__contact {
  margin-top: 44px;
  padding: 24px 26px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
}
.legal__contact h2 { font-size: 16px; margin-bottom: 8px; }
.legal__contact a { color: var(--amber-deep); font-weight: 600; text-decoration: none; }
.legal__back { margin-top: 40px; display: inline-block; font-size: 14.5px; }

/* ---------- support page ---------- */

.support-hero { text-align: center; padding-top: clamp(56px, 8vw, 96px); }
.support-hero .label { display: block; margin-bottom: 16px; }
.support-hero h1 { font-size: clamp(32px, 4.6vw, 46px); }
.support-hero p { margin: 18px auto 0; max-width: 46ch; color: var(--ink-soft); font-size: 17.5px; }

.support-card {
  max-width: 560px;
  margin: 40px auto 0;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
}
.support-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.support-card p.small { margin-top: 12px; font-size: 13.5px; color: var(--ink-faint); }

.support-meta {
  max-width: 560px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--line-strong);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.support-meta div { background: var(--card); padding: 18px 20px; }
.support-meta .label { display: block; margin-bottom: 6px; }
.support-meta p { font-size: 14.5px; }

.support-links {
  max-width: 560px;
  margin: 40px auto 0;
  text-align: center;
}
.support-links .label { display: block; margin-bottom: 12px; }
.support-links nav { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.support-links a { font-size: 14.5px; text-decoration: none; color: var(--ink-soft); }
.support-links a:hover { color: var(--ink); }

/* ---------- 404-ish empty states, reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
