/* Kiipa site. One stylesheet, no scripts. Light and dark follow the system setting. */
:root {
  color-scheme: light dark;
  --green: #1F9D63;
  --ink: #1B1B1F;
  --paper: #FBFBFA;
  --soft: #F1F1EE;
  --line: #DEDED9;
  --muted: #5E5E66;
  --tile: #0B0B0C;
  --tile-ink: #FFFFFF;
  --todo: #FFE9A8;
  --measure: 34rem;
  --page: 68rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #FFFFFF;
    --paper: #0B0B0C;
    --soft: #17171A;
    --line: #2A2A2F;
    --muted: #A5A5AD;
    --tile: #FFFFFF;
    --tile-ink: #0B0B0C;
    --todo: #5A4500;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; 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.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Hiragino Sans", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(100% - 2.5rem, var(--page)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 2; }

/* Header and footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.logo { display: block; padding: 0.25rem; margin: -0.25rem; }
.logo img { height: 2.25rem; width: auto; }
.nav { display: flex; gap: 1.5rem; font-size: 0.9375rem; }
.nav a { text-decoration: none; color: var(--muted); padding-block: 0.5rem; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }

.foot { border-top: 1px solid var(--line); margin-top: 6rem; padding-block: 2.5rem 3.5rem; color: var(--muted); font-size: 0.9375rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.foot ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Sections */
section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3.5rem, 9vw, 6.5rem); }
.band { background: var(--soft); }
.eyebrow { color: var(--green); font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.875rem; }
@media (prefers-color-scheme: light) { .eyebrow { color: #167A4C; } }
.lede { font-size: clamp(1.125rem, 2.2vw, 1.3125rem); line-height: 1.5; color: var(--muted); max-width: var(--measure); margin-top: 1.25rem; }
.body { color: var(--muted); max-width: var(--measure); margin-top: 1rem; }
.body + .body { margin-top: 0.875rem; }

.split { display: grid; gap: 2.5rem 4rem; align-items: center; }
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr) 17rem; }
  .split.two { grid-template-columns: minmax(0, 1fr) 31rem; }
  .split.flip { grid-template-columns: 17rem minmax(0, 1fr); }
  .split.flip > .shots { order: -1; }
}

/* Screenshots: a plain dark bezel drawn in CSS around each screen */
.shots { display: flex; gap: 1.25rem; justify-content: center; }
.phone, .tablet { background: #0B0B0C; border: 1px solid var(--line); box-shadow: 0 1.75rem 3.5rem -1.75rem rgb(0 0 0 / 0.45); transition: translate 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.5s; }
.phone { width: min(100%, 17rem); padding: 0.4375rem; border-radius: 2.6rem; }
.phone img { border-radius: 2.2rem; width: 100%; }
.shots.pair .phone { width: calc(50% - 0.625rem); max-width: 15rem; padding: 0.375rem; border-radius: 2.1rem; }
.shots.pair .phone img { border-radius: 1.75rem; }
.tablet { padding: 0.5rem; border-radius: 1.5rem; }
.tablet img { border-radius: 1.05rem; width: 100%; }
.wides { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 52rem) { .wides { grid-template-columns: 1fr 1fr; } }
.wides.tall { grid-template-columns: 1fr 1fr; max-width: 46rem; margin-inline: auto; }

/* Hero: four screens take turns inside one phone. The first stays underneath; the others fade over it. */
.hero { position: relative; overflow: clip; }
.stage { position: relative; }
.stage::before { content: ""; position: absolute; inset: -18% -45%; z-index: -1; background: radial-gradient(closest-side, rgb(31 157 99 / 0.22), rgb(31 157 99 / 0)); }
.reel { display: grid; }
.reel > picture { grid-area: 1 / 1; }
.reel .next { opacity: 0; }

/* App Store placeholder: not a link until the app is out */
.store { display: inline-flex; align-items: center; gap: 0.625rem; margin-top: 2rem; padding: 0.875rem 1.375rem; border-radius: 999px; background: var(--tile); color: var(--tile-ink); font-weight: 600; font-size: 1rem; text-decoration: none; }
.store::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--green); }
.note { color: var(--muted); font-size: 0.9375rem; margin-top: 0.875rem; }

/* What it finds */
.kinds { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 1.25rem; overflow: hidden; margin-top: 2.5rem; }
@media (min-width: 40rem) { .kinds { grid-template-columns: 1fr 1fr; } }
.kinds li { background: var(--paper); padding: 1.5rem; transition: background-color 0.3s; }
.kinds li:hover { background: var(--soft); }
.kinds p { color: var(--muted); margin-top: 0.375rem; font-size: 1rem; }
.after { margin-top: 3.5rem; }

/* Safety */
.promises { display: grid; gap: 1.75rem; margin-top: 2rem; max-width: var(--measure); }
.promises li { padding-left: 1.25rem; border-left: 3px solid var(--green); }
.promises p { color: var(--muted); margin-top: 0.375rem; }

/* Free and full */
.plans { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 44rem) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.75rem; background: var(--paper); transition: translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s; }
.plan.full { border-color: var(--green); border-width: 2px; }
.plan .kind { color: var(--muted); font-size: 0.9375rem; margin-top: 0.25rem; }
.plan ul { margin-top: 1.25rem; display: grid; gap: 0.625rem; }
.plan li { padding-left: 1.5rem; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0.125rem; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--green); }

/* Text pages */
.doc { max-width: 42rem; padding-block: clamp(2rem, 6vw, 4rem) 0; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.doc h2 { font-size: 1.375rem; margin-top: 2.75rem; }
.doc h3 { margin-top: 1.75rem; }
.doc p, .doc ul { margin-top: 0.875rem; }
.doc ul { list-style: disc; padding-left: 1.25rem; }
.doc li + li { margin-top: 0.375rem; }
.doc .meta { color: var(--muted); font-size: 0.9375rem; }
.doc .summary { background: var(--soft); border-radius: 1rem; padding: 1.25rem 1.5rem; margin-top: 1.75rem; }
.doc .summary p:first-child { margin-top: 0; }
.todo { background: var(--todo); color: inherit; padding: 0.05em 0.3em; border-radius: 0.25em; }

.lost { text-align: center; padding-block: clamp(4rem, 14vw, 9rem) 0; }
.lost p { color: var(--muted); margin-top: 1rem; }

/* Motion. Everything below is decoration: with reduced motion, or in a browser without scroll-driven
   animations, the page is simply still and fully visible. No JavaScript is involved. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
  @keyframes arrive { from { opacity: 0; transform: translateY(2.5rem) scale(0.97); } to { opacity: 1; transform: none; } }
  @keyframes turn { 0% { opacity: 0; } 5% { opacity: 1; } 25% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
  @keyframes glow { from { transform: translate(-4%, 3%) scale(0.95); } to { transform: translate(4%, -3%) scale(1.08); } }
  @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(31 157 99 / 0.55); } 60% { box-shadow: 0 0 0 0.5rem rgb(31 157 99 / 0); } }

  .intro > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .intro > :nth-child(2) { animation-delay: 0.1s; }
  .intro > :nth-child(3) { animation-delay: 0.2s; }
  .intro > :nth-child(4) { animation-delay: 0.3s; }
  .stage .phone { animation: arrive 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
  .stage::before { animation: glow 9s ease-in-out infinite alternate; }
  .store::before { animation: pulse 2.6s ease-out infinite; }

  .reel .next { animation: turn 16s linear infinite; }
  .reel .n2 { animation-delay: 3s; }
  .reel .n3 { animation-delay: 7s; }
  .reel .n4 { animation-delay: 11s; }

  @media (hover: hover) {
    .phone:hover, .tablet:hover { translate: 0 -0.375rem; box-shadow: 0 2.5rem 4rem -2rem rgb(0 0 0 / 0.5); }
    .plan:hover { translate: 0 -0.25rem; box-shadow: 0 1.5rem 2.5rem -1.75rem rgb(0 0 0 / 0.35); }
  }

  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 45%; }
    .shots.reveal, .tablet.reveal { animation-name: arrive; animation-range: entry 0% entry 55%; }
  }
}
