/* Kyon website. The "Orange hill" look from the app: paper, ink, one orange.
   Colour roles match Sitwell/Resources/Assets.xcassets/Palette in the app repo. */

:root {
  --paper: #FEFAF9;
  --surface: #FFFFFF;
  --ink: #1E1409;
  --ink-soft: #6F6253;
  --brand: #C2470D;        /* orange for words: links */
  --highlight: #F47B41;    /* the orange: a fill, never text */
  --highlight-ink: #1E1409;
  --action: #1E1409;       /* the main button */
  --action-ink: #FFFFFF;
  --stand: #EFE6DF;
  --mist: #EFE6DF;
  /* Tile paint, the same in light and dark. Words on every tile are ink. */
  --tile-orange: #F47B41;
  --tile-apricot: #F6A26E;
  --tile-peach: #FAD0C5;
  --tile-pale: #FCE0D9;
  --tile-sand: #EADDD3;
  --tile-ink: #1E1409;

  --margin: 16px;
  --gap: 12px;
  --block: 16px;
  --section: 32px;
  --radius: 24px;
  --max: 1080px;

  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17110A;
    --surface: #241A12;
    --ink: #FBF3EC;
    --ink-soft: #C9B9AB;
    --brand: #F79460;
    --action: #FBF3EC;
    --action-ink: #1E1409;
    --stand: #33271D;
    --mist: #33271D;
  }
}
:root[data-theme="dark"] {
  --paper: #17110A;
  --surface: #241A12;
  --ink: #FBF3EC;
  --ink-soft: #C9B9AB;
  --brand: #F79460;
  --action: #FBF3EC;
  --action-ink: #1E1409;
  --stand: #33271D;
  --mist: #33271D;
}

*, *::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(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--text);
  overflow-x: hidden;
}

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

a { color: var(--brand); text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--margin); }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--margin); top: var(--margin); z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Type */
.display, h1, h2, h3, .wordmark, .button {
  font-family: var(--rounded);
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.25rem, 1.6rem + 3.2vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.2; }
.eyebrow { color: var(--ink-soft); font-size: 1rem; }
.lede { color: var(--ink-soft); font-size: 1.125rem; max-width: 34ch; }

/* Header */
.site-header { padding-top: 12px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--block); }
.wordmark { font-size: 1.375rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; font-weight: 900; white-space: nowrap; }
.site-header nav a { color: var(--ink); font-weight: 600; text-decoration: none; padding: 12px 4px; }
.site-header nav a:hover { color: var(--brand); }

/* Buttons: one filled ink button per screen */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; min-width: 220px; padding: 0 28px;
  border-radius: 999px;
  background: var(--action); color: var(--action-ink);
  font-size: 1.0625rem; text-decoration: none;
  box-shadow: 0 3px 0 rgba(30, 20, 9, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(30, 20, 9, 0.35); }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } .button:hover, .button:active { transform: none; } }

/* Hero: paper above for the words, the orange hill below with the dog and the button */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hero-words { padding-top: clamp(12px, 4vh, 96px); display: grid; gap: 12px; }
.hero-spacer { flex: 1 1 24px; }
.scene { position: relative; display: flex; flex-direction: column; align-items: center; }
.scene .dog {
  position: relative; z-index: 1;
  width: clamp(168px, 22vw, 300px);
  margin-bottom: clamp(-34px, -2.6vw, -20px);
}
.hill {
  position: relative;
  width: 100%;
  min-height: 44svh;
  padding: clamp(40px, 6vw, 72px) var(--margin) clamp(40px, 6vh, 88px);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--highlight-ink);
  text-align: center;
}
.hill::before {
  content: "";
  position: absolute; z-index: 0;
  left: 50%; top: 0;
  width: max(175%, 900px); aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--highlight);
}
.hill > * { position: relative; z-index: 1; }
/* On the hill the button stays black in both modes, because the hill is orange in both. */
.hill .button { background: #1E1409; color: #FFFFFF; }
.hill .note { font-size: 0.9375rem; font-weight: 600; }

/* Sections on paper */
section.block { padding: 72px 0; }
section.block + section.block { padding-top: 24px; }
.section-head { display: grid; gap: 8px; margin-bottom: 28px; max-width: 40rem; }
.section-head p { color: var(--ink-soft); }

/* How a day works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 0 var(--mist);
  padding: 16px;
  display: grid; gap: 8px; align-content: start;
}
.step .picture { background: var(--tile-pale); border-radius: 16px; aspect-ratio: 3 / 2; display: grid; place-items: center; overflow: hidden; }
.step .picture img { width: 100%; height: 100%; object-fit: contain; }
.step .count { color: var(--ink-soft); font-weight: 600; font-size: 0.9375rem; margin-top: 4px; }
.step p { color: var(--ink-soft); }

/* Programs: tiles, one orange family, ink words */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: 12px 12px 16px;
  color: var(--tile-ink);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-height: 100%;
}
.tile img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; position: relative; z-index: 1; }
.tile::after {
  content: ""; position: absolute; left: 50%; bottom: -150%;
  width: 220%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: rgba(30, 20, 9, 0.07);
}
.tile h3 { position: relative; z-index: 1; font-size: 1.0625rem; margin-top: 4px; }
.tile.orange { background: var(--tile-orange); }
.tile.apricot { background: var(--tile-apricot); }
.tile.peach { background: var(--tile-peach); }
.tile.pale { background: var(--tile-pale); }
.tile.sand { background: var(--tile-sand); }
.tile.note-tile { background: transparent; box-shadow: inset 0 0 0 2px var(--mist); color: var(--ink); justify-content: center; padding: 20px; }
.tile.note-tile p { color: var(--ink-soft); font-size: 0.9375rem; }
.tile.note-tile::after { display: none; }

/* Promises */
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
@media (min-width: 760px) { .promises { grid-template-columns: repeat(3, 1fr); } }
.promise { border-top: 2px solid var(--ink); padding-top: 16px; display: grid; gap: 8px; align-content: start; }
.promise p { color: var(--ink-soft); }

/* Closing band */
.closing { padding: 72px 0 88px; text-align: center; }
.closing .wrap { display: grid; justify-items: center; gap: 12px; }
.closing .dog-small { width: 140px; }
.closing p { color: var(--ink-soft); }

/* Footer */
.site-footer { border-top: 1px solid var(--mist); padding: 28px 0 40px; color: var(--ink-soft); font-size: 0.9375rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { color: var(--ink); padding: 10px 0; display: inline-block; }

/* Big text: let the dog shrink before the words */
@media (max-height: 640px) { .scene .dog { width: 170px; } }

/* Questions: native disclosure rows with hairlines */
.faq { max-width: 44rem; border-top: 2px solid var(--mist); }
.faq details { border-bottom: 2px solid var(--mist); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 12px 0;
  font-family: var(--rounded); font-weight: 800; font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.5rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.faq details p { color: var(--ink-soft); padding: 0 0 16px; max-width: 38rem; }
.site-header nav { display: flex; gap: 12px; }
.closing .closing-help { font-size: 0.9375rem; }
