/* Aztec Purple — studio site.
   Design language: Premium Soft UI & Glassmorphism Hybrid (DESIGN.md v2.1 §1-§4),
   the same identity the four apps + Whytrain now share — closes the "two visual
   languages" fork DESIGN.md §6 flagged 2026-07-14. Neumorphic content, glass
   floating chrome, gradient reserved for interactive/CTA elements only. */

:root {
  /* Structural — never pure white/black; the Neumorphic illusion depends on a
     mid-value background that can read lighter or darker in each direction. */
  --bg: #F0F4F8;
  --surface: #FFFFFF; /* glass fill only */
  --border: #E5E5EA;
  --text: #111114;
  --text-2: #85858B;

  /* Neumorphic shadow pair — derived from --bg, never hand-picked. */
  --soft-highlight: #FFFFFF;
  --soft-shadow: #A3B1C9;

  /* Glass (floating chrome only: nav, footer-adjacent chrome). */
  --glass-fill: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);

  /* Studio gradient pair — the site's own accent, anchored on the existing
     studio violet (already used as the flat accent pre-redesign; JabLog shares
     the same violet as its second stop) extended to the pink already vetted in
     Whytrain's gauge sweep, so the hue reads as "this studio", not one app. */
  --accent: #6C4DF4;
  --accent-2: #E94FC4;
  --accent-soft: #EFEAFF;
  --accent-glow: rgba(108, 77, 244, 0.35);

  --radius-card: 28px;
  --radius-card-lg: 32px;
  --radius-pill: 999px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E1F22;
    --surface: #1C1C1E;
    --border: #38383A;
    --text: #F5F5F7;
    --text-2: #8E8E93;

    --soft-highlight: #2C2E33;
    --soft-shadow: #0A0A0B;

    --glass-fill: rgba(28, 28, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.12);

    --accent: #8A70FF;
    --accent-2: #F074D6;
    --accent-soft: #2A2440;
    --accent-glow: rgba(138, 112, 255, 0.4);
  }
}

/* Self-hosted, no network fetch (STUDIO_CONSTITUTION §3.4 local-first default).
   Poppins is the body/UI face (roundest "soft UI" letterforms, DESIGN.md §3),
   Outfit stays reserved for the one display moment (the statement section). */
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/Poppins-ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('assets/fonts/Outfit-Variable.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    system-ui, Roboto, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Legal / support pages (App Store Privacy Policy + Support URL targets) */
.legal {
  padding: 48px 24px 80px;
  max-width: 720px;
}
.legal .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--text-2);
  margin: 0 0 8px;
}
.legal .lede { color: var(--text-2); margin-bottom: 28px; }
.legal h2 { margin-top: 32px; font-size: 1.25rem; }
.legal ul { padding-left: 1.2em; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 16px; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
p  { margin: 0 0 16px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- motion (progressive enhancement) ---------- */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero .eyebrow,
.hero h1,
.hero .lede,
.hero-actions { animation: rise-in 0.55s ease both; }
.hero h1 { animation-delay: 0.07s; }
.hero .lede { animation-delay: 0.14s; }
.hero-actions { animation-delay: 0.21s; }
@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow, .hero h1, .hero .lede, .hero-actions { animation: none; }
}

.reveals .section h2,
.reveals .section .eyebrow,
.reveals .section-lede,
.reveals .card,
.reveals .principle,
.reveals .process li,
.reveals .coming-soon,
.reveals .contact,
.reveals .statement-text { opacity: 0; }
.reveals .is-visible {
  animation: rise-in 0.5s ease both;
  animation-delay: var(--stagger, 0ms);
}

/* ---------- header — Glass, the one floating-chrome surface ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--glass-fill);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; display: block; }

.nav { position: relative; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
}
.nav-links a { color: var(--text-2); font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.is-active { color: var(--text); font-weight: 700; opacity: 1; }

/* Privacy/Support: real top-nav destinations (Founder instruction, 2026-07-19),
   visually secondary to the four primary segments so the nav still reads as a
   hierarchy, not six equal-weight items fighting for attention. */
.nav-secondary { font-size: 0.87rem; opacity: 0.8; }
.nav-divider { width: 1px; height: 16px; background: var(--border); flex: none; }

.nav-cta {
  color: #fff !important;
  font-weight: 600 !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.nav-cta:hover { text-decoration: none; transform: translateY(-1px); }

/* ---------- mobile nav: works with zero JS (stacked, always open), then a JS
   layer collapses it into a real toggle — same progressive-enhancement rule
   script.js already follows for scroll reveals. ---------- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav { flex-wrap: wrap; height: auto; padding: 12px 0; row-gap: 4px; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .nav-links a { padding: 8px 0; width: 100%; }
  .nav-divider { display: none; }
  .nav-cta { margin-top: 6px; align-self: flex-start; }

  /* JS layer: collapse the always-visible stack above into a toggled panel. */
  html.js .nav-toggle { display: flex; }
  html.js .nav { flex-wrap: nowrap; height: 64px; padding: 0; }
  html.js .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    background: var(--glass-fill);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }
  html.js .nav-links.is-open { max-height: 420px; padding: 10px 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .nav-links, .nav-toggle span { transition: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.25s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.96); transition-duration: 0.1s; }
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active { transform: none; }
}

/* Gradient + glow — reserved for the primary CTA, per DESIGN.md §4. */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 22px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 10px 26px var(--accent-glow); }

/* Everything else stays monochromatic — a SoftContainer-style pressed surface. */
.btn-quiet, .btn-outline {
  color: var(--text);
  background: var(--bg);
  box-shadow:
    -3px -3px 6px var(--soft-highlight),
    3px 3px 6px var(--soft-shadow);
}
.btn-outline { color: var(--accent); }
.btn-quiet:hover, .btn-outline:hover {
  box-shadow:
    -2px -2px 4px var(--soft-highlight),
    2px 2px 4px var(--soft-shadow);
}

.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

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

.hero { padding: 100px 24px 76px; }

.eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.lede {
  color: var(--text-2);
  font-size: 1.2rem;
  max-width: 34em;
  margin-top: 20px;
}

.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

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

.section { padding: 80px 24px; }
.section.wrap { padding-left: 24px; padding-right: 24px; }

.section-alt { background: var(--bg); }

.section-lede { color: var(--text-2); font-size: 1.1rem; max-width: 40em; }

.sub-heading { margin-top: 56px; }

/* ---------- SoftContainer — the default content surface ---------- */
/* Two shadows, both derived from the token pair, fill = background: the
   extrusion reads through light/shadow alone (DESIGN.md §4). */

.grid { display: grid; gap: 24px; margin-top: 32px; }

.apps-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.principles-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: start; }

.card {
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: 30px;
  box-shadow:
    -8px -8px 16px var(--soft-highlight),
    8px 8px 16px var(--soft-shadow);
}

@media (prefers-contrast: high) {
  .card { box-shadow: none; border: 1px solid var(--border); }
}

.app-card, .price-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.3s ease;
}
.app-card:hover, .price-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    -10px -10px 20px var(--soft-highlight),
    10px 10px 20px var(--soft-shadow);
}
@media (prefers-reduced-motion: reduce) {
  .app-card:hover, .price-card:hover { transform: none; }
}

.app-card { display: flex; flex-direction: column; gap: 4px; }
.app-card h3 { margin-bottom: 4px; }
.app-card p { color: var(--text-2); font-size: 0.95rem; flex: 1; }

.app-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 2px 8px rgba(26, 26, 41, 0.14);
}

/* Floating proof-chip (BOARD.md 2026-07-13) — the one place a second flat
   accent tint is allowed, since it reads as a badge, not a wash. */
.proof-badge {
  position: absolute;
  left: 30px;
  bottom: -10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(26, 26, 41, 0.12);
  transform: rotate(-4deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.app-card:hover .proof-badge { transform: rotate(0deg) translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .proof-badge, .app-card:hover .proof-badge { transition: none; }
}

.chip {
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
}

/* ---------- app detail (apps.html — one generous card per app) ---------- */

.app-detail-list { display: grid; gap: 24px; margin-top: 40px; }

.app-detail {
  padding: 36px;
}

.app-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Icon + hook badge as their own stacked column (not the floating overlap
   badge — that's spec'd for a vertical card with nothing beside it at that
   height; here the titles sit to the right, so the badge stays in normal
   flow instead of colliding with the tagline). */
.app-icon-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: none;
}

.app-icon-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: block;
  box-shadow: 0 2px 8px rgba(26, 26, 41, 0.14);
  flex: none;
}

.proof-badge-static {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transform: rotate(-4deg);
}

.app-detail-titles { flex: 1; min-width: 200px; }
.app-detail-titles h2 { margin-bottom: 4px; }
.app-detail-tagline { color: var(--text-2); margin: 0; font-size: 1rem; }

.app-detail-desc { color: var(--text); max-width: 62em; margin-bottom: 20px; }

.coming-soon {
  margin-top: 40px;
  padding: 30px;
  border-radius: var(--radius-card);
  background: var(--bg);
  box-shadow:
    inset -4px -4px 10px var(--soft-highlight),
    inset 4px 4px 10px var(--soft-shadow);
}
.coming-soon h3 { margin-bottom: 8px; }
.coming-soon p { color: var(--text-2); margin: 0; max-width: 46em; }

.principle h3 { margin-bottom: 8px; }
.principle p { color: var(--text-2); font-size: 0.98rem; margin: 0; }

/* ---------- statement ---------- */

.statement {
  padding: 116px 24px;
  text-align: center;
}

.statement-text {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--text);
  margin: 0;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (prefers-contrast: high) {
  .statement-text {
    background: none;
    -webkit-text-fill-color: var(--text);
  }
}

/* ---------- process ---------- */

.process {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 20px;
}

.process li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: 24px 26px;
  box-shadow:
    -6px -6px 14px var(--soft-highlight),
    6px 6px 14px var(--soft-shadow);
}

.process p { color: var(--text-2); font-size: 0.95rem; margin: 0; max-width: 52em; }

.step-num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  margin-top: 2px;
  box-shadow: 0 4px 10px var(--accent-glow);
}

/* ---------- pricing ---------- */

.price-card ul, .feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  color: var(--text-2);
  font-size: 0.93rem;
  display: grid;
  gap: 10px;
}
.price-card li, .feature-list li { padding-left: 22px; position: relative; }
.price-card li::before, .feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
@media (min-width: 640px) {
  .feature-list.two-col { grid-template-columns: repeat(2, 1fr); column-gap: 20px; }
}

.price {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 4px 0 20px;
}

.price-featured {
  box-shadow:
    -8px -8px 16px var(--soft-highlight),
    8px 8px 16px var(--soft-shadow),
    0 0 0 2px var(--accent);
}

.pricing-note {
  color: var(--text-2);
  font-size: 0.9rem;
  margin-top: 24px;
  max-width: 46em;
}

/* ---------- contact & footer ---------- */

.contact { text-align: center; max-width: 620px; }
.contact p { color: var(--text-2); margin-bottom: 28px; }

.site-footer { padding: 32px 0 48px; }
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-2);
  font-size: 0.85rem;
}
