/* The look every HackTheFamily coming-soon page shares: a preview of the
   real website. Tokens, header lockup, badges, buttons, cards and footer
   use the same names and values as the hackthephysical.com web app
   (physical/apps/web/app/globals.css), so the teasers show visitors the
   site they'll get. The hero sits on a dark landscape "stage" in the
   HackTheFamily PDF style (docs/brand/). Design and decisions:
   docs/superpowers/specs/2026-12-03-teasers-preview-site-design.md.

   A page picks its colors with a brand class on <body> (brand-self,
   brand-physical, brand-psyche, brand-spirit); a pillar card on another
   brand's page carries its own class. Light or dark follows the
   visitor's system setting. Each site's Cloudflare build copies
   everything in shared/ into its public/ folder (coming-soon/README.md). */

/* ---------- Brand palettes ----------
   --dark, --accent, --light: the PDF's color system. Derived: --glow, a
   lighter accent for glowing on dark; --accent-text, a deeper one for
   reading on light; --cta-bg/--cta-fg, a button pair that keeps 4.5:1. */
.brand-self     { --dark: #061522; --accent: #168BFF; --light: #F4F7FA; --glow: #4DA8FF; --accent-text: #0B6FD6; --cta-bg: #0B6FD6; --cta-fg: #fff; --land: url(/brand/land-self.jpg); }
.brand-physical { --dark: #062D25; --accent: #159D79; --light: #E8F4EE; --glow: #2DC49A; --accent-text: #0F7D5C; --cta-bg: #0F7D5C; --cta-fg: #fff; --land: url(/brand/land-physical.jpg); }
.brand-psyche   { --dark: #20113F; --accent: #8445EF; --light: #F0E9FC; --glow: #A57BFF; --accent-text: #6A2FD6; --cta-bg: #6A2FD6; --cta-fg: #fff; --land: url(/brand/land-psyche.jpg); }
.brand-spirit   { --dark: #432506; --accent: #F3A11B; --light: #FFF2DB; --glow: #FFB940; --accent-text: #8F5300; --cta-bg: #F3A11B; --cta-fg: #2B1704; --land: url(/brand/land-spirit.jpg); }

/* ---------- The site's tokens, worked out from those three colors ----------
   Light is the site's default theme. For Physical these land on (or very
   near) globals.css's hand-picked values. */
.brand-self, .brand-physical, .brand-psyche, .brand-spirit {
  --bg: var(--light);
  --surface1: color-mix(in srgb, var(--light) 45%, #fff);
  --border: color-mix(in srgb, var(--dark) 14%, transparent);
  --border-strong: color-mix(in srgb, var(--dark) 28%, transparent);
  --text1: var(--dark);
  --text2: color-mix(in srgb, var(--dark) 80%, var(--light));
  --text3: color-mix(in srgb, var(--dark) 66%, var(--light));
  --accent-dim: color-mix(in srgb, var(--accent) 22%, #fff);
  --badge-text: color-mix(in srgb, var(--accent-text) 75%, var(--dark)); /* 4.5:1 on --accent-dim at 11.5px */
  --stage-bg: var(--dark);
  --card-shadow: 0 8px 24px color-mix(in srgb, var(--dark) 10%, transparent);
}
@media (prefers-color-scheme: dark) {
  .brand-self, .brand-physical, .brand-psyche, .brand-spirit {
    --bg: var(--dark);
    --surface1: color-mix(in srgb, var(--dark) 88%, var(--light));
    --border: color-mix(in srgb, var(--light) 14%, transparent);
    --border-strong: color-mix(in srgb, var(--light) 28%, transparent);
    --text1: var(--light);
    --text2: color-mix(in srgb, var(--light) 76%, var(--dark));
    --text3: color-mix(in srgb, var(--light) 62%, var(--dark));
    --accent-text: var(--glow);
    --accent-dim: color-mix(in srgb, var(--accent) 18%, transparent);
    --badge-text: var(--glow);
    --stage-bg: color-mix(in srgb, var(--dark) 70%, #000);
    --card-shadow: 0 0 0 1px var(--border-strong);
  }
}
:root {
  --radius-pill: 100px; --radius-card: 16px; --radius-stage: 28px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text1);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
/* On dark panels the ring turns white; a card's ring sits inside it, since
   just outside is the light page */
.stage :focus-visible, .signup :focus-visible { outline-color: #fff; }
.pillar-card:focus-visible { outline-color: #fff; outline-offset: -4px; border-radius: var(--radius-card); }
.page { max-width: 1180px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left)); }

/* ---------- Header: the site's lockup (icon, two-tone wordmark, tagline) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .page { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand img { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; }
.lockup-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lockup { font-size: 24px; line-height: 1; font-weight: 700; letter-spacing: -0.01em; }
.lockup .pillar { color: var(--accent-text); }
.brand .tagline { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; white-space: nowrap; }

/* ---------- Badges and buttons: the site's .badge, .cta, .cta-secondary ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  color: var(--badge-text); background: var(--accent-dim);
}
.badge.on-stage { white-space: normal; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px var(--glow); }
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border: 0; border-radius: var(--radius-pill); cursor: pointer;
  font: 700 14px/1.2 var(--sans); text-decoration: none;
  color: var(--cta-fg); background: var(--cta-bg);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 8px rgba(0, 0, 0, .25);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:hover { transform: translateY(-1px); }
.cta:active { transform: none; }
.cta.small { padding: 9px 16px; font-size: 13px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-pill);
  font: 700 14px/1.2 var(--sans); text-decoration: none;
  color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
  transition: transform .12s ease, border-color .12s ease;
}
.cta-secondary:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .4); }

/* ---------- The stage: dark landscape panel for the hero (and the sign-up) ---------- */
.stage {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: 24px; border-radius: var(--radius-stage);
  color: #fff;
  background:
    radial-gradient(55% 70% at 78% 40%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%),
    var(--stage-bg);
  box-shadow: 0 30px 80px color-mix(in srgb, var(--dark) 28%, transparent);
}
.stage::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%; z-index: -1;
  background: var(--land) center 70% / cover no-repeat; opacity: .5;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%);
  mask-image: linear-gradient(to bottom, transparent, #000 70%);
}

/* ---------- Hero: the site's left-aligned hero, set on the stage ---------- */
.hero {
  display: grid; align-items: center; gap: 8px;
  min-height: min(640px, 78vh); min-height: min(640px, 78svh);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 72px);
}
.hero-text { min-width: 0; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero-title {
  margin: 14px 0 18px;
  font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; font-weight: 800; letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero-title span { color: var(--glow); }
.hero-sub { margin: 0 0 30px; max-width: 34em; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.55; color: rgba(255, 255, 255, .82); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { justify-self: center; width: min(70vw, 380px); aspect-ratio: 1; }
.glowmark {
  width: 100%; height: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  animation: float 7s ease-in-out infinite;
}
@media (min-width: 860px) { .hero { grid-template-columns: 1.25fr 1fr; } }
@media (max-width: 859px) { .hero-art { order: -1; width: min(56vw, 240px); } }

/* ---------- Sections ---------- */
.section { padding-top: clamp(56px, 8vw, 96px); }
.section-label { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }
.section-title {
  margin: 0 0 28px; max-width: 18em;
  font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-title span { color: var(--accent-text); }

/* The site's feature-entry cards: tint, large faint icon; "Coming soon"
   where the site has its arrow button */
.feature-entry-row { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 800px) {
  .feature-entry-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-entry-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.feature-entry-card {
  position: relative; overflow: hidden;
  min-height: 180px; padding: 26px 24px 64px;
  border-radius: var(--radius-card); border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent-dim), var(--surface1) 70%);
}
.feature-entry-card .decor-icon { position: absolute; top: -10px; right: -10px; width: 110px; height: 110px; opacity: .16; transform: rotate(-12deg); }
.feature-entry-card h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.feature-entry-card p { margin: 0; max-width: 85%; font-size: 15px; color: var(--text2); }
.feature-entry-card .badge { position: absolute; left: 24px; bottom: 22px; }

/* The site's value cards with their rounded-square category icon */
.value-row { display: grid; gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
@media (min-width: 800px) { .value-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.value-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 22px; border-radius: var(--radius-card);
  background: var(--surface1); border: 1px solid var(--border); box-shadow: var(--card-shadow);
}
.value-card h3 { margin: 0; font-size: 16.5px; }
.value-card p { margin: 0; font-size: 14.5px; color: var(--text2); }
.category-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-dim); color: var(--accent-text); }
.category-icon svg, .decor-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Pillar cards: a feature-entry card per brand, each in its own colors */
.pillar-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  min-height: 320px; padding: 26px 24px 24px;
  border-radius: var(--radius-card); color: #fff; text-decoration: none;
  background:
    radial-gradient(70% 60% at 80% 20%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%),
    var(--dark);
}
.pillar-card::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%; z-index: -1;
  background: var(--land) center / cover no-repeat; opacity: .5;
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%);
}
.pillar-card img { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.pillar-card h3 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.pillar-card h3 span { color: var(--glow); }
.pillar-card p { margin: 0; font-size: 14.5px; color: rgba(255, 255, 255, .82); }
.pillar-card .badge { margin-top: auto; align-self: flex-start; color: #fff; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .2); }
a.pillar-card .badge { color: var(--cta-fg); background: var(--cta-bg); border-color: transparent; }
a.pillar-card:hover img { transform: translateY(-4px) scale(1.04); }
.pillar-card[aria-current] { box-shadow: 0 0 0 2px var(--glow); }

/* ---------- Sign-up slot ----------
   For the email sign-up block (<section class="signup" id="signup">,
   from the Resend sign-up package): it becomes a stage panel above the
   footer. Styled by its class names only, so its markup stays its own. */
.signup {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: clamp(56px, 8vw, 96px); padding: clamp(36px, 6vw, 64px) clamp(24px, 6vw, 64px);
  border-radius: var(--radius-stage); text-align: center; color: #fff;
  background:
    radial-gradient(50% 80% at 70% 30%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 70%),
    var(--stage-bg);
}
.signup::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 60%; z-index: -1;
  background: var(--land) center 70% / cover no-repeat; opacity: .45;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 70%); mask-image: linear-gradient(to bottom, transparent, #000 70%);
}
.signup h2 { margin: 0 0 8px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.signup > p { margin: 0 auto 26px; max-width: 30em; color: rgba(255, 255, 255, .82); }
.signup-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 8px; max-width: 540px; margin: 0 auto; }
.signup-form label[for] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.signup-form input[type="email"] {
  flex: 1 1 260px; min-width: 0; padding: 13px 20px;
  border-radius: var(--radius-pill); border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .1); color: #fff; font: 500 16px var(--sans);
}
.signup-form input[type="email"]::placeholder { color: rgba(255, 255, 255, .6); }
.signup-form input[type="email"]:focus { outline: none; border-color: var(--glow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--glow) 35%, transparent); }
.signup-form button { flex: 0 0 auto; padding: 13px 24px; border: 0; border-radius: var(--radius-pill); cursor: pointer; font: 700 14px/1.2 var(--sans); color: var(--cta-fg); background: var(--cta-bg); box-shadow: 0 8px 28px color-mix(in srgb, var(--accent) 45%, transparent); }
.signup-form button:hover { transform: translateY(-1px); }
.signup-form label:not([for]) { flex-basis: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .88); }
.signup-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.signup-form .cf-turnstile { flex-basis: 100%; display: flex; justify-content: center; }
.signup-note { flex-basis: 100%; margin: 4px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .68); }
.signup-note a { color: #fff; }
@media (max-width: 520px) { .signup-form button { flex-basis: 100%; } }

/* ---------- Footer: the site's footer row, plus the family icons ---------- */
.site-footer { margin-top: clamp(56px, 8vw, 96px); padding: 28px 0 max(44px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.site-footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; }
.site-footer-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text3); }
.site-footer-brand img { width: 22px; height: 22px; border-radius: 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer nav a { font-size: 13px; color: var(--text2); text-decoration: none; }
.site-footer nav a:hover { color: var(--text1); text-decoration: underline; }
.family { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.family a, .family span { display: block; border-radius: 8px; }
.family img { width: 30px; height: 30px; border-radius: 8px; transition: transform .3s; }
.family a:hover img { transform: translateY(-3px); }
.family [aria-current] img { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.site-footer-note { margin: 14px 0 0; font-size: 12px; color: var(--text3); }

/* ---------- Narrow screens ---------- */
@media (max-width: 520px) {
  .site-header .page { padding-block: 12px; }
  .brand { gap: 10px; }
  .brand img { width: 36px; height: 36px; }
  .lockup { font-size: 19px; }
  .brand .tagline { font-size: 9.5px; letter-spacing: .04em; }
  .stage { margin-top: 16px; }
}
@media (max-width: 400px) { .brand .tagline, .header-actions .badge { display: none; } }

/* ---------- Motion ---------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(5px, -9px); } }
@keyframes drift-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-9px, 6px); } }
@keyframes drift-c { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, 7px); } }
@keyframes pulse { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* The HackTheSelf Venn */
.venn { width: 100%; height: 100%; overflow: visible; animation: float 8s ease-in-out infinite; }
.venn .ring { mix-blend-mode: screen; transform-box: fill-box; transform-origin: center; }
.venn .a { animation: drift-a 9s ease-in-out infinite; }
.venn .b { animation: drift-b 11s ease-in-out infinite; }
.venn .c { animation: drift-c 10s ease-in-out infinite; }
.venn .core { transform-box: fill-box; transform-origin: center; animation: pulse 4s ease-in-out infinite; }
.venn .orbit { transform-box: view-box; transform-origin: 200px 200px; animation: spin 60s linear infinite; }

/* Scroll fade-ins: only when family.js runs, so nothing hides without it */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
