/* The web pages share the app's look: the dark stage (a warm near-black,
   cards a step up with a hairline edge), Newsreader headings, Inter text,
   and the clinic's own colour as light (theme.js sets the --accent
   variables; these are Retornela's own). The printed poster (html.light)
   keeps paper and ink.
   The fonts are the app's own, served from here so no third party sees the
   visitor (assets/fonts/OFL.txt). */
@font-face { font-family: 'Newsreader'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/newsreader-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/assets/fonts/inter-700.woff2') format('woff2'); }
:root {
  color-scheme: dark;
  --paper: #0c0b0a;
  --card: #171513;
  --muted-fill: #26231f;
  --ink: #f4f1eb;
  --muted: #aca69d;
  --subtle: #958f86;
  --placeholder: #6f6a63;
  --line: #2a2723;
  --success: #7dd3a3;
  --danger: #f28b7d;
  --danger-soft: #2e1916;
  /* The one light surface: the main button. */
  --pill: #ffffff;
  --on-pill: #1d1b18;
  --accent: #c4964f;
  --accent-light: #c99e5d;
  --accent-dark: #99753e;
  --accent-deep: #c4964f;
  --accent-soft: #332a1d;
  --accent-softer: #272118;
  --on-accent: #1d1b18;
  --on-accent-muted: rgba(255, 255, 255, 0.72);
  --glow: rgba(196, 150, 79, 0.42);
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.16);
  --display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shadow: inset 0 0 0 1px var(--line);
}
/* Paper and ink, for print. */
html.light {
  color-scheme: light;
  --paper: #f5f2ed;
  --card: #ffffff;
  --muted-fill: #efeae3;
  --ink: #1d1b18;
  --muted: #69645c;
  --subtle: #736d64;
  --placeholder: #a39d94;
  --line: #e8e2d8;
  --success: #2a6f4f;
  --danger: #b83a2e;
  --danger-soft: #f8e7e3;
  --pill: #1d1b18;
  --on-pill: #ffffff;
  --accent-deep: #816234;
  --accent-softer: #fbf8f3;
  --on-accent-muted: #1d1b18;
  --glass: rgba(29, 27, 24, 0.08);
  --glass-border: rgba(29, 27, 24, 0.14);
  --shadow: 0 1px 2px rgba(29, 27, 24, 0.04), 0 10px 28px rgba(29, 27, 24, 0.07);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--text);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent-deep); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
svg.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Brand band ---------------------------------------------------------------- */
/* The stage: the clinic's light from above on the dark canvas, or its photo melting into it. */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding: 60px 20px 64px;
  color: var(--ink);
  background:
    radial-gradient(80% 70% at 18% 0%, var(--glow), transparent 70%),
    radial-gradient(60% 50% at 100% 25%, var(--glass), transparent 70%),
    var(--paper);
}
.hero .circle { display: none; }
.hero .cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero .scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 11, 10, 0.35) 0%, rgba(12, 11, 10, 0.7) 60%, var(--paper) 100%); }
.hero.has-cover { color: #fff; --on-accent-muted: rgba(255, 255, 255, 0.86); }
.hero-inner { max-width: 520px; margin: 0 auto; }
/* While the clinic loads: no light yet, so no other brand's colour flashes first. */
.hero.pending { background: var(--paper); }
.hero-logo { display: flex; width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: var(--accent-soft); overflow: hidden;
  align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px var(--glass-border); }
.hero-logo img { width: 100%; height: 100%; object-fit: cover; }
.hero-logo img.brand { width: 84%; height: 84%; object-fit: contain; }
/* A monogram, as in the app: the initials in the serif, in the clinic's colour. */
.hero-logo .initials { font-family: var(--display); font-size: 34px; font-weight: 400; letter-spacing: 0.02em; color: var(--accent-deep); }
.hero .kicker {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 20px 0 0;
  font-size: 13px; font-weight: 500;
  color: var(--accent-deep);
}
.hero.has-cover .kicker { color: var(--on-accent-muted); }
.hero .kicker svg.icon { width: 14px; height: 14px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -0.8px;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
  margin: 10px 0 12px;
}
.hero .kicker[hidden] + h1 { margin-top: 20px; }
.hero .lead { margin: 0 auto; max-width: 420px; color: var(--on-accent-muted); font-size: 16px; }

.sheet { position: relative; max-width: 560px; margin: -12px auto 0; padding: 0 16px 48px; }
main.plain { max-width: 640px; margin: 0 auto; padding: 48px 20px 64px; }
.center { text-align: center; }
.logo { width: 92px; height: 92px; object-fit: contain; }

/* Cards --------------------------------------------------------------------- */
.card {
  background: var(--card);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
/* Small quiet labels in sentence case, as in the app. */
.label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--subtle);
}
.card h2 { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 0 0 14px; color: var(--ink); font-variant-numeric: lining-nums; }
.hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.card > .hint:first-child { margin-top: 0; }
.find-body { margin: -4px 0 14px; }

.code-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.code { font-size: 26px; font-weight: 600; letter-spacing: 0.08em; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }

.copy {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font: inherit; font-weight: 600; font-size: 14px;
  border: 0; border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.2s ease;
}
.copy svg.icon { width: 16px; height: 16px; }
.copy:active { transform: scale(0.96); }
.copy.done { color: var(--success); }

/* A friend's invite, above everything else when the link carries one. */
.invite { display: flex; gap: 14px; align-items: flex-start; background: var(--accent-softer); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.invite .copy { margin-top: 12px; }
.invite .badge { flex: none; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); }
.invite .badge svg.icon { width: 22px; height: 22px; }
.invite .text { flex: 1; min-width: 0; }
.invite strong { display: block; font-size: 16px; }
.invite p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.invite .ref { font-weight: 600; letter-spacing: 0.08em; color: var(--ink); white-space: nowrap; }

/* Buttons ------------------------------------------------------------------- */
.actions { margin: 4px 0 18px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  text-align: center;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  margin-top: 10px;
  background: var(--pill);
  color: var(--on-pill);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s ease;
}
/* The main button is the white pill whatever the clinic's colour, as in the app. */
.btn.accent { background: var(--pill); color: var(--on-pill); }
.btn.outline { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-border); color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.soon { text-align: center; margin: 14px 0 4px; font-size: 14px; color: var(--muted); }
.small { font-size: 13px; color: var(--muted); }

/* How it works -------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
/* The steps are a real sequence: their number in the serif, no bubble. */
.steps .num {
  flex: none;
  width: 24px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 400; font-size: 26px;
  color: var(--accent-deep);
}
.steps strong { display: block; font-size: 16px; line-height: 1.35; padding-top: 5px; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.about p { margin: 0; color: var(--ink); white-space: pre-line; }

/* Features on the start page. */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.features li { display: flex; gap: 14px; align-items: flex-start; }
.features .badge { flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-softer); box-shadow: inset 0 0 0 1px var(--glass-border); color: var(--accent-deep); }
.features strong { display: block; font-size: 16px; line-height: 1.35; padding-top: 2px; }
.features p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* Find a clinic by its code. */
.find { display: flex; gap: 10px; margin-top: 4px; }
.find input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 18px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0 20px; min-height: 54px;
  border-radius: 999px; border: 0;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  color: var(--ink);
}
.find input::placeholder { color: var(--placeholder); letter-spacing: 0.04em; font-weight: 500; text-transform: none; }
.find input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--subtle); }
.find .btn { width: auto; margin: 0; min-height: 54px; padding: 0 20px; }
.error { margin: 10px 0 0; font-size: 14px; color: var(--danger); }

/* Loading: soft placeholders where the clinic's name and code will be. */
.skeleton { display: block; border-radius: 10px; background: var(--glass); animation: pulse 1.4s ease-in-out infinite; }
.skeleton.title { width: 70%; height: 40px; margin: 22px auto 12px; }
.skeleton.line { width: 55%; height: 16px; margin: 0 auto; }
.card .skeleton { background: var(--muted-fill); }
.card .skeleton.code { width: 60%; height: 34px; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* Entrance: the cards rise in, one after another. */
.rise { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise:nth-child(2) { animation-delay: 0.06s; }
.rise:nth-child(3) { animation-delay: 0.12s; }
.rise:nth-child(4) { animation-delay: 0.18s; }
.rise:nth-child(5) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .rise, .skeleton { animation: none; }
  .btn, .copy { transition: none; }
}

/* Text pages ---------------------------------------------------------------- */
h1 { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.12; margin: 20px 0 8px; font-variant-numeric: lining-nums; }
h2 { font-size: 18px; font-weight: 600; margin: 32px 0 8px; }
p { margin: 0 0 12px; color: var(--muted); }
.legal p, .legal li { color: var(--ink); }
.legal li { margin-bottom: 6px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.draft { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 24px; }
.langs { font-size: 14px; color: var(--muted); margin: 0 0 8px; line-height: 2; }
.langs a { color: inherit; text-underline-offset: 3px; }

footer { margin-top: 36px; text-align: center; font-size: 13px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .brand { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--subtle); font-size: 12px; letter-spacing: 0.06em; }
footer .brand img { width: 22px; height: 22px; }

@media (min-width: 640px) {
  .hero { padding: 72px 20px 112px; }
  .hero h1 { font-size: 52px; }
  .code { font-size: 32px; letter-spacing: 0.12em; }
  .sheet { margin-top: -60px; }
  .card { padding: 26px; }
}
