/* ==========================================================================
   Killer Apps — site.css
   Single stylesheet for the whole site. No external requests, no webfonts,
   no third-party assets: consistent with our privacy and cookie policies.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  --ink:        #14171c;
  --ink-2:      #3c434e;
  --muted:      #646c79;
  --line:       #e4e0d8;
  --line-soft:  #efece6;
  --bg:         #fcfbf8;
  --surface:    #ffffff;
  --surface-2:  #f6f4ef;
  --navy:       #1f3a5f;
  --navy-soft:  #eaeff6;
  --accent:     #b07226;
  --accent-soft:#f7efe1;

  --rag-red:    #b5462f;
  --rag-amber:  #c08a1e;
  --rag-green:  #3f7d4f;

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --prose: none;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20,23,28,.04), 0 4px 14px rgba(20,23,28,.04);
  --shadow-md: 0 2px 6px rgba(20,23,28,.06), 0 18px 40px rgba(20,23,28,.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #f1efe9;
    --ink-2:      #cdcabf;
    --muted:      #9aa1ab;
    --line:       #2c313a;
    --line-soft:  #232830;
    --bg:         #14171c;
    --surface:    #191d24;
    --surface-2:  #1f242c;
    --navy:       #9db9de;
    --navy-soft:  #1c2836;
    --accent:     #d9a45c;
    --accent-soft:#2a2318;
    --rag-red:    #e0705a;
    --rag-amber:  #dcae4a;
    --rag-green:  #67ac79;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
    --shadow-md: 0 2px 6px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.35);
  }
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 650; line-height: 1.15; letter-spacing: -0.012em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.5rem); }
h2 { font-size: clamp(1.55rem, 1.1rem + 1.7vw, 2.25rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.02rem; }
p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* --- Layout ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.prose { max-width: var(--prose); }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--alt { background: var(--surface-2); border-block: 1px solid var(--line-soft); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(150deg, var(--navy), color-mix(in srgb, var(--accent) 70%, var(--navy)));
  display: grid; place-items: center;
  color: #fff; font-family: var(--serif); font-size: 15px; line-height: 1; padding-bottom: 1px;
}
.brand__name { font-family: var(--sans); font-weight: 600; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  text-decoration: none; font-size: .92rem; color: var(--ink-2);
  padding: .35rem 0; border-bottom: 1.5px solid transparent; transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav__toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 9px;
  padding: .45rem .7rem; font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer;
}
@media (max-width: 800px) {
  .nav__toggle { display: block; }
  .nav {
    position: absolute; inset: 66px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 24px 1rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line-soft); color: var(--accent); }
}

/* --- Type helpers ------------------------------------------------------- */
.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
.lede { font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem); color: var(--ink-2); line-height: 1.6; }
.small { font-size: .88rem; color: var(--muted); }
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-size: .95rem; font-weight: 500; text-decoration: none;
  padding: .7rem 1.25rem; border-radius: 10px; border: 1px solid transparent;
  transition: transform .12s ease, background .15s, border-color .15s, color .15s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--navy)); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -20% -60% 40%; height: 420px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 70%);
  opacity: .8; pointer-events: none; z-index: -1;
}
.hero h1 { max-width: none; }
.hero .lede { max-width: 75ch; }
.hero__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2.5rem; font-size: .85rem; color: var(--muted); }
.hero__meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero__meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* --- Grids and cards ---------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
/* Exactly two columns on desktop — keeps a set of four cards as a tidy 2x2
   rather than three-plus-an-orphan. */
.grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .grid--half { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card h3 { margin-bottom: .45rem; }
.card p:last-child { margin-bottom: 0; }
.card--link { text-decoration: none; display: block; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card__num {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em;
  color: var(--accent); display: block; margin-bottom: .9rem;
}

/* --- App icon tiles ----------------------------------------------------- */
.appicon {
  width: 68px; height: 68px; border-radius: 22%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  /* Real App Store icons are mostly white, so the squircle needs a hairline
     of its own or it dissolves into the card. */
  box-shadow: 0 1px 2px rgba(20,23,28,.12), inset 0 0 0 1px rgba(20,23,28,.14);
  font-family: var(--serif); font-size: 30px; color: #fff; line-height: 1;
}
.appicon img { width: 100%; height: 100%; object-fit: cover; }
.appicon--lg { width: 96px; height: 96px; font-size: 42px; }
.appicon--toodall { background: linear-gradient(150deg, #3f7d4f, #1f3a5f); }
.appicon--jott    { background: linear-gradient(150deg, #c08a1e, #8c4a2f); }
.appicon--timeit  { background: linear-gradient(150deg, #2c6f8e, #1f3a5f); }
.appicon--new     { background: linear-gradient(150deg, #6c727d, #3c434e); }

.appcard { display: flex; gap: 1.1rem; align-items: flex-start; }
.appcard__body { min-width: 0; }
.appcard h3 { margin-bottom: .3rem; }
.appcard .small { margin: 0; }
.appcard__more { display: inline-block; margin-top: .9rem; font-size: .9rem; color: var(--accent); font-weight: 500; }
.appcard__more::after { content: " \2192"; }

/* --- Status badge (e.g. an app not yet on the App Store) ---------------- */
.badge {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--accent-soft); border-radius: 999px; padding: .18rem .6rem;
  vertical-align: middle; margin-left: .5rem;
}
.btn[aria-disabled="true"] { cursor: default; opacity: .9; }
.btn[aria-disabled="true"]:hover { transform: none; }
.appicon--balance { background: linear-gradient(150deg, #2f6f4f, #1f3a5f); }

/* --- App page hero ------------------------------------------------------ */
.apphero { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.6rem; }
.apphero h1 { margin: 0; }
.apphero__tag { color: var(--muted); font-size: .95rem; margin: .35rem 0 0; }

/* --- Feature list ------------------------------------------------------- */
.features { display: grid; gap: 1.5rem 2.2rem; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); list-style: none; padding: 0; }
.features li { margin: 0; }
.features h4 { margin-bottom: .3rem; }
.features p { margin: 0; color: var(--ink-2); font-size: .95rem; }

/* --- RAG chips ---------------------------------------------------------- */
.rag { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.rag li {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0;
  border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; font-size: .87rem; background: var(--surface);
}
.rag i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rag .r { background: var(--rag-red); }
.rag .a { background: var(--rag-amber); }
.rag .g { background: var(--rag-green); }

/* --- Screenshot strip --------------------------------------------------- */
.shots { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 0; padding: 0; }
.shot { margin: 0; }
.shot__frame {
  position: relative;
  border: 1px solid var(--line); border-radius: 26px; background: var(--surface-2);
  aspect-ratio: 1290 / 2796; overflow: hidden; display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
/* The placeholder sits underneath; a real screenshot covers it, and a missing
   one removes itself, so the frame is never blank. */
.shot__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot__placeholder { color: var(--muted); font-size: .78rem; text-align: center; padding: 1rem; font-family: var(--mono); }
.shot figcaption { font-size: .84rem; color: var(--muted); margin-top: .6rem; text-align: center; }

/* --- Rotating screenshot (app pages) ----------------------------------- */
/* One screenshot that changes every few seconds. site.js builds the device and
   Light/Dark switches and the dots from the manifest embedded in the page. */
.showcase { display: grid; justify-items: center; gap: 1.1rem; margin-top: 1.5rem; }
.showcase__controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.showcase__controls[hidden], .showcase__dots[hidden], .seg[hidden] { display: none; }
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.seg button {
  font: inherit; font-size: .87rem; color: var(--ink-2); background: none; border: 0;
  padding: .38rem .95rem; border-radius: 999px; cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--surface); }
.seg button:focus-visible, .showcase__dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.showcase__figure { margin: 0; width: 100%; display: grid; justify-items: center; gap: .9rem; }
/* The stage keeps the tallest screenshot's shape for the device, so the page doesn't
   jump as screenshots change; the screenshots crossfade on top of each other */
.showcase__stage { display: grid; place-items: center; width: 100%; }
/* Narrow enough that the switches, the whole screenshot, its caption and the dots fit
   in the window below the sticky header */
.showcase { scroll-margin-top: 84px; }
.showcase__stage--iphone { max-width: min(320px, calc((100svh - 340px) * .46)); }
.showcase__stage--ipad, .showcase__stage--mac { max-width: min(880px, calc((100svh - 340px) * 1.33)); }
.showcase__stage img {
  grid-area: 1 / 1; width: 100%; height: auto; display: block;
  opacity: 0; transition: opacity .6s ease;
  border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.showcase__stage--iphone img { border-radius: 34px; }
.showcase__stage--ipad img { border-radius: 18px; }
/* Mac windows bring their own edge and corners; a frame drawn round the image would also
   outline any menu that sticks out past the window */
.showcase__stage--mac img { border: 0; border-radius: 10px; box-shadow: none; }
.showcase__stage img.is-current { opacity: 1; }
.showcase figcaption { text-align: center; max-width: 46ch; min-height: 3.2em; }
.showcase__title { display: block; color: var(--ink); font-weight: 600; }
.showcase__subtitle { display: block; color: var(--muted); font-size: .92rem; }

.showcase__dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem; }
.showcase__dots button {
  width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 50%;
}
.showcase__dots button::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--line); transition: background .2s, transform .2s;
}
.showcase__dots button[aria-current="true"]::before { background: var(--navy); transform: scale(1.25); }

@media (prefers-reduced-motion: reduce) {
  .showcase__stage img { transition: none; }
}

/* --- Callout / privacy panel -------------------------------------------- */
.panel {
  background: var(--navy-soft); border: 1px solid color-mix(in srgb, var(--navy) 18%, transparent);
  border-radius: var(--radius); padding: 1.6rem 1.75rem;
}
.panel h3 { margin-bottom: .5rem; }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }

.note {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; font-size: .93rem;
}
.note p:last-child { margin-bottom: 0; }

/* --- Definition rows (App Store URLs etc.) ------------------------------ */
.deflist { display: grid; gap: .1rem; margin: 0; }
.deflist div {
  display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: .5rem 1.25rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line-soft);
}
.deflist dt { font-weight: 600; font-size: .9rem; }
.deflist dd { margin: 0; font-family: var(--mono); font-size: .84rem; color: var(--ink-2); word-break: break-all; }
@media (max-width: 560px) { .deflist div { grid-template-columns: 1fr; } }

/* --- Legal documents ---------------------------------------------------- */
.legal { max-width: var(--prose); }
.legal h2 { font-size: 1.5rem; margin-top: 2.6rem; }
.legal h3 { font-size: 1.08rem; margin-top: 1.8rem; font-family: var(--sans); font-weight: 650; }
.legal table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.5rem; font-size: .92rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .7rem .8rem; border: 1px solid var(--line); }
.legal th { background: var(--surface-2); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.legal__meta { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1.2rem; margin-top: 2.5rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.toc ul { columns: 2; column-gap: 2rem; list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.toc li { break-inside: avoid; margin-bottom: .35rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); }
@media (max-width: 560px) { .toc ul { columns: 1; } }

/* --- CTA band ----------------------------------------------------------- */
.cta { background: var(--ink); color: var(--bg); border-radius: var(--radius-lg); padding: clamp(2rem, 4vw, 3.25rem); }
.cta h2 { color: var(--bg); }
.cta p { color: color-mix(in srgb, var(--bg) 78%, var(--muted)); }
.cta .btn--primary { background: var(--bg); color: var(--ink); }
.cta .btn--ghost { background: transparent; border-color: color-mix(in srgb, var(--bg) 35%, transparent); color: var(--bg); }

/* --- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); padding: 3rem 0 2.5rem; margin-top: 0; }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--sans); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { text-decoration: none; font-size: .92rem; color: var(--ink-2); }
.site-footer a:hover { color: var(--accent); }
.site-footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.site-footer__legal p { margin: 0 0 .4rem; }

/* --- Cookie notice ------------------------------------------------------ */
.cookie-notice {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 640px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 1.1rem 1.25rem;
  display: none; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.cookie-notice.is-visible { display: flex; }
.cookie-notice p { margin: 0; font-size: .88rem; color: var(--ink-2); flex: 1 1 280px; }
.cookie-notice a { color: var(--accent); }
.cookie-notice .btn { padding: .5rem 1rem; font-size: .88rem; }

/* --- Print -------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .cookie-notice, .btn-row, .toc { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 0; }
}

/* Legal pages: let the policy text and contents fill the page width. */
.legal.prose, .toc.prose { max-width: none; }
