/* JM Digital Lab — Dark premium theme. Mobile-first. Shared by home, about, contact, privacy, terms, 404. */

/* ── Self-hosted fonts (no Google Fonts request) ── */
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 400; src: url(/assets/fonts/ibm-plex-sans-thai-thai-400-normal.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 500; src: url(/assets/fonts/ibm-plex-sans-thai-thai-500-normal.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 600; src: url(/assets/fonts/ibm-plex-sans-thai-thai-600-normal.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 700; src: url(/assets/fonts/ibm-plex-sans-thai-thai-700-normal.woff2) format('woff2'); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 400; src: url(/assets/fonts/ibm-plex-sans-thai-latin-400-normal.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; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 500; src: url(/assets/fonts/ibm-plex-sans-thai-latin-500-normal.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; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 600; src: url(/assets/fonts/ibm-plex-sans-thai-latin-600-normal.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; }
@font-face { font-family: 'IBM Plex Sans Thai'; font-style: normal; font-display: swap; font-weight: 700; src: url(/assets/fonts/ibm-plex-sans-thai-latin-700-normal.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; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(/assets/fonts/plus-jakarta-sans-latin-500-normal.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; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(/assets/fonts/plus-jakarta-sans-latin-600-normal.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; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(/assets/fonts/plus-jakarta-sans-latin-700-normal.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; }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-display: swap; font-weight: 800; src: url(/assets/fonts/plus-jakarta-sans-latin-800-normal.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 {
  color-scheme: dark;
  --bg: #05070D;
  --bg-soft: #080C18;
  --surface: #0B1120;
  --surface-2: #101829;
  --text: #F1F5F9;
  --text-2: #CBD5E1;   /* body copy */
  --text-3: #94A3B8;   /* minimum for secondary text on dark */
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --cyan: #67E8F9;
  --grad: linear-gradient(110deg, #22D3EE 0%, #3B82F6 50%, #8B5CF6 100%);
  --radius: 20px;
  --max: 1160px;
  --font-display: 'Plus Jakarta Sans', 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow-md: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 40px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { color: var(--text); font-family: var(--font-display); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(59, 130, 246, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: #fff; color: var(--bg); padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { left: 16px; }

/* Gradient text (Latin headline only); padding keeps marks unclipped */
.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; padding-block: 0.08em;
}

/* ── Navbar ─────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 13, 0.6);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(5, 7, 13, 0.82); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 15px/1 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; color: var(--text); }
.logo-mark {
  position: relative; width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(180deg, #1B2438, #0B1120); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: 0 6px 16px -6px rgba(59, 130, 246, 0.7);
}
.logo-mark::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  text-decoration: none; color: var(--text-3); font-size: 14px; font-weight: 500;
  padding: 8px 10px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(148, 163, 184, 0.1); }
@media (max-width: 439px) { .logo-word { display: none; } .nav-links a { padding: 8px 8px; font-size: 13.5px; } }
@media (min-width: 768px) { .nav-links { gap: 4px; } .nav-links a { padding: 8px 14px; } }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  font: 600 15px/1.3 var(--font-display); text-decoration: none; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: #fff; color: #05070D;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 10px 30px -10px rgba(103, 232, 249, 0.55);
}
.btn-primary:hover { background: #E2E8F0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 14px 40px -10px rgba(103, 232, 249, 0.7); }
.btn-secondary { background: rgba(148, 163, 184, 0.06); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: rgba(148, 163, 184, 0.12); border-color: rgba(148, 163, 184, 0.45); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ── Hero ───────────────────────────────────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 72px 0 56px; text-align: center; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 30%, #000 30%, transparent 100%);
}
.hero-glow {
  position: absolute; z-index: -1; left: 50%; top: -280px; transform: translateX(-50%);
  width: 1100px; height: 620px; max-width: 170vw; pointer-events: none;
  background:
    radial-gradient(closest-side at 30% 55%, rgba(34, 211, 238, 0.26), transparent),
    radial-gradient(closest-side at 55% 45%, rgba(59, 130, 246, 0.30), transparent),
    radial-gradient(closest-side at 75% 60%, rgba(139, 92, 246, 0.26), transparent);
  filter: blur(40px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: rgba(11, 17, 32, 0.6); color: var(--text-2); font-size: 13px; font-weight: 500;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2), 0 0 12px rgba(52, 211, 153, 0.8); }
.hero h1 {
  margin: 28px auto 0; max-width: 1040px; text-wrap: balance;
  font-size: clamp(2.2rem, 8vw, 4.5rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.04em;
}
.hero h1 .grad-text { display: block; text-wrap: balance; }
.hero-sub {
  margin: 24px auto 0; max-width: 620px;
  color: var(--text-2); font-size: clamp(1.02rem, 2.6vw, 1.15rem); line-height: 1.8;
}
.hero-cta { margin-top: 36px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; max-width: 340px; margin-left: auto; margin-right: auto; }
@media (min-width: 480px) { .hero-cta { flex-direction: row; justify-content: center; max-width: none; } }
@media (min-width: 768px) { .hero { padding: 128px 0 72px; } }

/* ── Proof strip (under the hero) ── */
.proof { position: relative; padding: 0 0 24px; }
.proof-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 980px;
  display: grid; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 24, 41, 0.8), rgba(11, 17, 32, 0.6));
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.proof-list li + li { border-top: 1px solid var(--border); }
@media (min-width: 768px) {
  .proof-list { grid-template-columns: repeat(3, 1fr); }
  .proof-list li + li { border-top: 0; border-left: 1px solid var(--border); }
}
.proof-list a {
  display: flex; flex-direction: column; gap: 4px; padding: 22px 26px; height: 100%;
  text-decoration: none; transition: background .2s;
}
.proof-list a:hover { background: rgba(148, 163, 184, 0.06); }
.proof-list strong {
  font: 800 1.6rem/1.3 var(--font-display); letter-spacing: -0.02em; color: var(--text);
}
.proof-list span { font-size: 14px; color: var(--text-3); line-height: 1.6; }

/* ── Sections ───────────────────────────────────── */
section { scroll-margin-top: 76px; }
.section { position: relative; padding: 72px 0; }
.section-soft {
  background:
    radial-gradient(900px 400px at 85% 0%, rgba(139, 92, 246, 0.08), transparent),
    var(--bg-soft);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .section { padding: 112px 0; } }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12.5px/1.4 var(--font-display); color: var(--cyan); letter-spacing: 0.14em; text-transform: uppercase;
}
.section-kicker::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.section-title { margin: 14px 0 0; font-size: clamp(1.75rem, 4.8vw, 2.75rem); line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; }
.th, .section-title.th { letter-spacing: 0; }
.section-desc { margin: 14px 0 0; color: var(--text-3); font-size: 1.05rem; }

/* ── Cards (shared) ─────────────────────────────── */
.card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-md);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow-md), 0 24px 60px -24px color-mix(in srgb, var(--accent, #3B82F6) 55%, transparent); }
.mono {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font: 800 17px/1 var(--font-display);
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 85%, #fff), color-mix(in srgb, var(--accent) 70%, #000));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 8px 20px -8px var(--accent);
}
.mono-img { display: block; background: none; object-fit: cover; box-shadow: 0 10px 28px -10px var(--accent); }
.badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: color-mix(in srgb, var(--accent) 40%, #fff);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Flagship */
.flagship-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .flagship-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.card-flagship { padding: 28px; overflow: hidden; isolation: isolate; }
.card-flagship::before {
  /* gradient hairline border in the product's accent */
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 1; pointer-events: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 80%, transparent), transparent 40%, transparent 70%, rgba(148, 163, 184, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card-flagship::after {
  content: ''; position: absolute; z-index: -1; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 26%, transparent), transparent);
  pointer-events: none; transition: opacity .3s; opacity: .8;
}
.card-flagship:hover::after { opacity: 1; }
@media (min-width: 768px) { .card-flagship { padding: 40px; } }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-flagship .mono { width: 52px; height: 52px; border-radius: 14px; }
.card-flagship h3 { margin: 28px 0 0; font-size: clamp(1.6rem, 3.4vw, 2rem); line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; }
.card-flagship .domain { margin-top: 2px; font-size: 13.5px; color: var(--text-3); }
.card-flagship p { margin: 16px 0 0; color: var(--text-2); font-size: 1.02rem; }
.features { list-style: none; margin: 24px 0 0; padding: 20px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--border); }
.features li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--text-2); }
.features li::before {
  content: ''; width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23ffffff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent) inset;
}
.card-link { margin-top: auto; padding-top: 28px; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--text); }
.card:hover .card-link .arrow { transform: translateX(4px); }
.card-link .arrow { transition: transform .2s var(--ease); }

/* Labs */
.labs-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .labs-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
@media (min-width: 1024px) { .labs-grid { grid-template-columns: repeat(4, 1fr); } }
.card-lab { padding: 24px; }
.card-lab h3 { margin: 18px 0 0; font-size: 1.08rem; line-height: 1.4; font-weight: 700; }
.card-lab .tagline { font-size: 13px; color: var(--text-3); }
.card-lab p { margin: 10px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.7; }
.card-lab .badge { margin-top: 16px; align-self: flex-start; }
.card-lab .card-link { padding-top: 18px; font-size: 13.5px; }

/* Principles */
.principles { display: grid; gap: 14px; }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.principle {
  padding: 28px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 24, 41, 0.6), transparent);
}
.principle-icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(34, 211, 238, 0.18), rgba(139, 92, 246, 0.18));
  border: 1px solid rgba(103, 232, 249, 0.25); color: var(--cyan);
}
.principle h3 { margin: 20px 0 0; font-size: 1.1rem; line-height: 1.4; font-weight: 700; letter-spacing: -0.01em; }
.principle p { margin: 8px 0 0; font-size: 14.5px; color: var(--text-3); }

/* Contact */
.contact-box {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 48px 24px; border: 1px solid var(--border-strong); border-radius: 28px; text-align: center;
  background:
    radial-gradient(500px 260px at 20% 0%, rgba(34, 211, 238, 0.16), transparent),
    radial-gradient(500px 260px at 80% 100%, rgba(139, 92, 246, 0.18), transparent),
    var(--surface);
}
.contact-box::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
@media (min-width: 768px) { .contact-box { padding: 80px 40px; } }
.contact-box h2 { margin: 0; font-size: clamp(1.75rem, 5vw, 2.75rem); line-height: 1.25; font-weight: 800; letter-spacing: -0.035em; }
.contact-box p { margin: 16px auto 0; max-width: 540px; color: var(--text-2); }
.contact-box .hero-cta { margin-top: 32px; }

/* ── Footer ─────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 56px 0 32px; font-size: 14px; background: var(--bg); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.4fr repeat(4, 1fr); } .footer-brand { grid-column: auto; } }
.footer-brand p { margin: 14px 0 0; color: var(--text-3); max-width: 280px; }
.footer h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--text); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer ul a { display: inline-block; padding: 3px 0; color: var(--text-3); text-decoration: none; transition: color .15s; }
.footer ul a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; color: var(--text-3); font-size: 13px;
}
.footer-apps { margin: 28px 0 0; color: var(--text-3); font-size: 13px; }
.footer-apps a, .footer-bottom a { display: inline-block; padding: 3px 0; color: var(--text-3); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.footer-apps a:hover, .footer-bottom a:hover { color: var(--text); }

/* Experiments (compact row under Education) */
.section-tight { padding: 48px 0; }
.experiments { display: grid; gap: 20px; }
.experiments .section-desc { margin-top: 8px; font-size: 14.5px; }
.experiments-list { display: grid; gap: 14px; }
@media (min-width: 640px) { .experiments-list { grid-template-columns: 1fr 1fr; gap: 16px; } }
@media (min-width: 1024px) { .experiments-list { grid-template-columns: repeat(4, 1fr); } }

/* ── Inner pages (about, contact, privacy, terms, 404) ── */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 72px 0 40px; border-bottom: 1px solid var(--border);
  background: radial-gradient(800px 300px at 20% 0%, rgba(59, 130, 246, 0.16), transparent), var(--bg-soft);
}
.page-hero .section-kicker { margin-bottom: 10px; }
.page-hero h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 2.75rem); line-height: 1.3; font-weight: 800; }
.page-hero p { margin: 14px 0 0; max-width: 640px; color: var(--text-2); font-size: 1.05rem; }
.page-body { padding: 56px 0 88px; }
.prose { max-width: 720px; }
.prose h2 { margin: 44px 0 12px; font-size: 1.3rem; line-height: 1.4; font-weight: 700; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); line-height: 1.85; }
.prose ul { padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--text-3); }
.prose a { color: var(--cyan); text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.contact-grid { display: grid; gap: 14px; margin-top: 8px; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
.contact-card { padding: 24px; }
.contact-card h2 { margin: 0; font-size: 1.08rem; line-height: 1.4; font-weight: 700; }
.contact-card p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.contact-card .card-link { padding-top: 16px; font-size: 14px; overflow-wrap: anywhere; }

/* ── Reveal ─────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, .card:hover { transition: none; transform: none; }
}
noscript { display: contents; }
