/*
 * Maestro Voyage design tokens (mirrors maestro-mobile-app/src/styles/theme/colors.ts).
 * Bamboo orange primary, Sandal warm cream surfaces, Commissioner + DM Serif Display type.
 * Principles: warmth over coldness, clarity over complexity, accessible by default.
 */
:root {
  /* Brand */
  --brand-primary: #ff5e32;        /* MOrange */
  --brand-primary-pressed: #e9631a;
  --brand-on-primary: #ffffff;

  /* Surfaces — Sandal palette */
  --surface: #f6f4f0;              /* Sandal50 */
  --surface-alt: #eae3d7;          /* Sandal100 */
  --surface-warm: #f7f4f0;         /* warmWhite */

  /* Ink */
  --ink-primary: #121214;          /* inkBlack */
  --ink-secondary: #4f4f4f;        /* primaryLightText */
  --ink-tertiary: #9c7956;         /* Sandal500 (warm earth tone) */
  --ink-muted: #888888;            /* Neutral400 */
  --hairline: rgba(18, 18, 20, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--surface);
  color: var(--ink-primary);
  font-family: 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Decorative warm gradient — soft Bamboo glow top-left, Sandal warmth bottom-right. */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-decor svg {
  width: 100%;
  height: 100%;
  display: block;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 32rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ---- Wordmark ---- */
.wordmark {
  color: var(--ink-tertiary);
  display: block;
}
.wordmark svg {
  height: 1.25rem;
  width: auto;
  display: block;
}

/* ---- Hero ---- */
.hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.eyebrow {
  font-family: 'Commissioner', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--ink-tertiary);
  opacity: 0.7;
}

.display {
  font-family: 'DM Serif Display', 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
  margin: 0;
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-secondary);
  max-width: 28rem;
  margin: 0;
}

.opening {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  color: var(--ink-secondary);
  background: rgba(255, 94, 50, 0.08);
  border-radius: 999px;
  align-self: flex-start;
}
.opening::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand-primary);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ---- Store CTA ---- */
.store-cta {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface-warm);
  border: 1px solid var(--hairline);
  border-radius: 1rem;
}
body.show-store-cta .store-cta { display: flex; }
body.show-store-cta .opening { display: none; }

.cta-copy {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-secondary);
}

.badges {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Standard App Store / Play Store badges, recolored to brand ink-black. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.125rem;
  height: 3.25rem;
  background: var(--ink-primary);
  color: var(--brand-on-primary);
  border: 1px solid var(--ink-primary);
  border-radius: 0.625rem;
  text-decoration: none;
  font-family: 'Commissioner', system-ui, sans-serif;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.badge:hover {
  background: #1f1f22;
  box-shadow: 0 4px 16px rgba(18, 18, 20, 0.15);
}
.badge:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(18, 18, 20, 0.15);
}

.badge-icon {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: #ffffff;
}

.badge-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
  text-align: left;
}
.badge-text small {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.badge-text strong {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* ---- Footer note ---- */
.invitation-note {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-muted);
  border-top: 1px solid var(--hairline);
}
.invitation-note a {
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.invitation-note a:hover {
  color: var(--brand-primary);
}

/* ---- Larger viewports ---- */
@media (min-width: 640px) {
  main {
    padding: 4rem 2rem 4rem;
    gap: 3rem;
  }
  .badges {
    flex-direction: row;
  }
  .badge {
    flex: 1;
    min-width: 0;
  }
}

/* ---- Dark mode ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #14130f;
    --surface-alt: #1c1a16;
    --surface-warm: #1a1814;
    --ink-primary: #f6f4f0;
    --ink-secondary: #c2bdb3;
    --ink-tertiary: #c7a583;
    --ink-muted: #8a857c;
    --hairline: rgba(246, 244, 240, 0.1);
  }
  .badge {
    background: #f6f4f0;
    color: #121214;
    border-color: #f6f4f0;
  }
  .badge:hover { background: #eae3d7; }
  .badge-icon { color: #121214; }
  .opening { background: rgba(255, 94, 50, 0.18); }
  .bg-decor { opacity: 0.45; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .opening::before { animation: none; opacity: 0.7; }
  .badge { transition: none; }
}
