/* Delight — presentation page in the App Store style (v9): grey #A4A5A8, white SF type, our photos.
   1120 px column · hero · manifesto · bento of features · facts · precision · finale. */
:root {
  --page: #a4a5a8;
  --tile: #97989b;
  --ink: #fff;
  --soft: rgb(255 255 255 / .86);
  --line: rgb(255 255 255 / .32);
  --dark: #222224;
  --wrap: 1120px;
  --side: clamp(20px, 4vw, 40px);
  --r: 28px;
  color-scheme: light;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box }
body, h1, h2, p, figure { margin: 0 }
html { scroll-behavior: smooth; scroll-padding-top: 72px }
img { display: block; max-width: 100%; height: auto }
a { color: inherit; text-decoration: none }
a:focus-visible { outline: 2px solid var(--dark); outline-offset: 3px; box-shadow: 0 0 0 5px var(--ink); border-radius: 8px }
i { font-style: normal; margin: 0 .4em; opacity: .6 }

.wrap { width: min(100% - 2 * var(--side), var(--wrap)); margin-inline: auto }

h1, h2 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif; font-weight: 700; letter-spacing: -.024em; line-height: 1.05 }
h1 { font-size: clamp(2.6rem, 4.6vw, 3.75rem) }
h2 { font-size: clamp(1.6rem, 2.2vw, 1.875rem) }
p { color: var(--soft) }
.lead { font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); line-height: 1.5 }
.cap, figcaption { font-size: .8125rem; font-weight: 600; color: var(--ink) }
figcaption { white-space: nowrap }

/* brand line, as in the store screens */
.brand { display: inline-flex; align-items: baseline; gap: .5rem; line-height: 1 }
.brand b { font-size: 1.375rem; font-weight: 700; letter-spacing: -.03em }
.brand > span { font-size: .625rem; font-weight: 600; text-transform: uppercase; letter-spacing: .24em }

.btn {
  display: inline-block; padding: .8rem 1.35rem; border-radius: 999px;
  background: var(--dark); color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.2;
  transition: background .2s
}
.btn:hover { background: #000 }
.btn-sm { padding: .5rem .95rem; font-size: .8125rem }
.cta { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-top: 2rem }
.facts { font-size: .875rem; font-weight: 600 }

/* navigation */
.nav { position: sticky; top: 0; z-index: 10; background: rgb(164 165 168 / .84); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px) }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 60px }
.nav nav { display: flex; align-items: center; gap: 1.75rem; font-size: .875rem; font-weight: 500 }
.nav nav > a:not(.btn) { opacity: .9 }
.nav nav > a:not(.btn):hover { opacity: 1 }

/* 1 · hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; padding: 64px 0 40px }
.hero-copy .lead { margin-top: 1.4rem; max-width: 34ch }
.hero-art { position: relative; height: 540px }
.hero-photo { position: absolute; right: 0; top: 0; width: 380px }
.hero-photo .lit { border-radius: 22px }
.hero-photo img { aspect-ratio: 4 / 5; object-fit: cover }
.hero-photo figcaption { margin-top: .7rem; text-align: right }
.hero-phone { position: absolute; left: 4%; bottom: 0; width: 200px; filter: drop-shadow(0 18px 30px rgb(0 0 0 / .28)) }

/* 2 · manifesto */
.manifesto { max-width: 860px; padding: 120px 0 128px; text-align: center }
.say { color: var(--ink); font-size: clamp(1.5rem, 2.6vw, 2.125rem); font-weight: 600; line-height: 1.28; letter-spacing: -.018em }
.sign { margin-top: 1.6rem; font-size: 1.0625rem }

/* 3 · bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px }
.tile { position: relative; overflow: hidden; border-radius: var(--r); background: var(--tile); padding: 36px; min-height: 540px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 1px 3px rgb(0 0 0 / .07) }
.tile h2 + p { margin-top: .9rem }
.tile p { font-size: 1rem; max-width: 30ch }

.wide { grid-column: span 4; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; padding: 16px 16px 16px 36px }
.wide.flip { grid-template-columns: auto minmax(0, 1fr); padding: 16px 36px 16px 16px }
.wide.flip .t-photo { order: -1 }
.t-copy { display: flex; flex-direction: column; padding-top: 20px }
.wide .t-copy { padding-block: 20px }
.wide .cap { margin-top: auto }
.t-photo { height: 508px; width: auto; aspect-ratio: 4 / 5; border-radius: 18px }
.t-photo img { width: 100%; height: 100%; object-fit: cover }

.phone-tile { grid-column: span 2 }
.phone-tile .t-phone { position: absolute; left: 50%; top: 178px; width: 210px; transform: translateX(-50%); filter: drop-shadow(0 12px 24px rgb(0 0 0 / .25)) }

.half { grid-column: span 3; min-height: 520px }
.text-tile { grid-column: span 2; background: var(--dark); display: flex; flex-direction: column }
.text-tile h2 { font-size: clamp(1.9rem, 2.8vw, 2.5rem) }
.text-tile { box-shadow: none }
.text-tile { background: #000 }
/* real pieces of Delight's interface, each where it explains the words next to it */
.ui-panel { margin-top: 28px; background: #000; border-radius: 14px; padding: 10px 12px; max-width: 300px; box-shadow: 0 10px 24px rgb(0 0 0 / .18) }
.ui-panel img { width: 100% }
.ui-card { position: relative; z-index: 2; width: 330px; max-width: none; margin-top: auto; margin-bottom: 18px; border-radius: 6px; box-shadow: 0 14px 30px rgb(0 0 0 / .32) }
.wide .ui-card + .cap { margin-top: 0 }
.ui-color { margin: auto 0 0; display: flex; flex-direction: column; align-items: center; gap: 22px }
.ui-color img:last-child { width: calc(100% + 72px); max-width: none; margin-inline: -36px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent) }
.ui-pill { width: 150px }
.phone-side { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px }
.phone-side .t-phone { align-self: center; width: 190px; filter: drop-shadow(0 12px 24px rgb(0 0 0 / .25)) }
.photo-bottom { display: flex; flex-direction: column; gap: 24px }
.photo-bottom .t-copy { padding-top: 0 }
.photo-bottom figure { margin-top: auto }
.photo-bottom .lit { border-radius: 18px }
.photo-bottom img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 62% }
.photo-bottom figcaption { margin-top: .7rem }

/* 4 · facts */
.facts-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px }
.fact { background: var(--tile); border-radius: 22px; padding: 28px 30px 30px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 1px 3px rgb(0 0 0 / .07) }
.fact b { display: block; font-size: 1.0625rem; font-weight: 700 }
.fact > span:last-child { display: block; margin-top: .3rem; font-size: .9375rem; line-height: 1.45; color: var(--soft) }
.fact-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--dark); margin-bottom: 18px }
.fact-icon svg { width: 20px; height: 20px }

/* 5 · precision */
.precision { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 80px; align-items: center; padding-top: 120px }
.precision .lit { border-radius: 22px }
.precision h2 { font-size: clamp(2rem, 3.2vw, 2.75rem) }
.precision .lead { margin-top: 1.4rem; color: var(--ink) }
.precision .lead + p { margin-top: 1rem; max-width: 52ch }

/* 6 · finale */
.finale { padding: 152px 0 128px; text-align: center }
.finale h2 { font-size: clamp(2.4rem, 4.2vw, 3.5rem) }
.finale .lead { margin-top: 1rem }
.finale .cta { justify-content: center }

.foot { display: flex; align-items: center; justify-content: space-between; padding: 28px 0 44px; border-top: 1px solid var(--line); font-size: .8125rem; font-weight: 600 }
.foot a { opacity: .9 }
.foot a:hover { opacity: 1 }

/* tablets */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 48px }
  .hero-art { height: 520px; max-width: 520px; width: 100%; margin-inline: auto }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .wide, .half { grid-column: span 2 }
  .phone-tile, .text-tile { grid-column: span 1 }
  .precision { grid-template-columns: 320px minmax(0, 1fr); gap: 48px }
}
/* phones */
@media (max-width: 680px) {
  :root { --r: 22px; font-size: 16px }
  .nav nav > a:not(.btn) { display: none }
  .hero { padding-top: 36px }
  .hero-art { height: auto; padding-bottom: 40px }
  .hero-photo { position: static; width: 82%; margin-left: auto }
  .hero-phone { width: 38%; left: 0; bottom: 64px }
  .manifesto { padding: 88px 0 }
  .bento { display: flex; flex-direction: column }
  .tile, .half { min-height: 0; padding: 28px }
  .wide, .wide.flip { display: flex; flex-direction: column; gap: 20px; padding: 28px 16px 16px }
  .wide .t-copy { display: contents }
  .wide h2, .wide p, .wide .ui-card, .wide .ui-panel { margin-inline: 12px }
  .wide h2 + p { margin-top: -8px }
  .wide .t-photo, .wide.flip .t-photo { order: 1 }
  .wide .cap { order: 2; margin-top: -6px; padding-bottom: 6px }
  .t-photo { width: 100%; height: auto }
  .phone-tile { height: 520px }
  .phone-tile .t-phone { top: 150px; width: 62% }
  .ui-color { margin-top: 32px }
  .ui-card { width: calc(100% - 24px); max-width: 330px; margin-top: 4px; margin-bottom: 0 }
  .ui-panel { max-width: 100%; margin-top: 4px }
  .phone-side .ui-panel { margin-top: 20px }
  .phone-side { display: flex; flex-direction: column; gap: 24px }
  .phone-side .t-phone { width: 62%; align-self: center }
  .facts-row { grid-template-columns: 1fr; gap: 12px; margin-top: 12px }
  .precision { grid-template-columns: 1fr; gap: 36px; padding-top: 88px }
  .precision figure { width: 78% }
  .finale { padding: 112px 0 96px }
  .foot { flex-direction: column; gap: 12px }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto } .btn { transition: none } }

.lit { position: relative; display: block; overflow: hidden }
.lit img { display: block }

/* ── Delight's light, in the background: the app's developing light (blue → violet → coral → amber, amber leading)
   as one soft snake that winds down the page behind the content and crawls on as you scroll (snake.js). */
.snake { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: 0 }

/* ── the grey, alive: the light's colours as a faint haze, and a fine grain ───────────────────── */
body { position: relative; isolation: isolate }
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none }
body::before {
  background:
    radial-gradient(70vw 55vh at 6% 0%, rgb(255 153 46 / .10), transparent 70%),
    radial-gradient(60vw 70vh at 100% 22%, rgb(143 102 245 / .09), transparent 70%),
    radial-gradient(80vw 60vh at 18% 100%, rgb(92 173 255 / .08), transparent 72%),
    radial-gradient(50vw 40vh at 85% 92%, rgb(255 102 92 / .06), transparent 70%),
    linear-gradient(180deg, #a8a9ac, #a2a3a6 55%, #9fa0a3)
}
body::after {
  opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")
}

/* ── glass: the cards let Delight's light glow through them (Liquid Glass style); solid where blur is unsupported ── */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tile:not(.text-tile), .fact {
    background:
      linear-gradient(155deg, rgb(255 255 255 / .16), rgb(255 255 255 / .03) 38%, rgb(255 255 255 / 0) 60%, rgb(255 255 255 / .05)),
      rgb(138 139 143 / .5);
    -webkit-backdrop-filter: blur(30px) saturate(1.5);
    backdrop-filter: blur(30px) saturate(1.5);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / .38),
      inset 0 0 0 1px rgb(255 255 255 / .14),
      inset 0 -1px 0 rgb(0 0 0 / .06),
      0 10px 30px rgb(0 0 0 / .08);
  }
  .text-tile {
    background: linear-gradient(155deg, rgb(255 255 255 / .07), rgb(255 255 255 / 0) 40%), rgb(6 6 8 / .86);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    backdrop-filter: blur(30px) saturate(1.4);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), inset 0 0 0 1px rgb(255 255 255 / .06), 0 10px 30px rgb(0 0 0 / .14);
  }
}
@media (max-width: 680px) {
  .tile:not(.text-tile), .fact, .text-tile { -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4) }
}

/* ── 2 · gallery: as it passes, the page slows right down and the roll of frames moves from right to left at the scroll's
   speed; frames come in from the right and leave at the left through soft fades (gallery.js) ── */
.gallery { position: relative; margin-top: 72px; margin-bottom: 80px }
.g-stick {
  position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; padding-top: 60px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  will-change: transform, opacity
}
.g-track { display: flex; gap: 22px; will-change: transform; padding-inline: 50vw }
.g-stick { flex-direction: column; justify-content: center; gap: 26px }
.g-track { align-self: flex-start }
.g-cap { margin: 0; font-size: .8125rem; font-weight: 600; color: var(--ink); text-align: center }
.g-track img {
  height: min(54svh, 600px); width: auto; max-width: none; flex: none;
  border-radius: 14px; box-shadow: 0 16px 36px rgb(0 0 0 / .18);
  transform-origin: 50% 60%; will-change: transform, opacity
}
@media (max-width: 680px) {
  .g-track { gap: 12px }
  .g-track img { height: 48svh; border-radius: 12px }
  .g-stick { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%) }
}
@media (prefers-reduced-motion: reduce) {
  .g-stick { position: static; height: auto; overflow-x: auto; padding: 0 0 12px; -webkit-mask-image: none; mask-image: none }
  .g-track { padding-inline: var(--side) }
}
