/* ============================================
   JAMB LANDING PAGE
   Colors from JambColors.swift / Spacing.swift
   ============================================ */

:root {
  /* Backgrounds */
  --page: #EEF0EB;
  --sheet: #F9FAF7;
  --nav: #E3E6DD;
  --code-bg: #E8EBE4;

  /* Text */
  --text-primary: #252B27;
  --text-secondary: #5C645D;
  --text-tertiary: #656C65;

  /* Accent */
  --sage: #5B8A6F;
  --sage-dark: #487058;
  --sage-light: #DBE8DF;

  /* Borders */
  --border: #D8DCD2;
  --border-subtle: #EAECE5;

  /* Cards (Glass Frame) */
  --card-bg: rgba(255,255,255,0.65);
  --card-shadow: 0 1px 4px rgba(0,0,0,0.06);
  --card-border: 1px solid var(--border-subtle);
  --card-radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1A1B1E;
    --sheet: #21252B;
    --nav: #1E2024;
    --code-bg: #262830;
    --text-primary: #E1E3E6;
    --text-secondary: #8B949E;
    --text-tertiary: #878F98;
    --sage: #6B9A7F;
    --sage-dark: #5B8A6F;
    --sage-light: #2D3A34;
    --border: #30363D;
    --border-subtle: #21262D;
    --card-bg: rgba(255,255,255,0.04);
    --card-shadow: 0 1px 4px rgba(0,0,0,0.3);
    --card-border: 1px solid rgba(255,255,255,0.06);
  }
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: var(--page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HERO ── */
.hero {
  padding: clamp(100px, 15vh, 180px) 0 clamp(80px, 10vh, 140px);
  text-align: center;
}

.hero-video-container {
  max-width: 680px;
  margin: 0 auto 44px;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--card-bg);
  border: var(--card-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeUp 0.8s ease-out 0.15s both;
}

.hero-video-container video {
  display: block;
  width: 100%;
  height: auto;
}

.hero-video-placeholder {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, var(--nav) 0%, var(--page) 50%, var(--nav) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.hero-video-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 49.5%,
    var(--border-subtle) 49.5%,
    var(--border-subtle) 50.5%,
    transparent 50.5%
  );
  opacity: 0.3;
}

.play-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(91,138,111,0.3);
  z-index: 1;
}

.play-icon svg { margin-left: 3px; }

.video-label {
  font-size: 13px;
  color: var(--text-tertiary);
  z-index: 1;
  text-align: center;
  line-height: 1.5;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
  animation: fadeUp 0.8s ease-out 0.3s both;
}

.hero p {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 44px;
  animation: fadeUp 0.8s ease-out 0.4s both;
}

/* ── WAITLIST FORM ── */
.waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
  animation: fadeUp 0.8s ease-out 0.3s both;
}

.waitlist input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--sheet);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.waitlist input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-light);
}

.waitlist input::placeholder { color: var(--text-tertiary); }

.waitlist input.error {
  border-color: #D94F4F;
  box-shadow: 0 0 0 3px rgba(217, 79, 79, 0.15);
}

.form-status {
  flex: 0 0 100%;
  margin: 0;
}

.form-status:empty { display: none; }

/* Non-error messages (e.g. success) stay readable to AT but visually hidden — the
   button copy already conveys success. */
.form-status:not(.form-status--error):not(:empty) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-status--error {
  font-size: 13px;
  color: #D94F4F;
  margin-top: 4px;
  text-align: left;
}

.waitlist button {
  padding: 14px 28px;
  background: var(--sage);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.waitlist button:hover {
  background: var(--sage-dark);
  box-shadow: 0 0 24px rgba(91,138,111,0.25);
}

.waitlist button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.waitlist button.success {
  background: var(--sage-light);
  color: var(--sage-dark);
  cursor: default;
}

.platform-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-tertiary);
  text-align: center;
  animation: fadeUp 0.8s ease-out 0.4s both;
}

.platform-note svg {
  vertical-align: -2px;
  margin-right: 4px;
}

/* ── TEASERS ── */
.teasers {
  padding: clamp(60px, 8vh, 100px) 0;
}

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.teaser-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.teaser-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.teaser-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--sage-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage);
}

.teaser-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.teaser-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ── GALLERY ── */
.gallery {
  padding: clamp(40px, 6vh, 80px) 0 clamp(60px, 8vh, 100px);
}

/* True masonry via independent flex columns. CSS Grid masonry isn't
   broadly shipped yet, so the wide-left / narrow-right split lets each
   column pack vertically without waiting on the other's tallest card. */
.gallery .container { max-width: 1120px; }

.gallery-grid {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.gallery-col-wide { flex: 2; }
.gallery-col-narrow { flex: 1; }

.gallery-row {
  display: flex;
  gap: 18px;
}

.gallery-row > .gallery-card {
  flex: 1;
  min-width: 0;
}

.gallery-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.gallery-image {
  display: block;
  width: 100%;
  aspect-ratio: var(--aspect, 16 / 10);
  object-fit: cover;
  background: linear-gradient(145deg, var(--nav) 0%, var(--page) 100%);
}

.gallery-caption-headline {
  padding: 16px 18px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--sage);
  text-align: center;
}

.gallery-caption-body {
  padding: 12px 18px 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  text-align: center;
}

/* ── SKILL SECTION ── */
.skill-section {
  padding: clamp(60px, 8vh, 100px) 0;
  text-align: center;
}

.skill-section h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.skill-section > .container > p {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.skill-screenshots {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto;
}

.skill-screenshot {
  flex: 1 1 300px;
  max-width: 360px;
}

.skill-screenshot img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--sheet);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  .skill-screenshot img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

@media (max-width: 600px) {
  .skill-screenshots { gap: 20px; }
}

/* ── DIVIDER ── */
.divider {
  width: 48px;
  height: 2px;
  background: var(--sage);
  margin: 0 auto 40px;
  border-radius: 1px;
  opacity: 0.5;
}

/* ── FOOTER ── */
.footer {
  padding: clamp(60px, 8vh, 100px) 0 48px;
  text-align: center;
  border-top: 1px solid var(--border-subtle);
}

.footer h2 {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.footer > .container > p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.footer-logo {
  margin-top: 48px;
}

.footer-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-links {
  margin-top: 24px;
  display: flex;
  gap: 24px;
  justify-content: center;
  font-size: 14px;
  color: var(--text-tertiary);
}

.footer-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--sage); }

.footer-copyright {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .teaser-grid { grid-template-columns: 1fr 1fr; }
  .gallery .container { max-width: 720px; }
  .gallery-grid,
  .gallery-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .teaser-grid { grid-template-columns: 1fr; }
  .waitlist { flex-direction: column; }
  .gallery-placeholder { aspect-ratio: 16 / 10; }
}

/* ── PRIVACY PAGE ── */
.privacy-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 32px 80px;
}

.privacy-page-content {
  max-width: 640px;
}

.privacy-page h1 {
  font-size: 40px;
  margin-bottom: 24px;
}

.privacy-page p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
}

.privacy-page h2 {
  font-size: 24px;
  margin-top: 48px;
  margin-bottom: 16px;
}

.privacy-page ul {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 24px;
  padding-left: 20px;
}

.privacy-page li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .privacy-page h1 {
    font-size: 32px;
  }
}
