/* pompot.app. Values come from the brand book (Design/brand) and App/Design/Palette.swift.
   One look, no dark variant. The page stands on the app's day ground; the sky lives in
   the hero and the closing band. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2"); /* wght 800, opsz 96 */
  font-weight: 800;
  font-display: swap;
}
@font-face { font-family: "Outfit"; src: url("fonts/Outfit-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/Outfit-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: only light;
  --sky: linear-gradient(180deg, #0089D6 0%, #25A3DA 20%, #50C0DE 50%, #6ED3E1 80%, #71D6E1 100%);
  --ground: #F6F9FC;
  --plate: #FFFFFF;
  --tint: #ECEFF3;                 /* black 4% on the ground */
  --hairline: rgba(0, 0, 0, 0.10);
  --ink: #1B1A1F;
  --ink-2: #4E4B54;
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.10);
  --lift: drop-shadow(0 20px 40px rgba(42, 36, 24, 0.16));
  /* One ground per feature, each a tint of a hue the app already owns:
     the reading violet, the pantry orange, the bathroom coral, the money blue. */
  --p-scan: #CFCBF0;
  --p-next: #FADCB4;
  --p-binder: #F9D0CC;
  --p-money: #BEDDFF;
  --r-panel: 70px;
  --r-card: 28px;
  --display: "Bricolage Grotesque", "Outfit", system-ui, sans-serif;
  --ui: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0 40px;                 /* the top is set with the header, below */
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
body > *, .wrap { max-width: 1200px; margin-left: auto; margin-right: auto; }

a:focus-visible, summary:focus-visible { outline: 3px solid #0089D6; outline-offset: 4px; border-radius: 10px; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 10; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; }
.skip:focus { left: 16px; }

.display {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.5px;
  text-wrap: balance;
}

/* The App Store badge is Apple's own file, used as supplied: never redrawn, recoloured,
   cropped or given a shadow. Apple asks for at least 40 px of height on screen and a
   quarter of the badge's height kept clear on every side. */
.store-badge { display: inline-block; line-height: 0; border-radius: 9px; transition: transform 0.15s ease; }
.store-badge img { display: block; height: 44px; width: auto; max-width: none; }
.store-badge:hover { transform: translateY(-2px); }
.closing .store-badge img { height: 56px; }

/* Header: the drawn wordmark, small, and the badge, in a white pill that stays at the top of
   the window while the page scrolls under it (bitepal.app's own: fixed 13 px down, inset from
   the window's sides, never wider than 1172). It is flat at the top of the page and takes a
   shadow once the page has moved. The body's top padding keeps the page clear of it. */
body { padding-top: 97px; }
.site-header {
  position: fixed; top: 13px; left: 54px; right: 54px; z-index: 20;
  max-width: 1172px; height: 72px; margin: 0 auto; padding: 0 14px 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 36px; background: var(--plate);
  transition: box-shadow 0.2s ease;
}
.site-header.moved { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10); }
.logo { position: relative; display: block; padding-right: 13px; flex: none; }
.logo .wm { height: 40px; width: auto; }
.logo .tm { position: absolute; top: 1px; right: 2px; height: 6px; width: auto; }
.site-header .link { margin-left: auto; text-decoration: none; font-weight: 600; font-size: 17px; }
.site-header .link:hover { text-decoration: underline; text-underline-offset: 4px; }
section[id], main[id] { scroll-margin-top: 104px; }

/* Hero: one rounded panel, one flat picture. 625 tall on wide screens, where a narrower
   screen only cuts the sides and keeps the middle. */
.hero {
  position: relative;
  height: 625px;
  border-radius: var(--r-panel);
  overflow: hidden;
  background: var(--sky);
  color: #fff;
  text-align: center;
}
.hero .stage { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 1200 / 625; transform: translateX(-50%); }
.hero .sky { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }

/* The four bubbles drift, each on its own slow rhythm. Places and sizes are percentages of the
   stage, matched against the owner's flat picture to within a pixel of his 5398-wide file. */
.hero .bubble {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: auto; max-width: none;
  animation: drift var(--t) ease-in-out var(--d) infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to   { transform: translate3d(var(--sway), var(--lift), 0) rotate(var(--tilt)); }
}
.b-squirrel { --x: 11.5%;   --y: 32.215%; --w: 25.238%; --t: 7.6s; --d: -2.0s; --lift: -3.4%; --sway: 0.8%;  --tilt: 1.4deg; }
.b-lunchbox { --x: 63.284%; --y: 46.659%; --w: 18.202%; --t: 8.8s; --d: -5.5s; --lift: -4.2%; --sway: -1.2%; --tilt: -1.8deg; }
.b-purse    { --x: 65.916%; --y: 21.037%; --w: 10%;     --t: 6.1s; --d: -1.2s; --lift: -7%;   --sway: 2%;    --tilt: 2.6deg; }
.b-receipt  { --x: 78.079%; --y: 33.104%; --w: 10.037%; --t: 6.9s; --d: -3.8s; --lift: -6.5%; --sway: -2%;   --tilt: -2.4deg; }

/* The phone: the recording behind the shipped frame. The screen's box is where the screenshot
   sat in the flat picture (it runs a few pixels under the bezel, as it does there). */
.hero .screen {
  position: absolute; left: 39.042%; top: 27.811%; width: 21.901%; height: 72.189%; max-width: none; object-fit: fill;
  border-radius: 13.5% 13.5% 0 0 / 7.87% 7.87% 0 0;
}
.hero .frame { position: absolute; left: 37.908%; top: 25.916%; width: 24.17%; height: auto; max-width: none; }
.hero .copy { position: absolute; top: 40px; left: 50%; width: min(760px, 100% - 32px); transform: translateX(-50%); }
.hero h1 { font-size: 56px; white-space: nowrap; }
.hero .opener { margin-top: 14px; font-size: 20px; font-weight: 600; line-height: 1.2; }
/* A picture with its headline painted in (class "painted" on the hero). The live headline
   stays for search engines and screen readers, out of sight. Take the class off when the
   picture comes without a headline, and the live one shows again. */
.hero.painted .copy { top: 0; left: 0; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); transform: none; white-space: nowrap; }

/* Features: a few words beside a coloured panel, sides alternating. Each panel holds a
   live screen in the phone, cut by the panel's foot. Only the binder's has a thing beside it. */
main { display: grid; gap: 64px; margin-top: 96px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) 580px; gap: 40px; align-items: center; }
.feature.flip { grid-template-columns: 580px minmax(0, 1fr); }
.feature.flip .panel { order: -1; }
.feature h2 { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1.02; letter-spacing: -0.5px; text-wrap: balance; max-width: 11.5em; }
.feature p { margin-top: 16px; font-size: 20px; line-height: 1.4; color: var(--ink-2); max-width: 24em; text-wrap: pretty; }

.panel { position: relative; height: 380px; border-radius: var(--r-panel); overflow: hidden; }
.panel .phone { position: absolute; top: 48px; left: var(--phone-x, 50%); width: 264px; max-width: none; transform: translateX(-50%); filter: var(--lift); }
.panel .float { position: absolute; max-width: none; filter: var(--lift); }

.p-scan { background: var(--p-scan); }
.p-next { background: var(--p-next); }
.p-binder { background: var(--p-binder); --phone-x: 60%; }
.p-binder .float { width: 190px; left: 36px; bottom: -34px; transform: rotate(-8deg); }
.p-money { background: var(--p-money); }

/* Questions */
.faq { text-align: center; padding-top: 32px; }
.faq h2 { font-size: 44px; }
.faq .list { max-width: 760px; margin: 32px auto 0; text-align: left; }
.faq details { background: var(--plate); border: 1px solid var(--hairline); border-radius: var(--r-card); box-shadow: var(--shadow); margin-bottom: 12px; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font-weight: 600; font-size: 19px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 24px 20px; font-size: 17px; max-width: 40em; }

/* The sky's closing band */
.sky { position: relative; background: var(--sky); color: #fff; overflow: hidden; }
.mist { position: absolute; height: auto; max-width: none; pointer-events: none; user-select: none; }
.closing { margin-top: 96px; text-align: center; padding: 88px 20px 140px; border-radius: var(--r-panel); }
.closing h2 { position: relative; z-index: 2; font-size: clamp(40px, 6.4vw, 80px); }
.closing .cta { position: relative; z-index: 2; margin-top: 32px; }
.closing .mist.m1 { width: 800px; left: -200px; bottom: -260px; opacity: 0.6; }
.closing .mist.m2 { width: 800px; right: -220px; bottom: -280px; opacity: 0.5; }

/* Footer: one quiet rounded panel */
.site-footer { margin-top: 64px; margin-bottom: 40px; padding: 56px 24px 44px; border-radius: var(--r-panel); background: var(--tint); text-align: center; font-size: 17px; }
.site-footer .wm { height: 44px; width: auto; margin: 0 auto; }
.site-footer nav { display: grid; gap: 14px; justify-items: center; margin-top: 28px; }
.site-footer a { text-decoration: none; font-weight: 600; }
.site-footer nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer .legal { display: block; margin-top: 28px; font-size: 15px; color: var(--ink-2); }

/* Document pages */
main.doc { display: block; margin-top: 0; padding: 40px 0 24px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(44px, 7vw, 80px); margin-bottom: 28px; }
.doc .draft { background: var(--plate); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 20px; margin-bottom: 32px; font-weight: 600; }
.doc h2 { font-size: 22px; font-weight: 600; margin: 32px 0 8px; }
.doc p { font-size: 18px; line-height: 1.55; }
.doc p + p { margin-top: 12px; }

/* Under 960 the words sit above their panel, centred, as on a phone. */
@media (max-width: 960px) {
  main { margin-top: 72px; }
  .feature, .feature.flip { grid-template-columns: minmax(0, 1fr); gap: 28px; justify-items: center; text-align: center; }
  .feature.flip .panel { order: 0; }
  .feature h2, .feature p { margin-left: auto; margin-right: auto; }
  .panel { width: 100%; max-width: 580px; }
}
/* Under 1000 the panel shows less of the stage's sides, so the bubbles move in beside the phone
   and shrink to fit: every one stays in view down to a 320-wide phone. */
@media (max-width: 1000px) {
  .b-squirrel { --x: 22.464%; --y: 45.703%; --w: 15.026%; }
  .b-lunchbox { --x: 62.369%; --y: 49.274%; --w: 14.478%; }
  .b-purse    { --x: 63.846%; --y: 21.93%;  --w: 8.435%; }
  .b-receipt  { --x: 27.843%; --y: 20.355%; --w: 7.47%; }
}
/* Under 720 a 625-tall panel would cut the painted headline's ends, so the panel turns
   square: the middle 625 of the 1200-wide picture, headline whole. */
@media (max-width: 720px) { .hero.painted { height: auto; aspect-ratio: 1 / 1; --r-panel: 48px; } }
@media (max-width: 640px) {
  :root { --r-panel: 48px; }
  body { padding-left: 16px; padding-right: 16px; font-size: 17px; }
  body { padding-top: 89px; }
  .site-header { left: 24px; right: 24px; height: 64px; padding: 0 10px 0 18px; border-radius: 32px; }
  section[id], main[id] { scroll-margin-top: 92px; }
  .logo .wm { height: 36px; }
  .hero .copy { top: 28px; }
  .hero h1 { font-size: 38px; white-space: normal; }
  .hero h1 span { display: block; }
  .hero .opener { font-size: 17px; }
  main { gap: 56px; margin-top: 56px; }
  .feature h2, .faq h2 { font-size: 36px; }
  .feature p { font-size: 18px; margin-top: 12px; }
  .panel { height: 340px; }
  .panel .phone { top: 40px; width: 236px; }
  .p-binder .float { width: 146px; left: 6px; bottom: -26px; }
  .faq summary { padding: 18px 20px; font-size: 18px; }
  .faq details p { padding: 0 20px 18px; }
  .closing { margin-top: 64px; padding: 64px 16px 110px; }
  .site-footer { margin-top: 48px; margin-bottom: 24px; padding: 44px 20px 36px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .store-badge, .site-header { transition: none; } .hero .bubble { animation: none; } }
