/* ═══════════════════════════════════════════════════════════════
   Momentai Labs (A Beaver's Cart storefront) — landing page
   Design language: Apple-clean (telebot.abeaverscart.ca school)
   + 2026 bento grid, evolved glassmorphism, kinetic type
   ═══════════════════════════════════════════════════════════════ */

/* ── fonts ─────────────────────────────────────────────────────── */
/* JetBrains Mono variable font, self-hosted (no external requests) */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ── tokens ────────────────────────────────────────────────────── */
:root {
  --white: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --accent: #b45309;              /* deep amber — readable on white */
  --accent-hover: #9a3f06;
  --accent-bright: #f7a41d;       /* bright amber — glows & gradients */
  --accent-deep: #e85d2a;
  --accent-subtle: rgba(180, 83, 9, 0.08);
  --border: rgba(0, 0, 0, 0.08);
  --success: #28a745;
  --success-subtle: rgba(40, 167, 69, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --code-bg: #1d1d1f;
  --code-text: #e5e5e7;
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 12px 48px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
          'Helvetica Neue', Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0a0a0c;
  --bg-alt: #161618;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #86868b;
  --accent: #f7a41d;              /* bright amber — pops on near-black */
  --accent-hover: #ffb73d;
  --accent-subtle: rgba(247, 164, 29, 0.14);
  --border: rgba(255, 255, 255, 0.12);
  --success: #30d158;
  --success-subtle: rgba(48, 209, 88, 0.14);
  --code-bg: #f5f5f7;
  --code-text: #1d1d1f;
  --shadow-card: 0 2px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-elevated: 0 12px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ── base ──────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

::selection { background: var(--accent-subtle); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

.mono { font-family: var(--mono); }

/* ── accessibility ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── nav ───────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
#nav.scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text-primary); font-weight: 600; letter-spacing: -.01em; }
.brand:hover { color: var(--text-primary); }
.brand-mark { font-size: 19px; line-height: 1; display: flex; }
.brand-mark img {
  height: 26px;
  width: auto;              /* logo art — keep aspect */
  border-radius: 7px;
  display: block;
}
.brand-name { font-size: 15px; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--text-tertiary); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ── buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 980px;
  font-weight: 600;
  letter-spacing: -.01em;
  padding: 12px 24px;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:focus { outline: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.28);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 6px 24px rgba(180, 83, 9, 0.35); }
[data-theme="dark"] .btn-primary {
  color: #1a1206;
  box-shadow: 0 4px 20px rgba(247, 164, 29, 0.22);
}
[data-theme="dark"] .btn-primary:hover { background: var(--accent-hover); color: #1a1206; }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--accent-subtle); color: var(--accent); border-color: transparent; }

.btn-amber {
  background: #f7a41d;
  color: #1d1d1f;
  box-shadow: 0 4px 24px rgba(247, 164, 29, 0.4);
}
.btn-amber:hover { background: #ffb73d; color: #1d1d1f; box-shadow: 0 6px 32px rgba(247, 164, 29, 0.5); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-xl { padding: 18px 40px; font-size: 18px; }

/* ── hero ──────────────────────────────────────────────────────── */
.hero {
  padding: 148px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }

.hero-glow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.hero-glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  animation: drift 18s ease-in-out infinite;
}
.glow-1 { width: 480px; height: 480px; background: rgba(247, 164, 29, .14); top: -140px; left: 50%; margin-left: -420px; }
.glow-2 { width: 420px; height: 420px; background: rgba(232, 93, 42, .10); top: -80px; right: 50%; margin-right: -400px; animation-delay: -6s; }
.glow-3 { width: 360px; height: 360px; background: rgba(247, 164, 29, .08); top: 260px; left: 50%; margin-left: -80px; animation-delay: -12s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -24px) scale(1.06); }
  66% { transform: translate(-24px, 18px) scale(.97); }
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 6px 16px;
  margin-bottom: 28px;
}

.hero-logo {
  width: clamp(112px, 22vw, 160px);
  margin: 0 auto 24px;
}
.hero-logo img {
  width: 100%;
  /* Transparent PNG logo — shows on any background */
  animation: floaty 5.5s ease-in-out infinite alternate;
}
@keyframes floaty {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

h1 {
  font-size: clamp(42px, 6.8vw, 72px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
  max-width: 860px;
  margin: 0 auto 22px;
  animation: fadeUp .6s ease .1s both;
}
h1 .grad {
  background: linear-gradient(120deg, var(--accent-bright) 10%, var(--accent-deep) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 36px;
  letter-spacing: -.01em;
  animation: fadeUp .6s ease .2s both;
}

.hero-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
  animation: fadeUp .6s ease .3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── sections ──────────────────────────────────────────────────── */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px;
}
.section-alt { background: var(--bg-alt); border-radius: 28px; }

.section-head { text-align: center; margin-bottom: 44px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2 {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.section-note {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ── bento grid (2026 trend) ───────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.bento-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.bento-featured {
  grid-column: span 6;
  grid-row: auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--accent-subtle) 0%, transparent 55%),
    var(--bg);
}
.bento-featured .app-icon { width: 104px; height: 104px; border-radius: 24px; }
.bento-featured h3 { font-size: 1.34rem; }

.featured-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

/* Play Store screenshots in a compact carousel */
.featured-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}
.shot-carousel {
  position: relative;
  width: min(180px, 56vw);
  outline: none;
}
.shot-carousel:focus-visible .shot-viewport {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* Clip lives on the non-transformed viewport; only the track moves */
.shot-viewport {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
  background: var(--bg-alt);
}
.shot-track {
  display: flex;
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}
.shot-track img {
  display: block;
  width: 100%;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;
}
.shot-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--text-secondary);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease;
}
.shot-prev { left: -13px; }
.shot-next { right: -13px; }
.shot-nav:hover {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  transform: translateY(-50%) scale(1.08);
}
.shot-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}
.shot-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: background .25s ease, width .25s ease;
}
.shot-dot.active {
  width: 18px;
  background: var(--accent);
}

.bento > .bento-card:not(.bento-featured) {
  grid-column: span 3;
  flex-direction: row;
  gap: 22px;
}
.bento > .bento-card:not(.bento-featured) .app-icon { flex-shrink: 0; margin-bottom: 0; }
.bento > .bento-card:not(.bento-featured) .project-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.bento-top {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-subtle);
  border-radius: 980px;
  padding: 5px 12px;
}

.app-icon {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}

.bento-card h3, .project-card h3 {
  font-size: 1.22rem;
  font-weight: 650;
  letter-spacing: -.02em;
  margin-bottom: 10px;
  line-height: 1.3;
}

.app-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 20px;
}

.play-badge {
  width: 148px;
  max-width: 70vw;
}

/* The <a> wrapper is a flex item; badge flows right after the free band */
.app-link {
  display: flex;
  align-items: flex-start;
}

/* Feature list (featured bento card) */
.feature-list {
  list-style: none;
  margin: 2px 0 18px;
  display: grid;
  gap: 10px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--text-secondary);
}
.feature-list svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ── project cards ─────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.project-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
  transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}
.project-card .app-icon { flex-shrink: 0; margin-bottom: 0; }
.project-body .btn { margin-top: 6px; }

/* ── CTA band ──────────────────────────────────────────────────── */
.cta-band {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 72px 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #161618 0%, #2b1d0d 55%, #3d2408 100%);
  color: #f5f5f7;
}
.cta-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 260px at 50% -40px, rgba(247, 164, 29, .35), transparent 70%);
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}
.cta-band h2 {
  position: relative;
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 14px;
}
.cta-sub {
  position: relative;
  color: #a1a1a6;
  max-width: 520px;
  margin: 0 auto 30px;
  font-size: 1.02rem;
}
.cta-band .btn { position: relative; }

.cta-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-glass {
  background: transparent;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

/* ── reveal on scroll (JS-gated so content shows without JS) ───── */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease var(--d, 0s), transform .6s ease var(--d, 0s);
}
html.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── footer ────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 48px 24px 56px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.footer-brand .brand-mark img {
  height: 24px;
  width: auto;
  border-radius: 7px;
}
.footer-tag {
  color: var(--text-tertiary);
  font-size: 13.5px;
  margin-bottom: 22px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-bottom: 26px;
}
.footer-links a { color: var(--text-secondary); font-size: 13.5px; font-weight: 500; }
.footer-links a:hover { color: var(--text-primary); }
.footer-copy {
  color: var(--text-tertiary);
  font-size: 12.5px;
}

/* ── responsive ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .bento-featured { grid-template-columns: 1fr; gap: 24px; }
  .bento > .bento-card:not(.bento-featured) {
    grid-column: span 3;
    flex-direction: row;
    gap: 22px;
  }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .bento > .bento-card:not(.bento-featured) { grid-column: span 6; }
  .hero { padding-top: 118px; }
  .project-card,
  .bento > .bento-card:not(.bento-featured) { flex-direction: column; }
}

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

/* ── momentai labs rebrand: about / contact / imprint ──────── */
.hero-imprint { margin-top: 1.1rem; font-size: 0.95rem; color: var(--text-tertiary); letter-spacing: 0.01em; }
.about-grid { display: block; }
.about-copy { max-width: 680px; }
.about-copy p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; }
.about-copy p + p { margin-top: 1rem; }
.legal-line { font-size: 0.92rem; color: var(--text-tertiary); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contact-card { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; }
.contact-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.contact-card p { color: var(--text-secondary); margin: 0; }
.contact-card a { color: var(--accent); font-weight: 600; text-decoration: none; }
.contact-card .app-desc { margin-top: 8px; }
.footer-sub { font-size: 0.85rem; color: var(--text-tertiary); margin-top: 6px; }
.placeholder { background: rgba(247, 164, 29, 0.16); border: 1px dashed var(--accent); border-radius: 6px; padding: 1px 6px; font-family: var(--mono); font-size: 0.8em; color: var(--text-secondary); }
