/* Pohjola: the Suomi Daily design language, as CSS.
   Tokens mirror SuomiDaily/Design/Theme.swift and Resources/Assets.xcassets. */

:root {
  /* Surfaces */
  --birch: #f6f3ee;
  --snow: #ffffff;
  --line: #e6e1d9;
  /* Ink */
  --ink: #1c2229;
  --ink-2: #6b7680;
  /* Accents */
  --fjord: #2e5e8c;
  --lingonberry: #b5443f;
  --moss: #4f7a5a;
  --amber: #d9962b;
  --fjord-tint: rgba(46, 94, 140, 0.12);
  --moss-tint: rgba(79, 122, 90, 0.12);

  /* Fixed band colours: the same in light and dark, with their own ink */
  --band-fjord: #2e5e8c;
  --band-night: #141a1f;
  --band-moss: #4f7a5a;
  --band-amber: #d9962b;

  /* Shape */
  --r-card: 18px;
  --r-control: 12px;
  --r-chip: 8px;

  /* Space */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-xxl: 40px;

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, Arial, sans-serif;
  --serif: "New York", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --rounded: "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --measure: 62ch;
  --page: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --birch: #141a1f;
    --snow: #1e262d;
    --line: #2c3740;
    --ink: #eef1f3;
    --ink-2: #9aa5ae;
    --fjord: #7fb0de;
    --lingonberry: #e8837e;
    --moss: #93c49e;
    --amber: #edb85f;
    --fjord-tint: rgba(127, 176, 222, 0.16);
    --moss-tint: rgba(147, 196, 158, 0.16);
  }
}

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

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

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

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

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

a { color: var(--fjord); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--fjord);
  outline-offset: 3px;
  border-radius: var(--r-chip);
}

.skip-link {
  position: absolute;
  left: var(--s-lg);
  top: -100px;
  background: var(--snow);
  padding: var(--s-sm) var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  z-index: 10;
}
.skip-link:focus { top: var(--s-lg); }

/* Layout */
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--s-xl); }
.narrow { max-width: 760px; }

/* Type */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 var(--s-lg); }
p:last-child { margin-bottom: 0; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: var(--measure); }
.muted { color: var(--ink-2); }
.fi { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
.reading { font-family: var(--serif); font-size: 21px; line-height: 1.4; }
.section-head { max-width: 720px; margin-bottom: var(--s-xl); }
.section-head h2 { margin-bottom: var(--s-md); }

/* Horizon rule: hairline with a small sun */
.horizon {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  margin: var(--s-lg) 0;
  border: 0;
  padding: 0;
}
.horizon::before,
.horizon::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.horizon span { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }

/* Cards */
.card {
  background: var(--snow);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s-lg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: 48px;
  padding: var(--s-md) var(--s-xl);
  border-radius: var(--r-control);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fjord); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary { color: #0e1620; } }
.btn-secondary { background: var(--snow); color: var(--fjord); border-color: var(--line); font-weight: 500; }
.btn-light { background: #f6f3ee; color: #2e5e8c; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); font-weight: 500; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }

/* Header */
.site-header { padding: var(--s-lg) 0; border-bottom: 1px solid var(--line); background: var(--birch); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-lg); flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: var(--s-md); color: var(--ink); text-decoration: none; }
.wordmark .mark { width: 40px; height: 40px; flex: none; }
.wordmark strong { display: block; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; }
.wordmark small { display: block; font-size: 0.78rem; color: var(--ink-2); font-weight: 500; }
.nav { display: flex; align-items: center; gap: var(--s-lg); flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav a:hover { color: var(--fjord); }
.nav .btn { min-height: 40px; padding: var(--s-sm) var(--s-lg); }
@media (max-width: 640px) { .nav .nav-link { display: none; } }

/* Header sitting on the fjord hero */
.site-header.on-fjord { background: var(--band-fjord); border-bottom-color: rgba(255, 255, 255, 0.14); }
.site-header.on-fjord .wordmark { color: #fff; }
.site-header.on-fjord .wordmark small { color: rgba(255, 255, 255, 0.72); }
.site-header.on-fjord .nav a { color: rgba(255, 255, 255, 0.9); }
.site-header.on-fjord .nav a:hover { color: #fff; }
.site-header.on-fjord .nav .btn-light { color: #2e5e8c; }

.mark { width: 64px; height: 64px; }
.mark-sm { width: 32px; height: 32px; }

/* ---------- Bands: full-bleed colour sections with a phone that overhangs the next band ---------- */
.band {
  --band-bg: var(--birch);
  --band-ink: var(--ink);
  --band-ink-2: var(--ink-2);
  --band-chip: var(--fjord-tint);
  --band-chip-ink: var(--fjord);
  --band-bezel: var(--snow);
  --band-bezel-line: var(--line);
  background: var(--band-bg);
  color: var(--band-ink);
  padding: 88px 0 0;
  overflow: hidden; /* the phone runs past the band's bottom edge and is cropped there */
}
.band-fjord { --band-bg: var(--band-fjord); --band-ink: #fff; --band-ink-2: rgba(255, 255, 255, 0.78); --band-chip: rgba(255, 255, 255, 0.16); --band-chip-ink: #fff; --band-bezel: #1d3f60; --band-bezel-line: rgba(255, 255, 255, 0.28); }
.band-night { --band-bg: var(--band-night); --band-ink: #eef1f3; --band-ink-2: #9aa5ae; --band-chip: rgba(255, 255, 255, 0.1); --band-chip-ink: #edb85f; --band-bezel: #2c3740; --band-bezel-line: rgba(255, 255, 255, 0.18); }
.band-moss { --band-bg: var(--band-moss); --band-ink: #fff; --band-ink-2: rgba(255, 255, 255, 0.8); --band-chip: rgba(255, 255, 255, 0.16); --band-chip-ink: #fff; --band-bezel: #35543d; --band-bezel-line: rgba(255, 255, 255, 0.28); }
.band-amber { --band-bg: var(--band-amber); --band-ink: #1c2229; --band-ink-2: rgba(28, 34, 41, 0.72); --band-chip: rgba(28, 34, 41, 0.1); --band-chip-ink: #1c2229; --band-bezel: #a8721c; --band-bezel-line: rgba(28, 34, 41, 0.25); }
.band-snow { --band-bg: var(--snow); }
.band-birch { --band-bg: var(--birch); }

.band-grid {
  display: grid;
  gap: var(--s-xxl);
  align-items: center;
}
.band-copy { max-width: 520px; }
.band-copy h1, .band-copy h2 { color: var(--band-ink); }
.band-copy h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: var(--s-md); }
.band-sub { font-size: 1.15rem; line-height: 1.5; color: var(--band-ink-2); max-width: 46ch; }
.band-sub .fi { color: var(--band-ink); font-size: 1.2em; }
.band-note { margin-top: var(--s-lg); font-size: 0.9rem; color: var(--band-ink-2); }
.band-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--band-chip);
  color: var(--band-chip-ink);
  margin-bottom: var(--s-lg);
}
.band-icon svg { width: 22px; height: 22px; }
.hero .app-icon { width: 64px; height: 64px; border-radius: 14px; margin-bottom: var(--s-xl); }
.hero h1 { margin-bottom: var(--s-lg); }
.hero-actions { display: flex; gap: var(--s-md); flex-wrap: wrap; margin-top: var(--s-xl); }

/* Phone: a bezel around a real screenshot */
.phone {
  margin: 0;
  width: min(100%, 320px);
  justify-self: center;
  background: var(--band-bezel);
  border: 1px solid var(--band-bezel-line);
  border-radius: 46px;
  padding: 8px;
  position: relative;
  margin-bottom: -72px; /* cropped by the band on small screens */
}
.phone img { width: 100%; height: auto; border-radius: 38px; display: block; }

@media (min-width: 880px) {
  .band { padding: 112px 0 0; }
  .band-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .band-grid-flip .band-copy { order: 2; }
  .band-grid-flip .phone { order: 1; }
  .band-copy { padding: 56px 0 136px; }
  .phone { width: 360px; margin-bottom: -140px; }
  .phone-right { justify-self: end; margin-right: 24px; }
  .phone-left { justify-self: start; margin-left: 24px; }
  .hero { padding-top: 72px; }
  .hero .band-copy { padding-top: 24px; max-width: 600px; }
  .hero .band-grid { grid-template-columns: 1.2fr 0.8fr; }
}
@media (max-width: 879px) {
  .band-grid-flip .phone { order: 2; }
  .band-grid-flip .band-copy { order: 1; }
}

/* ---------- Facts tiles ---------- */
.tiles-section { padding: 104px 0 72px; background: var(--birch); }
.tiles { display: grid; gap: var(--s-lg); grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  --tile-bg: var(--snow);
  --tile-ink: var(--ink);
  --tile-chip: var(--fjord-tint);
  --tile-chip-ink: var(--fjord);
  background: var(--tile-bg);
  color: var(--tile-ink);
  border-radius: var(--r-card);
  padding: var(--s-xl);
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-lg);
  border: 1px solid transparent;
}
.tile p { margin: 0; font-size: 1.2rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; max-width: 16ch; }
.tile-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--tile-chip); color: var(--tile-chip-ink); }
.tile-icon svg { width: 20px; height: 20px; }
.tile-fjord { --tile-bg: #2e5e8c; --tile-ink: #fff; --tile-chip: rgba(255, 255, 255, 0.18); --tile-chip-ink: #fff; }
.tile-amber { --tile-bg: #d9962b; --tile-ink: #1c2229; --tile-chip: rgba(28, 34, 41, 0.12); --tile-chip-ink: #1c2229; }
.tile-moss { --tile-bg: #4f7a5a; --tile-ink: #fff; --tile-chip: rgba(255, 255, 255, 0.18); --tile-chip-ink: #fff; }
.tile-night { --tile-bg: #141a1f; --tile-ink: #eef1f3; --tile-chip: rgba(255, 255, 255, 0.1); --tile-chip-ink: #edb85f; }
.tile-snow { --tile-bg: var(--snow); border-color: var(--line); }
.tile-outline { --tile-bg: transparent; border-color: var(--line); --tile-chip: var(--moss-tint); --tile-chip-ink: var(--moss); }

/* ---------- Photographs ---------- */
.photos { padding: 72px 0; background: var(--snow); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gallery { display: grid; gap: var(--s-lg); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-control);
  border: 1px solid var(--line);
  background: var(--birch);
}
.gallery figcaption { margin-top: var(--s-sm); line-height: 1.3; }
.gallery figcaption .fi { font-size: 1.35rem; display: block; }
.gallery figcaption .muted { font-size: 0.9rem; }

/* ---------- Science ---------- */
.science-section { padding: 72px 0; }
.science { display: grid; gap: var(--s-lg); }
@media (min-width: 700px) { .science { grid-template-columns: repeat(2, 1fr); } }
.quote-card { background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-xl); display: flex; flex-direction: column; gap: var(--s-sm); }
.quote-card h3 { margin-bottom: var(--s-xs); }
.quote-card p { color: var(--ink-2); margin: 0 0 var(--s-sm); }
.quote-card cite { font-style: normal; color: var(--ink-2); font-size: 0.85rem; margin-top: auto; }

/* ---------- Road to B2 ---------- */
.road-section { padding: 0 0 72px; }
.road { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-lg); grid-template-columns: 1fr; }
@media (min-width: 700px) { .road { grid-template-columns: repeat(5, 1fr); gap: var(--s-md); } }
.road li { background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-lg); display: grid; gap: var(--s-xs); align-content: start; }
.road-num { font-family: var(--rounded); font-weight: 600; font-size: 1.6rem; color: var(--amber); line-height: 1; }
.road strong { font-size: 1rem; }
.road .muted { font-size: 0.82rem; }
.road p { font-size: 0.9rem; color: var(--ink-2); margin: var(--s-sm) 0 0; }

/* ---------- Pricing ---------- */
.pricing-section { padding: 72px 0; background: var(--snow); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plans { display: grid; gap: var(--s-lg); }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, 1fr); } }
.plan { position: relative; padding: var(--s-xl); background: var(--birch); }
.plan-featured { border-color: var(--fjord); }
.plan h3 { color: var(--ink-2); font-weight: 500; font-size: 1rem; }
.plan .price { font-family: var(--rounded); font-weight: 600; font-size: 2.6rem; line-height: 1; margin: var(--s-sm) 0 var(--s-xs); }
.plan .per { color: var(--ink-2); }
.plan .badge {
  position: absolute;
  top: var(--s-lg);
  right: var(--s-lg);
  background: var(--moss-tint);
  color: var(--moss);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.plan ul { margin: var(--s-lg) 0 0; padding-left: 1.2em; color: var(--ink-2); }
.plan li { margin-bottom: var(--s-xs); }
.fine { font-size: 0.85rem; color: var(--ink-2); max-width: var(--measure); margin-top: var(--s-xl); }

/* ---------- FAQ ---------- */
.faq-section { padding: 72px 0; }
.faq details { background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-card); padding: 0 var(--s-xl); margin-bottom: var(--s-md); }
.faq summary { cursor: pointer; font-weight: 600; padding: var(--s-lg) 0; list-style: none; display: flex; justify-content: space-between; gap: var(--s-lg); align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--fjord); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: var(--s-lg); max-width: var(--measure); }

/* ---------- Waitlist ---------- */
.waitlist { padding: 72px 0; background: var(--snow); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.waitlist .wrap { display: grid; gap: var(--s-xl); }
@media (min-width: 880px) { .waitlist .wrap { grid-template-columns: 1fr 1fr; align-items: start; } }
.waitlist h2 { margin-bottom: var(--s-md); }
.form { display: grid; gap: var(--s-lg); }
.field { display: grid; gap: var(--s-xs); }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--ink-2); }
.field input, .field select, .field textarea {
  font: inherit;
  color: var(--ink);
  background: var(--birch);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: var(--s-md);
  min-height: 48px;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--fjord); outline-offset: 1px; border-color: var(--fjord); }
.form .btn { justify-self: start; }
.form .fine { margin-top: 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.field textarea { min-height: 160px; resize: vertical; line-height: 1.5; }

/* ---------- Support ---------- */
.support .section-head { margin-bottom: var(--s-xxl); }
.support-grid { display: grid; gap: var(--s-xxl); align-items: start; }
@media (min-width: 960px) { .support-grid { grid-template-columns: 1.1fr 0.9fr; } }
.support-grid h2 { font-size: 1.35rem; margin: 0 0 var(--s-lg); }
.support .faq details { margin-bottom: var(--s-sm); }
.support-form { padding: var(--s-xl); }
.support-form h2 { margin-bottom: var(--s-xs); }
.support-form > .muted { margin-bottom: var(--s-xl); }
@media (min-width: 960px) { .support-form { position: sticky; top: var(--s-xl); } }
.thanks .card p .btn + .btn { margin-left: var(--s-sm); }

/* ---------- Footer ---------- */
.site-footer { padding: var(--s-xxl) 0; color: var(--ink-2); font-size: 0.9rem; }
.site-footer nav { display: flex; gap: var(--s-lg); flex-wrap: wrap; }
.site-footer nav a { color: var(--ink-2); text-decoration: none; }
.site-footer nav a:hover { color: var(--fjord); }
.site-footer-min .wrap { display: grid; justify-items: center; gap: var(--s-lg); text-align: center; padding-top: var(--s-xl); }
.site-footer-min nav { justify-content: center; gap: var(--s-xl); }
.site-footer-min p { max-width: 60ch; font-size: 0.8rem; }
.site-footer:not(.site-footer-min) .wrap { display: grid; gap: var(--s-lg); }
@media (min-width: 700px) { .site-footer:not(.site-footer-min) .wrap { grid-template-columns: 1fr auto; align-items: start; } }

/* ---------- Legal and plain pages ---------- */
.page { padding: var(--s-xxl) 0 72px; }
.page h1 { margin-bottom: var(--s-sm); }
.page h2 { font-size: 1.35rem; margin: var(--s-xxl) 0 var(--s-md); }
.page h3 { font-size: 1.05rem; margin: var(--s-xl) 0 var(--s-sm); }
.page p, .page li { max-width: var(--measure); }
.page ul, .page ol { padding-left: 1.3em; margin: 0 0 var(--s-lg); }
.page li { margin-bottom: var(--s-xs); }
.page table { border-collapse: collapse; width: 100%; margin: 0 0 var(--s-lg); font-size: 0.95rem; }
.page th, .page td { text-align: left; vertical-align: top; padding: var(--s-sm) var(--s-md); border-bottom: 1px solid var(--line); }
.page th { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.toc { background: var(--snow); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-lg) var(--s-xl); margin: var(--s-xl) 0; }
.toc ol { margin: 0; columns: 2; column-gap: var(--s-xl); }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.toc a { text-decoration: none; }
.placeholder { background: rgba(217, 150, 43, 0.18); color: inherit; border-bottom: 2px dotted var(--amber); padding: 0 3px; border-radius: 3px; }
.notice { background: var(--fjord-tint); border-radius: var(--r-control); padding: var(--s-md) var(--s-lg); color: var(--ink); font-size: 0.95rem; }

/* Thank you */
.thanks { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.thanks .card { max-width: 520px; padding: var(--s-xxl) var(--s-xl); }
.thanks .mark { margin: 0 auto var(--s-lg); }
.thanks h1 { font-size: 2rem; }
.thanks .fi { font-size: 1.5rem; display: block; margin-bottom: var(--s-md); color: var(--ink); }
