/* Medicinpåmindelse – medicationreminder.kodeby.dk
   Colours from the app icon. Lora for headings, Inter for everything else. */

@font-face { font-family: "Lora"; src: url("/fonts/lora-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --paper: #F3F9F7;
  --white: #FFFFFF;
  --teal: #00796B;
  --teal-dark: #00695C;
  --deep: #004D40;
  --mint: #B2DFDB;
  --mint-soft: #D7EEEA;
  --ink: #12201C;
  --muted: #4B5D57;
  --line: #CFE2DD;
  --snooze-bg: #FBEBC6;
  --snooze-ink: #5F4300;
  --shadow: 0 1px 2px rgba(0, 45, 37, .10), 0 10px 28px rgba(0, 45, 37, .12);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--deep); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 1.25rem + 3.9vw, 3.9rem); line-height: 1.07; letter-spacing: -0.017em; }
h2 { font-size: clamp(1.65rem, 1.15rem + 1.7vw, 2.35rem); line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }

a { color: var(--deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, 70rem); margin-inline: auto; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--deep); color: var(--white); padding: .6rem 1rem; border-radius: 8px; z-index: 10; }
.skip:focus { top: 1rem; color: var(--white); }

/* ---------- Top bar */
.topbar { width: min(100% - 2.5rem, 70rem); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.4rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--deep); font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1.15; }
.logo-mark { width: 2rem; height: 2rem; flex: none; }
.lang { font-size: .9rem; font-weight: 600; text-decoration: none; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line); }
.lang:hover { border-color: var(--teal); }

/* ---------- Buttons and links */
.button {
  display: inline-block; background: var(--teal); color: var(--white); font-weight: 600; text-decoration: none;
  padding: .85rem 1.5rem; border-radius: 999px; line-height: 1.2;
}
.button:hover { background: var(--deep); color: var(--white); }
.button-light { background: var(--white); color: var(--deep); }
.button-light:hover { background: var(--mint); color: var(--deep); }
.text-link { font-weight: 600; }

/* ---------- Hero */
.hero { display: grid; gap: 3rem; align-items: center; padding-block: 2.5rem 5rem; }
.hero-text { max-width: 34rem; }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 1.4rem; max-width: 32rem; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }
.soon { font-size: .9rem; color: var(--muted); margin-top: 1.1rem; }

@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; padding-block: 3.5rem 6.5rem; }
}

/* One dose, from reminder to taken */
.journey { margin: 0; }
.rail { --t: 2.9rem; --g: 1.6rem; list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; position: relative; max-width: 30rem; }
.rail::before { content: ""; position: absolute; left: calc(var(--t) + var(--g) / 2 - 1px); top: 1.2rem; bottom: 1.1rem; width: 2px; background: var(--line); }
.step { display: grid; grid-template-columns: var(--t) minmax(0, 1fr); column-gap: var(--g); align-items: start; position: relative; }
.step::before { content: ""; position: absolute; left: calc(var(--t) + var(--g) / 2 - 5px); top: 1.05rem; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2px solid var(--teal); }
.step-2::before { display: none; }
.step time { grid-column: 1; text-align: right; font-weight: 600; font-size: .85rem; color: var(--muted); padding-top: .8rem; font-variant-numeric: tabular-nums; }
.step > .note, .step > .chip { grid-column: 2; }
.step > .chip { justify-self: start; }
.step-2 .chip { margin-left: .2rem; }
.step-4 .chip { margin-top: .55rem; }

.note { background: var(--white); border-radius: 1.3rem; padding: .95rem 1.1rem .45rem; box-shadow: var(--shadow); }
.note-first { opacity: .62; }
.note-head { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--muted); }
.note-icon { width: 1.25rem; height: 1.25rem; padding: .25rem; border-radius: 50%; background: var(--teal); flex: none; }
.note-title { font-weight: 600; font-size: 1.05rem; margin-top: .55rem; }
.note-text { font-size: .95rem; color: #33443F; }
.note-acts { display: flex; flex-wrap: wrap; gap: .15rem; margin: .5rem 0 0 -.6rem; }
.act { font-weight: 600; font-size: .9rem; color: var(--teal); padding: .45rem .6rem; border-radius: 999px; }
.act.pressed { background: var(--mint-soft); color: var(--deep); }

.chip { display: inline-block; font-size: .8rem; font-weight: 600; line-height: 1.2; padding: .35rem .7rem; border-radius: 999px; white-space: nowrap; }
.chip-taken { background: var(--mint-soft); color: var(--deep); }
.chip-snoozed { background: var(--snooze-bg); color: var(--snooze-ink); }
.chip-upcoming { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px #A9C2BB; }

@media (prefers-reduced-motion: no-preference) {
  .rail::before { animation: fade .4s ease .3s both; }
  .step-1 { animation: arrive .55s cubic-bezier(.2, .8, .2, 1) .3s both; }
  .note-first .pressed { animation: press .35s ease 1.5s both; }
  .note-first { animation: settle .6s ease 2.1s both; }
  .step-2 { animation: arrive .45s ease-out 2.3s both; }
  .step-3 { animation: arrive .55s cubic-bezier(.2, .8, .2, 1) 3.1s both; }
  .note-second .pressed { animation: press .35s ease 4.1s both; }
  .step-4 { animation: arrive .45s ease-out 4.6s both; }
}
@media (max-width: 26rem) {
  .rail { --t: 2.5rem; --g: 1rem; }
  .note { padding: .85rem .9rem .4rem; }
  .act { padding: .4rem .45rem; font-size: .85rem; }
  .note-acts { margin-left: -.45rem; gap: 0; }
  .logo { font-size: 1rem; gap: .45rem; }
  .lang { padding: .35rem .65rem; }
  .logo-mark { width: 1.7rem; height: 1.7rem; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes arrive { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes press { from { background: transparent; color: var(--teal); } to { background: var(--mint-soft); color: var(--deep); } }
@keyframes settle { from { opacity: 1; } to { opacity: .62; } }

/* ---------- Three buttons */
.buttons { padding-block: 1rem 5.5rem; }
.intro { color: var(--muted); margin-top: .8rem; max-width: 34rem; }
.btn-panel { margin-top: 2rem; background: var(--white); border-radius: 1.5rem; box-shadow: var(--shadow); display: grid; }
.btn-col { padding: 1.5rem 1.6rem 1.7rem; }
.btn-col + .btn-col { border-top: 1px solid var(--line); }
.btn-name { display: inline-block; font-weight: 600; font-size: 1.1rem; color: var(--deep); background: var(--mint-soft); padding: .45rem 1.05rem; border-radius: 999px; margin-bottom: .85rem; }
.btn-col p:last-child { color: var(--muted); max-width: 22rem; }
@media (min-width: 48rem) {
  .btn-panel { grid-template-columns: repeat(3, 1fr); }
  .btn-col + .btn-col { border-top: 0; border-left: 1px solid var(--line); }
}

/* ---------- Today */
.today { display: grid; gap: 2.5rem; align-items: center; padding-block: 1rem 5.5rem; }
.today-text { max-width: 32rem; }
.today-text p { color: var(--muted); margin-top: 1rem; }
.phone { background: var(--white); border: 1px solid var(--line); border-radius: 2rem; padding: 1.5rem 1.1rem 1.1rem; max-width: 26rem; width: 100%; justify-self: center; }
.phone-title { font-weight: 600; font-size: 1.5rem; padding-inline: .4rem; }
.phone-count { font-size: .85rem; color: var(--muted); margin-top: .2rem; padding-inline: .4rem; }
.doses { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .55rem; }
.dose { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr) auto; align-items: center; gap: .6rem; background: #EEF6F3; border-radius: 1rem; padding: .8rem .9rem; }
.dose-time { font-weight: 600; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--deep); }
.dose-med { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.dose-name { font-weight: 600; font-size: .95rem; }
.dose-amount { font-size: .8rem; color: var(--muted); }
@media (min-width: 56rem) {
  .today { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
  .phone { justify-self: end; }
}
@media (max-width: 30rem) {
  .dose { grid-template-columns: 3.3rem minmax(0, 1fr); row-gap: .45rem; }
  .dose .chip { grid-column: 2; justify-self: start; }
}

/* ---------- Facts */
.facts { display: grid; gap: 3rem; padding-block: 1rem 6rem; }
.fact-col h2 { font-size: clamp(1.45rem, 1.1rem + 1vw, 1.8rem); }
.pills { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: .85rem; }
.pills li { position: relative; padding-left: 1.9rem; max-width: 30rem; }
.pills li::before {
  content: ""; position: absolute; left: .1rem; top: .62em; width: 1.05rem; height: .5rem; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) 50%, var(--mint) 50%); transform: rotate(-45deg);
}
@media (min-width: 52rem) { .facts { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Join */
.join { background: var(--teal); color: var(--white); }
.join-inner { display: flex; gap: 3rem; align-items: center; padding-block: 4.5rem; }
.join h2 { color: var(--white); }
.join p { max-width: 34rem; margin-top: 1rem; color: #E3F3F0; }
.join .button { margin-top: .6rem; }
.join-mark { width: 9rem; height: 9rem; flex: none; display: none; }
@media (min-width: 48rem) { .join-mark { display: block; } }

/* ---------- Footer */
.foot { padding-block: 2.6rem 3rem; font-size: .85rem; color: var(--muted); }
.disclaimer { max-width: 40rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin-top: 1.1rem; }
.foot-links a { font-weight: 600; }
.made { margin-top: 1.1rem; }

/* ---------- Privacy page */
.doc { padding-block: 1.5rem 4rem; }
.prose { max-width: 40rem; }
.prose h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); margin-bottom: .6rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2rem; }
.prose p, .prose ul { margin-top: .8rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .4rem; }
.prose em { color: var(--muted); }
.prose .site-note { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); }
