/* KAO website. Tokens mirror Y2KCCD/Y2KCCD/DesignSystem/KAOTokens.swift (KAOColor, KAOSpace,
   KAORadius, KAOMotion springs). Font: Space Grotesk (OFL, fonts/). */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --bg: #f9faf6;
  --surface: #eef0e9;
  --raised: #ffffff;
  --line: #dde0d6;
  --outline: rgba(0, 0, 0, .08);
  --text: #171a15;
  --secondary: #656a60;
  --accent: #bcf522;
  --on-accent: #172000;
  --on-accent-2: #435512;
  --photo: #101410;
  --device-shadow: rgba(36, 48, 10, .28);

  --r-image: 28px; --r-sheet: 32px; --r-card: 24px; --r-control: 20px;
  --gutter: 20px;
  --max: 1200px;

  /* KAOMotion springs as CSS linear() curves (response / damping from KAOTokens.swift). */
  --glide-dur: 705ms;
  --glide: linear(0, .0274, .0949, .185, .2851, .3866, .4839, .5733, .6531, .7227, .782, .8316, .8723, .9053, .9316, .9521, .9678, .9797, .9884, .9947, .999, 1.0019, 1.0036, 1.0046, 1.005, 1.005, 1.0047, 1.0043, 1.0038, 1.0033, 1.0028, 1.0023, 1);
  --settle-dur: 1030ms;
  --settle: linear(0, .0277, .0962, .1878, .2898, .3933, .4924, .5834, .6646, .735, .7948, .8446, .8851, .9176, .9431, .9627, .9775, .9883, .996, 1.0012, 1.0046, 1.0066, 1.0075, 1.0077, 1.0075, 1.0069, 1.0062, 1.0054, 1.0046, 1.0038, 1.0032, 1.0025, 1);
  --pop-dur: 560ms;
  --pop: linear(0, .0414, .146, .2872, .4434, .598, .7393, .8601, .9569, 1.029, 1.078, 1.1066, 1.1186, 1.1178, 1.108, 1.0926, 1.0744, 1.0556, 1.0379, 1.0224, 1.0096, .9998, .9928, .9884, .9862, .9857, .9865, .9881, .9902, .9924, .9946, .9966, 1);
  --fade-dur: 380ms;
  --fade: linear(0, .0298, .1004, .191, .2885, .3846, .4747, .5563, .6285, .6912, .7449, .7903, .8285, .8603, .8866, .9082, .9259, .9404, .9521, .9616, .9693, .9755, .9805, .9845, .9877, .9902, .9922, .9939, .9951, .9962, .997, .9976, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151713;
    --surface: #23261f;
    --raised: #2b2e27;
    --line: #373c30;
    --outline: rgba(255, 255, 255, .08);
    --text: #f4f6ef;
    --secondary: #adb3a5;
    --accent: #c2f643;
    --on-accent: #182000;
    --device-shadow: rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, p, ul { margin: 0; }
h1, h2 { text-wrap: balance; font-weight: 700; }
p, li { text-wrap: pretty; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; border-radius: 8px; }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 12px 16px; border-radius: 14px; font-weight: 600; }
.skip:focus-visible { top: 12px; }

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

/* The owner's wordmark, tinted with the text colour through a mask. */
.wordmark {
  display: block;
  width: 74px;
  aspect-ratio: 283 / 153;
  background: currentColor;
  -webkit-mask: url("img/kao-wordmark.svg") center / contain no-repeat;
  mask: url("img/kao-wordmark.svg") center / contain no-repeat;
}

.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.site-header a { display: inline-flex; align-items: center; min-height: 44px; }
.site-header nav a { font-size: 15px; font-weight: 500; color: var(--secondary); text-decoration: none; padding: 0 4px; }
.site-header nav a:hover { color: var(--text); }

/* Type */
.display { font-size: clamp(50px, 6.4vw, 92px); line-height: .94; letter-spacing: -.055em; }
.h2 { font-size: clamp(38px, 5.6vw, 72px); line-height: .98; letter-spacing: -.045em; }
.lead { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.45; letter-spacing: -.01em; max-width: 26em; }
.line { color: var(--secondary); font-size: clamp(17px, 1.5vw, 19px); max-width: 30em; }
.cam-name { font-size: 17px; line-height: 1.2; letter-spacing: -.02em; font-weight: 600; }
.cam-sub { font-size: 13px; line-height: 1.35; color: var(--secondary); }

/* App Store badge: Apple's artwork, unmodified, at least 40px tall with clear space. */
.badge { display: inline-block; padding: 12px 0; line-height: 0; border-radius: 10px; }
.badge img { height: 54px; width: auto; }

/* Devices: Apple's official bezels with KAO screens, composited into one image, always upright. */
.device { position: relative; filter: drop-shadow(0 2px 3px var(--device-shadow)) drop-shadow(0 28px 40px var(--device-shadow)); }
.device img { width: 100%; height: auto; }
.device .stack { position: relative; }
.device .stack img + img { position: absolute; inset: 0; }
.device .look { opacity: 0; transition: opacity var(--fade-dur) var(--fade); }
.device .look.on { opacity: 1; }
.device video { position: absolute; object-fit: cover; background: var(--photo); }

/* Hero */
.hero { position: relative; padding: 8px 0 72px; }
.hero .wrap { display: grid; gap: 40px; }
.hero-copy { display: grid; gap: 24px; align-content: center; position: relative; z-index: 1; }
.hero-stage { position: relative; display: grid; justify-items: center; padding-top: 0; }
.hero-stage::before {
  content: ""; position: absolute; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1);
  top: 22%; bottom: -72px; background: var(--accent);
}
.hero-stage .device { width: min(72%, 330px); }

/* Sections */
.section { padding: 96px 0; }
.head { display: grid; gap: 14px; margin-bottom: 40px; }

/* Camera roll: a horizontal strip, native scroll with snap. */
.roll-wrap { position: relative; }
.roll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 62vw; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 var(--gutter) 8px; scroll-padding: 0 var(--gutter);
  list-style: none; margin: 0;
}
.roll::-webkit-scrollbar { display: none; }
.roll li { scroll-snap-align: start; min-width: 0; }
.frame { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-image); overflow: hidden; background: var(--photo); }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--outline); pointer-events: none; }
.cam { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-width: 0; }
.cam img { width: 40px; height: 40px; flex: none; object-fit: contain; }
.roll-nav { display: none; gap: 8px; }
.roll-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface); color: var(--text); display: grid; place-items: center;
  transition: transform var(--pop-dur) var(--pop), background-color 150ms;
}
.roll-nav button:hover { background: var(--line); }
.roll-nav button:active { transform: scale(.94); }
.roll-nav svg { width: 20px; height: 20px; fill: currentColor; }

/* Crisp or crunchy: one photo, four cameras. */
.crisp { display: grid; gap: 32px; }
.crisp .frame { aspect-ratio: 4 / 5; }
.crisp .frame img { position: absolute; inset: 0; opacity: 0; transform: scale(1.03); transition: opacity var(--fade-dur) var(--fade), transform var(--glide-dur) var(--glide); }
.crisp .frame img.on { opacity: 1; transform: none; }
.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; padding: 0; }
.picker button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  min-height: 72px; padding: 12px 14px; border: 0; cursor: pointer; border-radius: var(--r-card);
  background: var(--surface);
  transition: background-color 150ms, transform var(--pop-dur) var(--pop);
}
.picker button:hover { background: var(--line); }
.picker button:active { transform: scale(.97); }
.picker button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.picker button[aria-pressed="true"] .cam-sub { color: var(--on-accent-2); }
.picker img { width: 44px; height: 44px; object-fit: contain; flex: none; }

/* Record like a camcorder */
.band { background: var(--surface); }
.clips { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; max-width: 720px; margin: 0 auto; }
.clips figure { margin: 0; }
.clips figure:nth-child(2) { margin-top: 56px; }
.clips .cam { justify-content: center; }
.v-sp90 { left: 8.367%; top: 16.467%; width: 83.265%; height: 54.4%; }
.v-qc3 { left: 8.503%; top: 13.533%; width: 82.993%; height: 49.733%; image-rendering: pixelated; }

/* Also in KAO */
.more { display: grid; gap: 48px; }
.duo-stage { position: relative; padding-bottom: 8%; }
.duo-stage .ipad { width: 82%; }
.duo-stage .iphone { position: absolute; right: 0; bottom: 0; width: 34%; }
.list { list-style: none; padding: 0; display: grid; gap: 14px; font-size: clamp(19px, 1.7vw, 22px); line-height: 1.35; letter-spacing: -.01em; }

/* Free and Pro, and the download */
.end { text-align: center; display: grid; justify-items: center; gap: 20px; padding-top: 96px; padding-bottom: 112px; }
.end .icon { width: 112px; height: 112px; }
.end .lead { max-width: 30em; }
.end .small { font-size: 14px; color: var(--secondary); max-width: 40em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 15px; color: var(--secondary); }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer .wordmark { width: 56px; color: var(--text); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

/* Privacy */
.legal { max-width: 720px; padding-top: 24px; padding-bottom: 96px; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--secondary); font-size: 15px; margin-bottom: 32px; }
.legal h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; margin: 48px 0 12px; }
.legal p, .legal li { color: var(--secondary); }
.legal p + p, .legal ul + p { margin-top: 12px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; margin-top: 12px; }
.legal li strong, .legal p strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--text); }
.summary { margin-top: 24px; background: var(--surface); border-radius: var(--r-card); padding: 24px; }
.summary h2 { margin-top: 0; }

/* Entrances (only with JS and motion allowed). */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity var(--fade-dur) var(--fade), transform var(--glide-dur) var(--glide);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .hero-stage[data-reveal] { transform: translateY(64px); }
.js .hero-stage[data-reveal].in { transform: none; transition-duration: var(--fade-dur), var(--settle-dur); transition-timing-function: var(--fade), var(--settle); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* Depth on scroll: devices drift at different rates, never rotate. */
    .drift { animation: drift linear both; animation-timeline: view(); animation-range: cover; }
    .drift-more { animation: drift-more linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes drift { from { translate: 0 24px; } to { translate: 0 -24px; } }
    @keyframes drift-more { from { translate: 0 64px; } to { translate: 0 -64px; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .device .look, .crisp .frame img { transition: none; transform: none; }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .roll { grid-auto-columns: 280px; gap: 20px; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); scroll-padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
  .roll-nav { display: flex; }
  .roll-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
  .picker { grid-template-columns: 1fr; }
  .clips { gap: 48px; }
  .clips figure:nth-child(2) { margin-top: 96px; }
  .section { padding: 128px 0; }
}

@media (min-width: 960px) {
  .hero { padding: 24px 0 0; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 460px; gap: 24px; min-height: min(760px, calc(100dvh - 72px)); }
  .hero-copy { padding-bottom: 96px; }
  .hero-stage { align-self: end; }
  .hero-stage::before { left: 24%; right: calc((100vw - min(100vw, var(--max))) / -2 - var(--gutter)); top: 26%; bottom: 0; border-radius: var(--r-sheet) 0 0 0; }
  .hero-stage .device { width: 360px; margin-bottom: -120px; }
  .after-hero { padding-top: 200px; }
  .crisp { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 72px; align-items: center; }
  .more { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 72px; align-items: center; }
}
