/* ==========================================================================
   Hapytask website — shared design system
   Tokens mirror the app (src/theme/tokens.ts): Nunito, navy ink, brand green
   pill buttons with a chunky bottom edge, white rounded cards, coin gold.
   ========================================================================== */

/* Nunito (variable, latin) — self-hosted so the site makes no third-party font requests. OFL-1.1. */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/assets/fonts/nunito-latin-wght.woff2') format('woff2-variations'), url('/assets/fonts/nunito-latin-wght.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Ink */
  --ink: #031945;
  --ink-2: #1c3263;
  --body: #2d3f64;
  --muted: #566582;

  /* Brand */
  --green: #00a749;
  --green-hover: #00b24f;
  --green-edge: #00742f;
  /* Darker brand green for white-text buttons/pills (4.76:1 with white; AA). --green stays for art. */
  --green-ui: #008539;
  --green-ui-hover: #007f37;
  --green-ui-edge: #005a24;
  --blue: #1f73e6;
  --blue-edge: #0f4fb3;
  --blue-soft: #c8edfe;
  --navy: #152b62;
  --navy-border: #2f4e9c;
  --navy-deep: #0b1d4a;
  --gold: #ffc629;
  --gold-deep: #f7a81b;
  --gold-edge: #d98a06;
  --cream: #fff3e6;
  --reward: #562702;
  --purple: #7a5af5;
  --purple-deep: #2b2382;
  --orange: #ff8a2a;
  --pink: #ff8fb1;
  --peach: #ffe5c9;
  --mint: #d7f7e3;
  --lav: #ebe5ff;

  /* Sky */
  --sky-1: #3fa9f7;
  --sky-2: #75cdfd;
  --sky-3: #b9ecff;
  --sky-4: #e9f9ff;
  --cloud: #f5fbff;

  /* Surfaces */
  --surface: #ffffff;
  --surface-alt: #f1f4fa;
  --border: #e3e8f2;
  --edge: rgba(1, 40, 121, 0.14);

  /* Shape */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-soft: 0 10px 30px -14px rgba(6, 17, 43, 0.28);
  --shadow-card: 0 24px 50px -24px rgba(6, 17, 43, 0.35);
  --shadow-float: 0 30px 60px -22px rgba(3, 25, 69, 0.45);

  /* Layout */
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 136px);
  --nav-h: 76px;

  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  background: var(--cloud);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: #1a66d1; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--blue-edge); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 900; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; }
::selection { background: var(--gold); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill); font-weight: 800;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 820px); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; }
.center { text-align: center; }

/* ---------- Type helpers ---------- */
.display {
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.h2 { font-size: clamp(2.05rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; }
.h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--body); font-weight: 600; }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px;
  background: #fff; color: var(--ink);
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 800; letter-spacing: 0.01em;
  box-shadow: inset 0 -3px 0 var(--edge), 0 6px 16px -8px rgba(6, 17, 43, 0.3);
  margin-bottom: 18px;
}
.eyebrow img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.eyebrow--dark { background: rgba(255, 255, 255, 0.14); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25); backdrop-filter: blur(8px); }

/* Hand-drawn underline for a highlighted word */
.scribble { position: relative; white-space: nowrap; z-index: 0; }
.scribble::after {
  content: ''; position: absolute; left: -2%; right: -2%; bottom: -0.08em; height: 0.34em; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'%3E%3Cpath d='M3 14 C 40 5, 80 4, 120 8 S 180 13, 197 6' stroke='%23ffc629' stroke-width='9' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--green-ui);
  --btn-edge: var(--green-ui-edge);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: 17px; font-weight: 800; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  box-shadow: 0 5px 0 var(--btn-edge), 0 14px 24px -10px rgba(3, 25, 69, 0.4);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out), background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: 0 7px 0 var(--btn-edge), 0 18px 28px -10px rgba(3, 25, 69, 0.45); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-edge), 0 6px 12px -8px rgba(3, 25, 69, 0.4); }
.btn--white { --btn-bg: #fff; --btn-edge: #c7d5ef; --btn-fg: var(--ink); }
.btn--gold { --btn-bg: var(--gold); --btn-edge: var(--gold-edge); --btn-fg: var(--ink); }
.btn--ghost { --btn-bg: rgba(255,255,255,0.16); --btn-edge: rgba(255,255,255,0.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.4); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; box-shadow: 0 4px 0 var(--btn-edge), 0 10px 18px -10px rgba(3, 25, 69, 0.4); }
.btn--sm:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-edge); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* App Store badge — rebuilt in HTML/SVG. Swap for Apple's official badge art before launch. */
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 22px 0 18px;
  background: #000; color: #fff; text-decoration: none;
  border-radius: 14px;
  box-shadow: 0 5px 0 #2b2b2b, 0 14px 26px -12px rgba(0,0,0,0.55);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.appstore:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 7px 0 #2b2b2b, 0 18px 30px -12px rgba(0,0,0,0.55); }
.appstore:active { transform: translateY(4px); box-shadow: 0 1px 0 #2b2b2b; }
.appstore svg { width: 28px; height: 34px; flex: none; }
.appstore span { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.appstore small { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; opacity: 0.92; margin-bottom: 3px; }
.appstore strong { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; font-family: -apple-system, 'SF Pro Display', 'Helvetica Neue', var(--font); }
.appstore--sm { height: 48px; padding: 0 16px 0 13px; border-radius: 12px; gap: 8px; box-shadow: 0 4px 0 #2b2b2b; }
.appstore--sm svg { width: 22px; height: 26px; }
.appstore--sm small { font-size: 10px; margin-bottom: 2px; }
.appstore--sm strong { font-size: 18px; }

/* ---------- Cards & chips ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: inset 0 -5px 0 var(--edge), var(--shadow-card);
  padding: clamp(22px, 3vw, 32px);
  position: relative;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 800; line-height: 1.3;
  background: var(--surface-alt); color: var(--ink-2);
}
.chip--green { background: var(--mint); color: #00652b; }
.chip--gold { background: var(--cream); color: var(--reward); }
.chip--blue { background: #dcf1ff; color: #0b4aa8; }
.chip--purple { background: var(--lav); color: #4a2fc0; }
.chip--pink { background: #ffe4ee; color: #b0275a; }
.chip--navy { background: var(--navy); color: #fff; }

/* In-app style coin chip (navy pill, blue border) */
.coin-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px 0 5px;
  background: var(--navy); color: #fff;
  border: 2px solid var(--navy-border);
  border-radius: var(--r-pill);
  box-shadow: inset 0 -3px 0 #102353;
  font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums;
}
.coin-chip img { width: 24px; height: 24px; }
.coin { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding: 12px 0;
  transition: padding 0.25s var(--ease-out);
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 10px 0 22px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-radius: var(--r-pill);
  box-shadow: inset 0 -3px 0 var(--edge), 0 12px 30px -16px rgba(3, 25, 69, 0.35);
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: 148px; height: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 14px; border-radius: var(--r-pill);
  color: var(--ink); font-weight: 800; font-size: 16px; text-decoration: none;
  transition: background 0.15s;
}
.nav a:hover { background: var(--surface-alt); color: var(--ink); }
.nav a[aria-current='page'] { background: var(--blue-soft); }
.header-cta { display: flex; align-items: center; gap: 8px; }
.menu-btn {
  display: none; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--surface-alt); cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn .close { display: none; }
.menu-open .menu-btn .open { display: none; }
.menu-open .menu-btn .close { display: block; }

@media (max-width: 940px) {
  .nav {
    position: absolute; left: var(--gutter); right: var(--gutter); top: 84px;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px; background: #fff; border-radius: var(--r-lg);
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    box-shadow: inset 0 -4px 0 var(--edge), var(--shadow-float);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s, transform 0.2s var(--ease-out), visibility 0.2s;
  }
  .nav a { padding: 14px 16px; font-size: 18px; }
  /* Reveal immediately so keyboard focus can enter while the menu fades in. */
  .menu-open .nav {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.2s, transform 0.2s var(--ease-out);
  }
  .menu-btn { display: inline-flex; }
}
.header-cta .btn--sm { display: none; }
@media (max-width: 520px) {
  .brand img { width: 124px; }
  .site-header__bar { padding-left: 16px; height: 60px; }
  .header-cta .appstore--sm { display: none; }
  .header-cta .btn--sm { display: inline-flex; }
}
/* Keep the menu and app link inside the header on narrow phones. */
@media (max-width: 380px) {
  .site-header__bar { gap: 8px; padding-inline: 12px 8px; }
  .site-header .brand { flex: 0 1 124px; min-width: 0; }
  .site-header .brand img { width: 100%; }
  .header-cta { flex: none; gap: 6px; }
  .header-cta .btn--sm { font-size: 15px; padding-inline: 12px; min-height: 44px; }
  .menu-btn { flex: none; }
}
.site-header .appstore--sm {
  height: 46px; padding: 0 20px 0 16px; border-radius: var(--r-pill);
  box-shadow: none; transform: none;
}
.site-header .appstore--sm:hover { background: #1c2230; box-shadow: none; transform: none; }
.site-header .appstore--sm:active { transform: scale(0.97); box-shadow: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c6d3ef;
  padding: 88px 0 36px;
  position: relative;
  font-size: 16px;
}
.site-footer::before {
  /* cloud scallops rising from the footer */
  content: ''; position: absolute; left: 0; right: 0; top: -27px; height: 28px;
  background: radial-gradient(circle at 36px 36px, var(--ink) 34px, transparent 35px) 0 0 / 72px 36px repeat-x;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-brand img.logo { width: 170px; margin-bottom: 18px; }
.footer-brand p { max-width: 32ch; color: #aebde0; }
.site-footer h2 { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; margin-bottom: 14px; font-weight: 900; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #e4ecff; text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center;
  font-size: 14px; color: #93a6d2;
}
.footer-buddies { display: flex; gap: 4px; }
.footer-buddies img { width: 40px; height: 40px; border-radius: 50%; background: var(--blue-soft); border: 2px solid rgba(255,255,255,0.8); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Section edges ---------- */
/* Scalloped top edge in the section's own colour (echoes the Hapystore awning / clouds). */
.scallop-top::before {
  content: ''; position: absolute; left: 0; right: 0; top: -25px; height: 26px; pointer-events: none;
  background: radial-gradient(circle at 32px 32px, var(--scallop, #fff) 30px, transparent 31px) 0 0 / 64px 32px repeat-x;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  margin-top: -88px;
  padding: calc(88px + clamp(48px, 7vw, 96px)) 0 clamp(88px, 10vw, 128px);
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, var(--sky-3) 100%);
  overflow: hidden;
  color: var(--ink);
}
.page-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); letter-spacing: -0.03em; }
.page-hero .lede { color: var(--ink-2); max-width: 60ch; }
.page-hero + .section, .page-hero + main > .section:first-child { padding-top: clamp(40px, 6vw, 72px); }

/* Cloud bank along the bottom of sky heroes. A seamless tile (assets/img/decor/cloud-edge.svg)
   is used as a mask and repeated sideways at the band's full height, so puffs are never cropped
   at any screen width. The back layer is translucent, offset half a tile and drifts slowly. */
.cloudline {
  --h: clamp(64px, 7.5vw, 132px);
  position: absolute; left: 0; right: 0; bottom: -2px; height: var(--h);
  pointer-events: none; color: var(--cloud); z-index: 1;
}
.cloudline svg { display: none; }
.cloudline::before, .cloudline::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 100%;
  width: calc(100% + var(--h) * 6);
  background: currentColor;
  -webkit-mask: url('/assets/img/decor/cloud-edge.svg') 0 100% / auto 100% repeat-x;
  mask: url('/assets/img/decor/cloud-edge.svg') 0 100% / auto 100% repeat-x;
}
.cloudline::before {
  bottom: 22%; opacity: 0.5;
  -webkit-mask-position: calc(var(--h) * -3) 100%; mask-position: calc(var(--h) * -3) 100%;
  animation: cloudbank 110s linear infinite;
}
.cloudline::after { animation: cloudbank 200s linear infinite reverse; }
@keyframes cloudbank { from { transform: translateX(calc(var(--h) * -6)); } to { transform: translateX(0); } }
.cloudline--flip { top: -2px; bottom: auto; transform: scaleY(-1); }

/* Decorative drifting clouds (assets/img/decor/cloud.svg). Positioned inline with top/left/right;
   site.js turns each into a slow left-to-right drift that starts from its designed spot. */
.cloud {
  position: absolute; pointer-events: none; z-index: 0;
  width: var(--w, 180px); aspect-ratio: 220 / 124;
  background: url('/assets/img/decor/cloud-v2.svg') center / contain no-repeat;
  opacity: var(--o, 0.95);
  filter: drop-shadow(0 10px 14px rgba(24, 104, 190, 0.14));
}
.cloud.is-drifting { left: 0 !important; right: auto !important; animation: cloud-across var(--d, 120s) linear infinite; will-change: transform; }
@keyframes cloud-across { from { transform: translateX(calc(-100% - 20px)); } to { transform: translateX(calc(100vw + 20px)); } }

/* Sunburst: centre it on whatever it sits in (the phone, the QR card). */
.rays {
  position: absolute; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  width: var(--rays, 1500px); aspect-ratio: 1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, 0.17) 0deg 6deg, rgba(255, 255, 255, 0) 6deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 0 10%, transparent 60%);
  mask: radial-gradient(circle, #000 0 10%, transparent 60%);
  transform: translate(-50%, -50%);
  animation: rays-spin 140s linear infinite;
}
@keyframes rays-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: var(--delay, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Motion preferences ---------- */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bob-rot { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-12px) rotate(calc(var(--rot, 0deg) * -1)); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: 0.3; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloudline::before, .cloudline::after, .rays { animation: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Forms (shared) ---------- */
.field { display: grid; gap: 8px; }
.field label, .field .label { font-weight: 800; color: var(--ink); font-size: 16px; }
.field .hint { font-size: 14px; color: var(--muted); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 56px; padding: 14px 20px;
  font: inherit; font-size: 17px; font-weight: 600; color: var(--ink);
  background: var(--surface-alt);
  border: 2px solid #8391ad; border-radius: var(--r-md);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .select:hover, .textarea:hover { background: #e9eef8; }
.input:focus, .select:focus, .textarea:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 115, 230, 0.15); }
.select { padding-right: 48px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23031945' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; background-size: 20px; }
[aria-invalid='true'] { border-color: #e5484d !important; background: #fff5f5 !important; }
.field-error { color: #c62828; font-size: 14px; font-weight: 700; }

.page-hero { overflow: clip; }

/* Safety net: decorative art may bleed past the sides, but never creates sideways scroll.
   (clip, unlike hidden, keeps position: sticky working inside main.) */
main { overflow-x: clip; }

/* Clouds always sit behind content in the section that holds them. */
.cloud { z-index: -1; }
.page-hero { isolation: isolate; }

/* Focus ring on dark backgrounds */
.safety :focus-visible, .site-footer :focus-visible, .arcade :focus-visible { outline-color: #fff; }

/* #27 Failsafe: if site.js never runs, reveal content after 3s anyway (site.js cancels this). */
.js .reveal { animation: reveal-failsafe 0s linear 3s forwards; }
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
