@import "tailwindcss";

/* Class-based dark mode — Broodle Build's editor toggles `<html class="dark">`
   and the preview bridge mirrors that into this iframe. */
@custom-variant dark (&:where(.dark, .dark *));

@theme {
  /* Soft but confident: Outfit for bold display, Nunito for warm interface and
     body copy, Fraunces for the italic asides that need a warmer hush. */
  --font-sans: "Nunito", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Outfit", "Nunito", system-ui, sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-soft: "Fraunces", Georgia, serif;

  --color-ink: #332b36;
  --color-cream: #fcf7f1;
  --color-paper: #fffdfb;
  --color-plum: #673a7a;
  --color-lilac: #cbb6e3;
  --color-mint: #7fd4b2;
  --color-ash: #736a62;
  --color-clay: #94401f;
  --color-honey: #eec474;
  --color-moss: #3f5c4b;
  --color-sage: #c9dfc5;
  --color-sky: #c9e2e9;
  --color-water: #2c5a58;
  --color-rose: #f2c6bd;
  --color-blush: #f9dfd6;
  --color-butter: #fbe6b4;

  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));
  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));
  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));
  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));
  --color-border: hsl(var(--border));
  --color-input: hsl(var(--input));
  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));
  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));
  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));
  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));
  --color-ring: hsl(var(--ring));
  --radius-lg: var(--radius);
  --radius-md: calc(var(--radius) - 2px);
  --radius-sm: calc(var(--radius) - 4px);
}

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 3.9%;
  --muted: 0 0% 96.1%;
  --muted-foreground: 0 0% 45.1%;
  --popover: 0 0% 100%;
  --popover-foreground: 0 0% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 3.9%;
  --border: 0 0% 89.8%;
  --input: 0 0% 89.8%;
  --primary: 0 0% 9%;
  --primary-foreground: 0 0% 98%;
  --secondary: 0 0% 96.1%;
  --secondary-foreground: 0 0% 9%;
  --accent: 0 0% 96.1%;
  --accent-foreground: 0 0% 9%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 0 0% 98%;
  --ring: 0 0% 3.9%;
  --radius: 1.25rem;}

.dark {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  --muted: 0 0% 14.9%;
  --muted-foreground: 0 0% 63.9%;
  --popover: 0 0% 3.9%;
  --popover-foreground: 0 0% 98%;
  --card: 0 0% 3.9%;
  --card-foreground: 0 0% 98%;
  --border: 0 0% 14.9%;
  --input: 0 0% 14.9%;
  --primary: 0 0% 98%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 14.9%;
  --secondary-foreground: 0 0% 98%;
  --accent: 0 0% 14.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --ring: 0 0% 83.1%;
}

* {
  border-color: var(--color-border);
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-color: var(--color-cream);
  background-image:
    radial-gradient(46rem 34rem at 8% -6%, rgba(214, 198, 233, 0.3) 0%, rgba(214, 198, 233, 0) 68%),
    radial-gradient(42rem 30rem at 96% 4%, rgba(252, 232, 226, 0.5) 0%, rgba(252, 232, 226, 0) 70%),
    radial-gradient(40rem 34rem at 50% 108%, rgba(211, 228, 207, 0.34) 0%, rgba(211, 228, 207, 0) 72%);
}

/*
 * iOS Safari does not support background-attachment: fixed — it either
 * repaints the background on every scroll frame (severe jank) or paints it
 * once and leaves a white band. Desktop keeps the pinned wash; touch devices
 * get a static one in the same colours.
 */
@media (hover: hover) and (pointer: fine) {
  body {
    background-attachment: fixed;
  }
}

::selection {
  background: var(--color-rose);
  color: var(--color-ink);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.06;
}

/* Display type stays confidently heavy wherever it is used. */
.font-display {
  font-weight: 800;
  letter-spacing: -0.022em;
}

.font-display .font-light,
.font-display .italic.font-light {
  font-weight: 400;
  letter-spacing: -0.01em;
}

strong, b {
  font-weight: 700;
}

.kicker {
  font-family: var(--font-sans);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.01em;
  font-weight: 700;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover {
  border-bottom-color: currentColor;
}

.nav-link[aria-current="page"] {
  border-bottom-color: currentColor;
}

.drop-cap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.6em;
  font-weight: 800;
  line-height: 0.82;
  padding-right: 0.09em;
  padding-top: 0.06em;
  color: var(--color-plum);
}

/* ── logo ──────────────────────────────────────────────────── */
.brand-logo {
  display: block;
  height: 30px;
  width: auto;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.group:hover .brand-logo {
  transform: rotate(-2deg) scale(1.03);
}

@media (min-width: 640px) {
  .brand-logo { height: 36px; }
}

@media (min-width: 1024px) {
  .brand-logo { height: 42px; }
}

/* ── layout shell ──────────────────────────────────────────
   One container for the whole site. Every section uses this so
   the left and right edges line up from page to page and the
   vertical rhythm stays identical between sections. */
.shell {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .shell { padding-inline: 1.5rem; }
}

@media (min-width: 1280px) {
  .shell { padding-inline: 2rem; }
}

/* Reading column — for article bodies and policy copy. */
.shell-narrow {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .shell-narrow { padding-inline: 1.5rem; }
}

/* The band that wraps every major section, so the gaps match. */
.band {
  padding-block: 2.5rem;
}

@media (min-width: 768px) {
  .band { padding-block: 3.5rem; }
}

.band-tight {
  padding-block: 1.5rem;
}

@media (min-width: 768px) {
  .band-tight { padding-block: 2rem; }
}

/* ── breath room ambience ──────────────────────────────────────
   Three huge colour fields drifting behind the orb. Very slow and
   very blurred so they read as light, never as shapes. */
@keyframes br-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate3d(6%, 4%, 0) scale(1.12); opacity: 0.72; }
}
@keyframes br-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.06); opacity: 0.42; }
  50% { transform: translate3d(-7%, 5%, 0) scale(0.95); opacity: 0.62; }
}
@keyframes br-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(0.98); opacity: 0.34; }
  50% { transform: translate3d(4%, -6%, 0) scale(1.1); opacity: 0.55; }
}

.br-aurora {
  will-change: transform, opacity;
}
.br-aurora-a {
  background: radial-gradient(circle, rgba(122, 200, 182, 0.55) 0%, rgba(122, 200, 182, 0) 68%);
  animation: br-drift-a 34s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.br-aurora-b {
  background: radial-gradient(circle, rgba(96, 156, 168, 0.5) 0%, rgba(96, 156, 168, 0) 68%);
  animation: br-drift-b 46s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.br-aurora-c {
  background: radial-gradient(circle, rgba(160, 205, 176, 0.42) 0%, rgba(160, 205, 176, 0) 70%);
  animation: br-drift-c 58s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* A whisper of film grain so the dark field is never flat. */
.br-grain {
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* ── contrast floors ───────────────────────────────────────
   Every ink tint now clears 4.5:1 on cream at small sizes,
   and the mid tones read as real text rather than a whisper. */
.text-ink\/25 { color: rgba(51, 43, 54, 0.62); }
.text-ink\/30 { color: rgba(51, 43, 54, 0.7); }
.text-ink\/35 { color: rgba(51, 43, 54, 0.74); }
.text-ink\/40 { color: rgba(51, 43, 54, 0.78); }
.text-ink\/45 { color: rgba(51, 43, 54, 0.82); }
.text-ink\/50 { color: rgba(51, 43, 54, 0.85); }
.text-ink\/55 { color: rgba(51, 43, 54, 0.87); }
.text-ink\/60 { color: rgba(51, 43, 54, 0.88); }
.text-ink\/65 { color: rgba(51, 43, 54, 0.9); }
.text-ink\/70 { color: rgba(51, 43, 54, 0.91); }
.text-ink\/75 { color: rgba(51, 43, 54, 0.92); }
.text-ink\/80 { color: rgba(51, 43, 54, 0.94); }
.text-ink\/85 { color: rgba(51, 43, 54, 0.95); }

.text-cream\/30 { color: rgba(253, 249, 245, 0.76); }
.text-cream\/35 { color: rgba(253, 249, 245, 0.8); }
.text-cream\/40 { color: rgba(253, 249, 245, 0.83); }
.text-cream\/45 { color: rgba(253, 249, 245, 0.85); }
.text-cream\/50 { color: rgba(253, 249, 245, 0.87); }
.text-cream\/55 { color: rgba(253, 249, 245, 0.89); }
.text-cream\/60 { color: rgba(253, 249, 245, 0.9); }
.text-cream\/65 { color: rgba(253, 249, 245, 0.92); }
.text-cream\/70 { color: rgba(253, 249, 245, 0.93); }

/* placeholders need their own floor — they were near-invisible */
::placeholder {
  color: rgba(51, 43, 54, 0.58) !important;
}

/* ── tinted surfaces ───────────────────────────────────────────
   The washes were so pale that text sitting on them lost its edge.
   Each panel keeps its pastel hue but carries a soft rim so the
   boundary against the cream page is visible. */
.surface-blush { background-color: rgba(249, 223, 214, 0.92); }
.surface-sage { background-color: rgba(201, 223, 197, 0.88); }
.surface-lilac { background-color: rgba(203, 182, 227, 0.62); }
.surface-sky { background-color: rgba(201, 226, 233, 0.9); }
.surface-rose { background-color: rgba(242, 198, 189, 0.78); }
.surface-butter { background-color: rgba(251, 230, 180, 0.92); }
.surface-blush,
.surface-sage,
.surface-lilac,
.surface-sky,
.surface-rose,
.surface-butter {
  border: 1px solid rgba(51, 43, 54, 0.09);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 26px 60px -46px rgba(51, 43, 54, 0.5);
}

/* thin decorative borders read as noise on cream; give surfaces edges */
.soft-card {
  border-color: rgba(58, 49, 61, 0.13);
}

/* ── cute surfaces ─────────────────────────────────────────── */
.soft-card {
  border-radius: 2rem;
  border: 1px solid rgba(51, 43, 54, 0.11);
  background: rgba(255, 253, 251, 0.94);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 24px 50px -34px rgba(51, 43, 54, 0.42);
  transition: transform 0.45s cubic-bezier(0.16, 0.84, 0.44, 1), box-shadow 0.45s cubic-bezier(0.16, 0.84, 0.44, 1), border-color 0.45s ease;
}

.soft-card:hover {
  border-color: rgba(103, 58, 122, 0.24);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset, 0 34px 60px -34px rgba(51, 43, 54, 0.5);
}

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(92, 81, 88, 0.07);
  padding: 0.46rem 0.9rem;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.005em;
}

.dotted-edge {
  border-bottom: 1.5px dashed rgba(92, 81, 88, 0.18);
}

.blob-mask {
  border-radius: 52% 48% 46% 54% / 46% 50% 50% 54%;
}

.blob-soft {
  border-radius: 42% 58% 55% 45% / 48% 44% 56% 52%;
}

.tilt-l { transform: rotate(-1.1deg); }
.tilt-r { transform: rotate(1deg); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  /* A label must never break across two lines inside a pill. */
  white-space: nowrap;
  /* A pill always carries its own fill, so it must never inherit the page
     text colour - inheriting ink gave black-on-dark labels. */
  color: var(--color-plum);
  transition:
    transform 0.4s cubic-bezier(0.34, 1.32, 0.4, 1),
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.4s cubic-bezier(0.16, 0.84, 0.44, 1);
  will-change: transform;
}

/* Barely-there phones: ease the tracking so pills still fit one line. */
@media (max-width: 380px) {
  .pill-btn {
    padding: 0.85rem 1.15rem;
    font-size: 10.5px;
    letter-spacing: 0.06em;
  }
}

.pill-btn:hover { transform: translateY(-2px); }
.pill-btn:active { transform: translateY(0) scale(0.98); }
.pill-btn:focus-visible {
  outline: 2px solid var(--color-plum);
  outline-offset: 3px;
}

/*
 * Disabled controls keep their OWN background and label colour, only muted.
 * The old pattern was `disabled:bg-ink/15` on an ink-tinted label, which made
 * the text and the fill the same colour — the label vanished. These rules
 * guarantee at least a 4.5:1-ish separation: a light fill, a dark label, and
 * low opacity on the whole control rather than on the text alone.
 */
.pill-btn:disabled,
.pill-btn[aria-disabled="true"] {
  cursor: not-allowed;
  background-color: rgba(51, 43, 54, 0.08) !important;
  color: rgba(51, 43, 54, 0.62) !important;
  border-color: rgba(51, 43, 54, 0.12) !important;
  box-shadow: none !important;
  opacity: 1;
  transform: none;
}

.pill-btn:disabled:hover,
.pill-btn[aria-disabled="true"]:hover {
  transform: none;
}

/* An explicitly tinted disabled state (dark backgrounds) still needs a
   readable label, so any disabled control inside a dark panel gets cream. */
.pill-btn:disabled svg,
.pill-btn[aria-disabled="true"] svg {
  opacity: 0.7;
}

/* ── texture ───────────────────────────────────────────────── */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E");
}

.paper-edge {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 20px 46px -32px rgba(92, 81, 88, 0.35);
}

/* ── motion ──────────────────────────────────────────────────
   One shared language: everything eases with a gentle "settle"
   curve, everything moves on the GPU, and nothing loops faster
   than a resting breath. */
:root {
  --ease-settle: cubic-bezier(0.16, 0.84, 0.44, 1);
  --ease-glide: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-pop: cubic-bezier(0.34, 1.32, 0.4, 1);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 58s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.99); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.rise { animation: rise 0.78s var(--ease-settle) forwards; }
.rise-2 { animation-delay: 0.1s; }
.rise-3 { animation-delay: 0.2s; }

/* A gentler arrival for panels that appear in place, with a small lift. */
@keyframes fly-in {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
.fly-in { animation: fly-in 0.62s var(--ease-settle) forwards; }

/* Three-part float reads as breathing rather than a metronome. */
@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  35% { transform: translate3d(1px, -7px, 0) rotate(1.6deg); }
  70% { transform: translate3d(-1px, -2.5px, 0) rotate(-1deg); }
}
.floaty { animation: floaty 9s var(--ease-glide) infinite; }
.floaty-slow { animation: floaty 14s var(--ease-glide) infinite; }

@keyframes bob {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.6deg); }
  50% { transform: translate3d(0, -6px, 0) rotate(1.6deg); }
}
.bob { animation: bob 7.5s var(--ease-glide) infinite; }

@keyframes sway {
  0%, 100% { transform: rotate(-3.4deg) translate3d(0, 0, 0); }
  50% { transform: rotate(3.4deg) translate3d(0, -2px, 0); }
}
.sway { animation: sway 10s var(--ease-glide) infinite; transform-origin: bottom center; }

@keyframes drift {
  0% { transform: translate3d(0, 0, 0); }
  28% { transform: translate3d(22px, -7px, 0); }
  55% { transform: translate3d(-16px, 5px, 0); }
  80% { transform: translate3d(6px, -3px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
.drift { animation: drift 26s var(--ease-glide) infinite; }
.drift-slow { animation: drift 38s var(--ease-glide) infinite; }

@keyframes shimmer {
  0%, 100% { opacity: 0.22; transform: translate3d(0, 0, 0); }
  50% { opacity: 0.58; transform: translate3d(0, -2px, 0); }
}
.shimmer { animation: shimmer 7.5s var(--ease-glide) infinite; }

/* Fireflies: drift and pulse, so they read as alive. */
@keyframes firefly {
  0%, 100% { opacity: 0.25; transform: translate3d(0, 0, 0) scale(0.85); }
  40% { opacity: 0.9; transform: translate3d(14px, -10px, 0) scale(1.15); }
  70% { opacity: 0.45; transform: translate3d(-8px, -4px, 0) scale(0.95); }
}

.firefly {
  animation: firefly 14s var(--ease-glide) infinite;
  will-change: transform, opacity;
}

/* Slow horizontal swell so the water surface breathes. */
@keyframes water-swell {
  0%, 100% { transform: translate3d(0, 0, 0) scaleY(1); }
  50% { transform: translate3d(-3%, -3px, 0) scaleY(1.04); }
}
.water-swell {
  animation: water-swell 13s var(--ease-glide) infinite;
  transform-origin: center bottom;
}
.water-swell-slow {
  animation: water-swell 19s var(--ease-glide) infinite reverse;
  transform-origin: center bottom;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
.wiggle:hover { animation: wiggle 0.5s var(--ease-glide) 2; }

@keyframes ripple-ring {
  0%   { transform: scale(0.06); opacity: 0; }
  10%  { opacity: 1; }
  55%  { opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 0; }
}
.ripple-ring {
  animation: ripple-ring 3.4s cubic-bezier(0.1, 0.68, 0.24, 1) forwards;
  will-change: transform, opacity;
  box-shadow: 0 0 6px rgba(253, 249, 245, 0.55);
}

/* The bright catch of light where a ripple is born. */
@keyframes ripple-bloom {
  0%   { transform: scale(0.3); opacity: 1; }
  50%  { transform: scale(1.45); opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}
.ripple-bloom {
  background: radial-gradient(circle, rgba(253, 249, 245, 0.95) 0%, rgba(253, 249, 245, 0.5) 42%, rgba(253, 249, 245, 0) 72%);
  animation: ripple-bloom 2.4s cubic-bezier(0.16, 0.84, 0.44, 1) forwards;
}

/* Slow bands of light crossing the pond surface. */
@keyframes caustic {
  0%   { transform: translate3d(-4%, 0, 0) scaleX(1); opacity: 0.34; }
  50%  { transform: translate3d(4%, 2px, 0) scaleX(1.08); opacity: 0.6; }
  100% { transform: translate3d(-4%, 0, 0) scaleX(1); opacity: 0.34; }
}
.caustic {
  background: linear-gradient(90deg, rgba(251, 247, 240, 0) 0%, rgba(251, 247, 240, 0.62) 48%, rgba(251, 247, 240, 0) 100%);
  animation: caustic 17s ease-in-out infinite;
  will-change: transform, opacity;
}
.caustic-a { animation-duration: 17s; }
.caustic-b { animation-duration: 23s; animation-delay: -6s; }
.caustic-c { animation-duration: 29s; animation-delay: -13s; }

/* ── flip cards ────────────────────────────────────────────── */
.flip { perspective: 1400px; }
.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.78s cubic-bezier(0.34, 1.12, 0.36, 1);
  transform-style: preserve-3d;
  will-change: transform;
}
.flip[data-flipped="true"] .flip-inner { transform: rotateY(180deg); }
.flip:hover .flip-inner { transform: translateY(-3px); }
.flip[data-flipped="true"]:hover .flip-inner { transform: translateY(-3px) rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}
.flip-back { transform: rotateY(180deg); }

/* ── breathing circle ──────────────────────────────────────── */
.breath-halo {
  animation: halo 5s ease-in-out infinite;
}
@keyframes halo {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.16); opacity: 0.12; }
}

/* ── misc ──────────────────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .rise, .fly-in, .floaty, .floaty-slow, .bob, .sway, .drift, .drift-slow,
  .shimmer, .breath-halo, .caustic, .ripple-ring, .ripple-bloom, .firefly, .wiggle,
  .water-swell, .water-swell-slow, .br-aurora {
    animation: none !important;
  }
  .flip-inner { transition: none; }
  .flip:hover .flip-inner { transform: none; }
  html { scroll-behavior: auto; }
}

/* ── mobile foundation ─────────────────────────────────────
   Phone-first safety net. Everything below only tightens what the
   desktop layout already does; nothing here changes the look at lg. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* ── interactive cursor ─────────────────────────────────────
   Tailwind v4 preflight sets `cursor: default` on buttons, so
   every control read as dead text. Anything clickable now says so. */
button:not(:disabled),
[role="button"]:not(:disabled),
select:not(:disabled),
summary,
label[for] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

a {
  cursor: pointer;
}

/* ── iOS input zoom ───────────────────────────────────────────
   Safari zooms the page whenever a focused field is under 16px.
   Keep every control at 16px so tapping never shifts the layout. */
input,
textarea,
select {
  font-size: 16px;
}

/* ── hover is not a touch affordance ─────────────────────────
   Anything that only appears on hover is unreachable on a phone,
   so hover styling is confined to devices that actually hover. */
@media (hover: none) {
  .flip:hover .flip-inner {
    transform: none;
  }
}

body {
  /* Nothing may push the page sideways on a phone. */
  overflow-x: hidden;
  /* Stops iOS Safari inflating text in landscape. */
  -webkit-font-smoothing: antialiased;
  text-underline-offset: 0.2em;
}

/* The notch and the home indicator are real estate, not padding. */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Media can never overflow its column. */
img, svg, video, canvas {
  max-width: 100%;
}

/*
 * iOS Safari paints the page background through a transparent PNG, which is
 * fine, but it also lets a user long-press an image and drag it out of the
 * page. These rules stop that without touching how the image renders.
 */
img {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

/* Intrinsic ratio only for images without explicit sizing, so a logo
   with a CSS height keeps its height instead of collapsing. */
img:not([width]):not([height]) {
  height: auto;
}

/* Long words and URLs wrap instead of forcing a horizontal scrollbar. */
h1, h2, h3, h4, p, li, blockquote, a {
  overflow-wrap: break-word;
}

/* Form fields must be >= 16px or iOS zooms in on focus. This applies to
   text inputs only — a button is not focusable as a text field, and forcing
   16px there destroys the small uppercase label typography. */
input,
textarea,
select {
  font-size: max(16px, 1em);
  font-family: inherit;
}

button {
  font-family: inherit;
}

/* Comfortable hit targets everywhere on touch. */
@media (pointer: coarse) {
  button, a[role="button"], [type="button"], [type="submit"] {
    min-height: 44px;
  }
}

/* Tighter display type on very small screens so headings never
   crowd the edge or break mid-word. */
@media (max-width: 420px) {
  .font-display {
    letter-spacing: -0.015em;
  }
  .shell, .shell-narrow {
    padding-inline: 1.15rem;
  }
}

/* Section padding tightens on phones — 3.5rem of vertical air is a
   lot of scroll when the viewport is 640px tall. */
@media (max-width: 639px) {
  .band { padding-block: 2rem; }
  .band-tight { padding-block: 1.25rem; }
}

