/*
 * Idag på webben: samma palett, kort och lerknappar som appen (src/ui/theme.ts) och samma
 * vågband som fliken Idag (assets/images/bands). Ändras appens färger ändras de här också.
 */
:root {
  --bg: #F4F3EF;
  --surface: #FFFFFF;
  --sunken: #EFEDE6;
  --text: #1E1E1C;
  --muted: #8A887F;
  --border: #E6E3DA;
  --accent: #F2B72E;
  --accent-text: #94690A;
  --on-accent: #3D2B00;
  --band-top: #F1DDB0;
  --band: url("bilder/band-ljus.png");
  --clay-ink: #5A3410;
  --clay: linear-gradient(160deg, #FFFCF4 0%, #F1E4CB 100%);
  --clay-shadow: inset 1.5px 2px 2px rgba(255,255,255,0.9), inset -2px -3px 4px rgba(122,74,16,0.22), 0 5px 12px rgba(90,52,16,0.22);
  --lift: 0 6px 16px rgba(122,106,64,0.14);
  --phone-shadow: 0 24px 48px rgba(90,52,16,0.22), 0 4px 12px rgba(90,52,16,0.12);
  /* Fliktonerna: Idag varm, Senare grön, Tid blå. */
  --tone-today: linear-gradient(180deg, #F1DDB0 0%, #EDCC94 55%, #E6B97E 100%);
  --tone-later: linear-gradient(180deg, #DEE7CF 0%, #CCDBB8 55%, #B8CCA1 100%);
  --tone-report: linear-gradient(180deg, #D6E2EC 0%, #C2D4E3 55%, #ABC3D7 100%);
  --radius-card: 24px;
  --radius-pill: 20px;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1E1E1C;
    --sunken: #2A2926;
    --text: #F4F3EF;
    --muted: #9A978E;
    --border: #33312D;
    --accent-text: #F5C552;
    --band-top: #3A2D1E;
    --band: url("bilder/band-mork.png");
    --clay-ink: #F6EAD6;
    --clay: linear-gradient(160deg, #4A3A2A 0%, #2F251C 100%);
    --clay-shadow: inset 1.5px 2px 2px rgba(255,236,200,0.18), inset -2px -3px 4px rgba(0,0,0,0.45), 0 4px 10px rgba(0,0,0,0.5);
    --lift: none;
    --phone-shadow: 0 24px 48px rgba(0,0,0,0.55);
    --tone-today: linear-gradient(180deg, #3A2D1E 0%, #433322 55%, #4D3925 100%);
    --tone-later: linear-gradient(180deg, #263021 0%, #2D3826 55%, #34412B 100%);
    --tone-report: linear-gradient(180deg, #1F2A35 0%, #25313E 55%, #2B3947 100%);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-underline-offset: 3px; }

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

h1, h2, h3, .brand { font-family: var(--rounded); letter-spacing: -0.01em; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.narrow { max-width: 680px; }

/* Vågbandet överst, som på fliken Idag: rubriken ligger i bandet, sidan tar vid under kanten. */
.band {
  /* Under vågkanten är bilden genomskinlig, så sidans egen bakgrund syns där. */
  background: var(--band) center bottom / cover no-repeat;
  padding-top: 18px;
  min-height: clamp(220px, 30vw, 360px);
}

.band.short { min-height: clamp(170px, 22vw, 240px); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
}

.brand img { width: 40px; height: 40px; }

.round-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--lift);
  border: 1px solid var(--border);
}

.dateline {
  margin: 28px 0 0;
  color: var(--text);
  opacity: 0.7;
  font-weight: 500;
  font-size: 17px;
}

.title {
  margin: 0;
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 800;
  line-height: 1.05;
}

/* Startsidan */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
  margin-top: -72px;
}

.hero-text { padding-top: 16px; }

.lead {
  font-size: clamp(20px, 2.6vw, 24px);
  line-height: 1.4;
  margin: 0 0 24px;
  max-width: 30ch;
}

.clay {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: var(--clay);
  box-shadow: var(--clay-shadow);
  color: var(--clay-ink);
  font-family: var(--rounded);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
}

.clay img { width: 22px; height: 22px; }

.phone {
  width: min(300px, 78vw);
  margin: 0 auto;
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--phone-shadow);
  background: var(--surface);
}

.phone img { width: 100%; height: auto; }

@media (min-width: 820px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; margin-top: -120px; }
  .hero-text { padding-top: 64px; }
  .hero .phone { margin: 0 0 0 auto; }
}

/* Kort som i appen: vita, rundade, med en hårfin kant. */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  margin: 72px 0 16px;
}

.features { display: grid; gap: 20px; }

.feature {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

.feature-text { padding: 24px 24px 8px; }

.label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.feature h3 { margin: 0 0 8px; font-size: 26px; font-weight: 800; line-height: 1.2; }

.feature p { margin: 0 0 12px; }

.feature-art {
  padding: 28px 24px 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.feature-art .phone {
  width: min(260px, 70vw);
  border-radius: 34px 34px 0 0;
  border-bottom: 0;
  max-height: 420px;
}

.tone-today { background: var(--tone-today); }
.tone-later { background: var(--tone-later); }
.tone-report { background: var(--tone-report); }

@media (min-width: 820px) {
  .feature { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .feature-text { padding: 40px; align-self: center; }
  .feature:nth-child(even) .feature-text { order: 2; }
  .feature-art { padding: 40px 40px 0; }
}

/* En lista med bockade rader, som avklarade uppgifter i appen. */
.checklist { list-style: none; margin: 0; padding: 0; }

.checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.checklist li:first-child { border-top: 0; }

.check {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
}

/* Textsidorna: integritet och support */

.prose { padding: 8px 0 24px; }

.prose .card { padding: 8px 24px 16px; margin-top: 16px; }

.prose h2 { font-size: 22px; font-weight: 800; margin: 20px 0 6px; }

.prose h3 { font-size: 18px; font-weight: 700; margin: 20px 0 4px; }

.prose p { margin: 0 0 12px; }

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

footer {
  margin-top: 72px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}

footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 8px; }

footer a { color: var(--muted); }

.prose .card > :first-child { margin-top: 16px; }
