/* Duovo · webbplats
   Färger, typsnitt och former från appens designsystem (App/Duovo/DESIGN_SYSTEM.md).
   Ljust läge = Figma-paletten; mörkt läge = appens mörka värden. */

@font-face {
  font-family: "Onest";
  src: url("fonts/Onest-Variable.ttf") format("truetype");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --bg: #F4F1EB;
  --bg-2: #EBE7DF;
  --surface: #FBFAF6;
  --line: rgba(26, 24, 21, 0.07);
  --line-2: rgba(26, 24, 21, 0.12);
  --ink: #000000;
  --ink-2: #4A4640;
  --secondary-text: #706C64;
  --on-ink: #FFFFFF;

  --sage: #6B8A6E;
  --sage-ink: #3B5A3F;
  --sage-soft: #DDE5DC;
  --clay-icon: #7A4F2F;
  --clay-soft: #EEDFD0;
  --progress-track: #EBE7DF;
  --tick: #FFFFFF;
  --warning: #C7986B;
  --warning-soft: #F0E3CF;

  --shadow-2: 0 1px 3px rgba(26, 24, 21, 0.05), 0 8px 24px rgba(26, 24, 21, 0.04);
  --shadow-3: 0 2px 6px rgba(26, 24, 21, 0.08), 0 20px 50px rgba(26, 24, 21, 0.10);

  --font-ui: "Onest", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(16px, 5vw, 48px);
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13120E;
    --bg-2: #1A1914;
    --surface: #1E1C17;
    --line: rgba(242, 238, 229, 0.07);
    --line-2: rgba(242, 238, 229, 0.12);
    --ink: #FFFFFF;
    --ink-2: #B8B0A1;
    --secondary-text: #8B8576;
    --on-ink: #000000;

    --sage: #86A589;
    --sage-ink: #C8DCC9;
    --sage-soft: #293329;
    --clay-icon: #E8D4C5;
    --clay-soft: #3A2B1F;
    --progress-track: #373530;
    --tick: #000000;
    --warning-soft: #352A1B;

    --shadow-2: 0 1px 3px rgba(0, 0, 0, 0.30), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-3: 0 2px 6px rgba(0, 0, 0, 0.35), 0 20px 50px rgba(0, 0, 0, 0.40);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.serif {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* ── Sidhuvud ─────────────────────────────── */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
}

.logo { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; }
.logo svg { width: 120px; height: auto; display: block; }

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.lang:hover { background: var(--bg-2); }

/* ── Hero ─────────────────────────────────── */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  padding-top: 32px;
  padding-bottom: 72px;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 112px;
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
h1 .serif { font-size: 1.12em; line-height: 0.9; }

.lede {
  margin: 24px 0 0;
  max-width: 30em;
  color: var(--ink-2);
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  line-height: 1.5;
}

.note {
  margin: 28px 0 0;
  color: var(--secondary-text);
  font-size: 0.9375rem;
}

/* ── Illustration: två listkort ritade som i appen ── */

.cards {
  position: relative;
  margin: 0;
  min-height: 500px;
  max-width: 600px;
  width: 100%;
  justify-self: center;
}

.card {
  position: absolute;
  width: 49%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  padding: 20px;
}

.card--packing {
  top: 110px;
  right: 0;
  transform: rotate(2deg);
}

.card--grocery {
  left: 0;
  top: 0;
  transform: rotate(-1.5deg);
  box-shadow: var(--shadow-3);
}

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.tile {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.tile svg { width: 22px; height: 22px; }
.tile--sage { background: var(--sage-soft); color: var(--sage-ink); }
.tile--clay { background: var(--clay-soft); color: var(--clay-icon); }

.card-title { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.card-sub { font-size: 0.875rem; color: var(--secondary-text); }

.items { list-style: none; margin: 0; padding: 0; }
.items li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 0.9375rem;
}
.items li + li { border-top: 1px solid var(--line); }

.box {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--line-2);
  display: grid;
  place-items: center;
}
.box svg { width: 12px; height: 12px; }
.is-done .box { background: var(--sage); border-color: var(--sage); color: var(--tick); }
.is-done .label { color: var(--secondary-text); text-decoration: line-through; }

.progress { margin-top: 14px; }
.progress-bar { height: 6px; border-radius: 999px; background: var(--progress-track); overflow: hidden; }
.progress-bar span { display: block; height: 100%; border-radius: inherit; background: var(--sage); }
.progress-text { margin-top: 8px; font-size: 0.8125rem; color: var(--secondary-text); }
.progress-text strong { color: var(--ink); font-weight: 600; }

.section-label {
  margin: 2px 0 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary-text);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 14px; background: var(--clay-soft); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  font-weight: 500;
}
.chip svg { width: 14px; height: 14px; color: var(--clay-icon); }
.chip--added { background: transparent; border-color: transparent; color: var(--ink-2); }
.chip--added svg { color: var(--ink-2); }

/* Smalt: korten i flödet, lätt överlappande, så att båda listorna syns. */
@media (max-width: 640px) {
  .cards { min-height: 0; max-width: 420px; }
  .card { position: relative; top: auto; width: 88%; padding: 16px; }
  .card--packing { margin: 16px 0 0 auto; }
}

/* ── Funktioner ───────────────────────────── */

.features { padding: 0 0 96px; }

.features h2, .status-block h2 {
  margin: 0 0 32px;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 760px) {
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.feature .tile { margin-bottom: 20px; }
.tile--ink { background: var(--bg-2); color: var(--ink-2); }
.feature h3 { margin: 0 0 8px; font-size: 1.1875rem; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.feature p { margin: 0; color: var(--ink-2); }

/* ── Status ───────────────────────────────── */

.status-block { padding: 0 0 96px; }
.status-card {
  border-radius: 26px;
  background: var(--bg-2);
  padding: clamp(28px, 6vw, 56px);
}
.status-card h2 { margin-bottom: 16px; }
.status-card p { margin: 0; max-width: 34em; color: var(--ink-2); font-size: 1.125rem; }

/* ── Sidfot ───────────────────────────────── */

.site-footer { border-top: 1px solid var(--line-2); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 28px;
  padding-bottom: 40px;
  color: var(--secondary-text);
  font-size: 0.875rem;
}
.site-footer p { margin: 0; }
.site-footer .symbol { width: 28px; height: 28px; color: var(--ink); display: block; }
.footer-brand { display: flex; align-items: center; gap: 10px; }

.footer-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
.footer-nav a:hover { color: var(--ink); }
.footer-nav a[aria-current="page"] { color: var(--ink); text-decoration-color: currentColor; }

/* ── Textsidor (integritet, support) ──────── */

.prose .wrap { max-width: calc(720px + 2 * var(--gutter)); padding-top: 24px; padding-bottom: 96px; }
.prose h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); }
.prose .lede { margin: 16px 0 40px; }
.prose section { margin-top: 36px; }
.prose h2 { margin: 0 0 12px; font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
.prose h3 { margin: 0 0 6px; font-size: 1.0625rem; letter-spacing: -0.015em; font-weight: 600; }
.prose p, .prose li { color: var(--ink-2); }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 1.25em; }
.prose li { margin-bottom: 8px; }
.prose li strong, .prose p strong { color: var(--ink); font-weight: 600; }
.prose a { text-underline-offset: 3px; }
.prose .updated { margin-top: 48px; color: var(--secondary-text); font-size: 0.9375rem; }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.contact-card p { margin: 0; }

.faq-item { padding: 16px 0; border-top: 1px solid var(--line-2); }
.faq-item:first-of-type { border-top: 0; padding-top: 0; }
.faq-item p { margin: 0; }

/* ── Utkastmarkeringar (visas bara i utkast, se build.py) ── */

.draft-banner {
  padding: 10px var(--gutter);
  background: var(--warning-soft);
  color: var(--ink);
  font-size: 0.875rem;
  text-align: center;
}

mark.todo {
  background: var(--warning-soft);
  color: var(--ink);
  border-bottom: 2px dashed var(--warning);
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 500;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.todo::before { content: "⚑ "; }

/* Hel passage som är skriven men måste anpassas eller verifieras före publicering. */
.cond {
  background: var(--warning-soft);
  color: var(--ink);
  border-left: 3px solid var(--warning);
  border-radius: 4px;
  padding: 1px 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.cond strong { color: var(--ink); }
.cond-label { font-weight: 600; }
.cond-label::before { content: "⚑ "; }
