/* ============================================================
   Pour — aphelionengineering.com.au/pour/
   Warm editorial system, lifted straight from the app's token law:
   canvas #F6F1E7 · ink #1C1917 · muted #6E6557 · hairline #E5DDCE
   copper #EA6A3A (sparingly) · dark #14110F / #EDE6DA
   Headings: Bricolage Grotesque (the spec's own header face).
   ============================================================ */

/* Self-hosted, latin subset, variable fonts (was Google Fonts). SIL OFL 1.1.
   Removing the external request also lets Pour drop its /pour/* CSP exception. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("/pour/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/pour/assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
}

:root {
  --canvas: #F6F1E7;
  --ink: #1C1917;
  --muted: #6E6557;
  --hairline: #E5DDCE;
  --copper: #EA6A3A;
  --copper-deep: #D55F35;
  --on-copper: #14110F;
  /* Bridge tokens consumed by the shared /chrome/chrome.css. They reference the
     mode-dependent tokens, so the chrome auto-adapts to Pour's OS light/dark. */
  --bg: var(--canvas);
  --text: var(--ink);
  --text-muted: var(--muted);
  --text-faint: color-mix(in srgb, var(--ink) 42%, var(--canvas));
  --accent: var(--copper);
  --border-mid: var(--hairline);
  --border-hair: color-mix(in srgb, var(--ink) 10%, transparent);
  --doc-ink: #3D362C;
  --doc-link: #A8431E;
  --surface: #EFE7DA;
  --dark: #14110F;
  --dark-ink: #EDE6DA;
  --dark-muted: #968D81;
  --dark-hairline: #2A2520;

  /* material ramps */
  --water-a: #A3C2CB; --water-b: #1C4F60;
  --honey-a: #E09836; --honey-b: #CA7D2D;
  --sand-a:  #D6C3A8; --sand-b:  #CBB69A;
  --mercury-a: #D6DADE; --mercury-b: #6E757D;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", sans-serif;
  --font-body: "Hanken Grotesk", "Avenir Next", "Helvetica Neue", sans-serif;

  --measure: 38rem;
  --radius-card: 28px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 50px -18px rgba(28, 25, 23, 0.18);
  --shadow-lift: 0 30px 80px -28px rgba(28, 25, 23, 0.28);
}

/* Dark mode — remap core tokens so Pour matches the rest of the domain
   (the main site honors prefers-color-scheme). Warm-paper light is the
   default; this is a calm dark variant. Copper + material ramps unchanged. */
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #14110F;
    --ink: #EDE6DA;
    --muted: #968D81;
    --hairline: #2A2520;
    --surface: #1C1813;
    --doc-ink: #CFC7BA;
    --doc-link: #F0884E;
    --shadow-soft: 0 18px 50px -18px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 30px 80px -28px rgba(0, 0, 0, 0.66);
  }
  /* keep the dark statement band distinct from the now-dark canvas */
  .band-dark { background: #0C0A08; }
  /* featured plan should still read as the highlight against --surface peers */
  .plan.featured { background: #211B15; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* paper grain — barely-there warmth */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.028'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header.site, footer.site { position: relative; z-index: 1; }
/* Reserve space for the shared fixed chrome header (/chrome/chrome.css). */
body.has-fixed-chrome { padding-top: 3rem; }

::selection { background: rgba(234, 106, 58, 0.22); }

/* Keyboard focus — Pour does not inherit the main site's base.css, so it needs
   its own visible focus ring (WCAG 2.4.7). */
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.nav-links a[aria-current="page"], .foot a[aria-current="page"] { color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p { max-width: var(--measure); }

a { color: inherit; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

/* ---------------- header ---------------- */

header.site {
  position: sticky; top: 0;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
  z-index: 50;
}
header.site.scrolled { border-bottom-color: var(--hairline); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 0.95rem; font-weight: 600; color: var(--muted);
  transition: color 0.2s ease;
  display: inline-flex; align-items: center; min-height: 24px; padding: 4px 2px;
}
.nav-links a:hover { color: var(--ink); }

/* ---------------- hero ---------------- */

.hero { padding: clamp(3rem, 8vh, 6.5rem) 0 clamp(3rem, 7vh, 5.5rem); overflow: hidden; }
.hero-grid {
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.9rem, 7.2vw, 5.4rem);
  margin: 1.1rem 0 1.4rem;
}
/* --copper (#EA6A3A) is 2.82:1 on the cream canvas — below WCAG large-text 3:1.
   The hero word uses the palette's deeper copper (#D55F35, 3.38:1) to clear it;
   the accent stays --copper everywhere it sits on dark or is a fill/border. */
.hero h1 em { font-style: normal; color: var(--copper-deep); }
.kicker {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.kicker::before {
  content: ""; width: 26px; height: 1px; background: var(--copper); display: inline-block;
}
.hero .lede { font-size: 1.2rem; color: var(--muted); margin-bottom: 2.2rem; }
.lede strong { color: var(--ink); font-weight: 700; }

.cta-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--copper); color: var(--on-copper);
  font-weight: 700; font-size: 1.02rem;
  padding: 0.95rem 1.7rem; border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 14px 34px -14px rgba(234, 106, 58, 0.55);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -16px rgba(234, 106, 58, 0.6); }
.btn:active { transform: translateY(0); }
.btn-soon { cursor: default; box-shadow: 0 8px 22px -14px rgba(234, 106, 58, 0.45); }
.btn-soon:hover { transform: none; box-shadow: 0 8px 22px -14px rgba(234, 106, 58, 0.45); }
.btn .play { width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.cta-note { font-size: 0.9rem; color: var(--muted); }

/* ----- the live liquid phone (CSS, the product demoing itself) ----- */

.phone-stage { display: grid; place-items: center; position: relative; }
.phone-stage::before {
  /* warm halo behind the phone */
  content: ""; position: absolute; width: 130%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(234,106,58,0.10) 0%, rgba(234,106,58,0.0) 62%);
  z-index: 0;
}
.phone {
  position: relative; z-index: 1;
  width: min(310px, 78vw);
  aspect-ratio: 9 / 19;
  border-radius: 46px;
  background: var(--canvas);
  border: 10px solid var(--ink);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.phone .island {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 26px; background: var(--ink); border-radius: 999px; z-index: 6;
}
.liquid {
  position: absolute; inset: 0; z-index: 1;
  display: grid;
}
.liquid .fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: var(--fill, 62%);
  background: linear-gradient(180deg, var(--water-a) 0%, #4D8194 34%, var(--water-b) 100%);
  transition: height 1s linear;
}
.liquid .fill::after {
  /* caustic shimmer */
  content: ""; position: absolute; inset: 0; opacity: 0.16;
  background:
    radial-gradient(60px 26px at 22% 28%, #fff0 30%, #cfe4ea 50%, #fff0 70%),
    radial-gradient(80px 30px at 70% 56%, #fff0 30%, #bcd8e0 50%, #fff0 70%),
    radial-gradient(56px 22px at 44% 80%, #fff0 30%, #cfe4ea 50%, #fff0 70%);
  mix-blend-mode: soft-light;
}
.wave {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--fill, 62%) - 1px);
  height: 26px; width: 200%;
  transition: bottom 1s linear;
}
.wave svg { width: 50%; height: 100%; float: left; }
.wave.back { opacity: 0.5; animation: drift 7s linear infinite reverse; }
.wave.front { animation: drift 4.6s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.phone .overlay {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 19%;
  text-align: center;
}
.overlay .step { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.overlay .timer {
  font-family: var(--font-display);
  font-weight: 800; font-size: 4rem; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.overlay .pos { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.phone .controls {
  position: absolute; bottom: 22px; left: 0; right: 0; z-index: 5;
  display: flex; justify-content: center; gap: 9px;
}
.pill {
  background: rgba(246, 241, 231, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(246, 241, 231, 0.65);
  border-radius: 999px; padding: 0.62rem 1.05rem;
  font-size: 0.82rem; font-weight: 700; color: var(--ink);
}

/* ---------------- sections ---------------- */

section { padding: clamp(3.2rem, 9vh, 6.5rem) 0; }

.sec-head { max-width: 46rem; margin-bottom: clamp(2.2rem, 5vh, 3.6rem); }
.sec-head h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin: 0.9rem 0 1rem; }
.sec-head p { color: var(--muted); font-size: 1.12rem; }

.shots {
  display: grid; gap: clamp(1.2rem, 2.6vw, 2rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.shot { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-soft); background: var(--surface); }
.shot:nth-child(2) { transform: translateY(clamp(1rem, 3vw, 2.6rem)); }
.shot:nth-child(3) { transform: translateY(clamp(2rem, 5vw, 4.6rem)); }
.shot figcaption { font-size: 0.92rem; color: var(--muted); padding: 0.85rem 1.1rem 1rem; }

/* dark statement band */
.band-dark { background: var(--dark); color: var(--dark-ink); }
.band-dark .sec-head p, .band-dark .cta-note { color: var(--dark-muted); }
.band-grid {
  display: grid; gap: clamp(2.5rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: center;
}
.band-dark h2 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.band-dark .statement li {
  list-style: none; display: flex; gap: 0.8rem; align-items: baseline;
  padding: 0.85rem 0; border-bottom: 1px solid var(--dark-hairline);
  color: var(--dark-muted); font-size: 1.05rem;
}
.band-dark .statement li::before { content: "—"; color: var(--copper); font-weight: 700; }
.band-dark .statement li strong { color: var(--dark-ink); font-weight: 700; }
.band-dark .shot { box-shadow: 0 30px 80px -28px rgba(0,0,0,0.6); transform: none; }

/* materials */
.materials { display: grid; gap: 1.1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mat {
  border-radius: 22px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--hairline);
}
.mat .pourbox { height: 150px; position: relative; overflow: hidden; }
.mat .pourbox i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62%;
  border-radius: 0;
}
.mat.water .pourbox i { background: linear-gradient(180deg, var(--water-a), var(--water-b)); }
.mat.honey .pourbox i { background: linear-gradient(180deg, var(--honey-a), var(--honey-b)); }
.mat.sand .pourbox i { background: linear-gradient(180deg, var(--sand-a), var(--sand-b)); }
.mat.mercury .pourbox i { background: linear-gradient(180deg, var(--mercury-a), var(--mercury-b)); }
.mat .pourbox::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(62% - 2px);
  height: 3px; background: rgba(255, 255, 255, 0.45); filter: blur(0.4px);
}
.mat h3 { font-size: 1.05rem; padding: 0.85rem 1rem 0.1rem; }
.mat p { font-size: 0.88rem; color: var(--muted); padding: 0 1rem 1rem; }
.mat .tag {
  display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--on-copper); background: var(--copper);
  margin-left: 0.4rem; vertical-align: 2px; padding: 0.14rem 0.45rem; border-radius: 999px;
}

/* pricing */
.plans { display: grid; gap: 1.1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.plan {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-card); padding: 1.6rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.plan.featured { background: var(--canvas); box-shadow: var(--shadow-soft); border-color: transparent; }
.plan .name { font-weight: 700; color: var(--muted); font-size: 0.95rem; }
.plan .price { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; letter-spacing: -0.02em; }
.plan .per { font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.plan .trial {
  align-self: flex-start; margin-top: 0.5rem;
  background: var(--copper); color: var(--on-copper);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.28rem 0.7rem; border-radius: 999px;
}
.plan .free-note { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }
.plans-foot { margin-top: 1.4rem; font-size: 0.95rem; color: var(--muted); }

/* privacy band */
.privacy-band { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.privacy-band .inner { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.privacy-band h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
.quiet-link {
  font-weight: 700; text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid var(--copper); padding-bottom: 2px;
}

/* ---------------- footer ---------------- */

footer.site { padding: 3rem 0 3.6rem; border-top: 1px solid var(--hairline); }
.foot { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: center; }
.foot .brand { font-size: 1.1rem; }
.foot nav { display: flex; gap: 1.4rem; }
.foot a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 600; display: inline-flex; align-items: center; min-height: 24px; padding: 4px 2px; }
.foot a:hover { color: var(--ink); }
.foot .legal { font-size: 0.85rem; color: var(--muted); width: 100%; margin-top: 0.6rem; }

/* ---------------- document pages (privacy / support) ---------------- */

.doc { padding: clamp(2.6rem, 7vh, 4.5rem) 0 clamp(3rem, 8vh, 5rem); }
.doc-head { margin-bottom: 2.6rem; }
.doc-head h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); margin: 0.9rem 0 0.9rem; }
.doc-head .meta { color: var(--muted); font-size: 0.98rem; }
.doc article { max-width: var(--measure); }
.doc h2 { font-size: 1.45rem; margin: 2.6rem 0 0.8rem; }
.doc h3 { font-size: 1.1rem; margin: 1.8rem 0 0.5rem; }
.doc p, .doc li { color: var(--doc-ink); }
.doc ul { padding-left: 1.2rem; margin: 0.7rem 0 1rem; }
.doc li { margin: 0.35rem 0; }
.doc strong { color: var(--ink); }
.doc a { color: var(--doc-link); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.doc .callout {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 1.2rem 1.4rem; margin: 1.4rem 0;
}
.doc table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.doc th { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.doc hr { border: 0; border-top: 1px solid var(--hairline); margin: 2.4rem 0; }
.doc .faq dt { font-weight: 700; font-family: var(--font-display); font-size: 1.12rem; margin-top: 1.9rem; }
.doc .faq dd { margin: 0.45rem 0 0; color: var(--doc-ink); }

/* ---------------- reveal on load ---------------- */

.reveal { opacity: 0; transform: translateY(14px); animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal.d1 { animation-delay: 0.08s; }
.reveal.d2 { animation-delay: 0.18s; }
.reveal.d3 { animation-delay: 0.3s; }
.reveal.d4 { animation-delay: 0.44s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------------- responsive ---------------- */

@media (max-width: 880px) {
  .hero-grid, .band-grid { grid-template-columns: 1fr; }
  .phone-stage { order: -1; }
  .shots { grid-template-columns: 1fr; max-width: 26rem; margin: 0 auto; }
  .shot:nth-child(2), .shot:nth-child(3) { transform: none; }
  .materials { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; max-width: 24rem; }
  .privacy-band .inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .materials { grid-template-columns: 1fr; max-width: 24rem; margin: 0 auto; }
  .mat .pourbox { height: 120px; }
}

/* ---------------- reduced motion: the brand keeps its own promise ------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wave.back, .wave.front { animation: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
  .btn { transition: none; }
  .liquid .fill, .wave { transition: none; }
}
