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

body {
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Theme variables
   Dark/gold palette + type tokens. Colors are fixed brand constants; Task 3
   reuses these custom properties for its SVG glow/background animations.
   ========================================================================== */
:root {
  --bg: #0b0b0b;
  --bg-elevated: #161616;
  --gold: #E8B923;
  --gold-bright: #F7C948;
  --text: #F5F5F0;
  --text-muted: #9A958C;
  --border: rgba(232, 185, 35, 0.25);

  /* Display face carries the wordmark + card titles: a geometric grotesk
     with even letterforms that stays crisp at wide letter-spacing.
     Body/tagline stay on the system stack set above -- one webfont fetch
     is enough for a page this small. */
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;

  /* Ease-out-expo curve for hover lifts/underlines: quick to start, long
     settle, reads as a deliberate "glide" rather than a linear snap. */
  --ease-glide: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 2rem;
  gap: 3rem;
  position: relative;
}

/* ==========================================================================
   Background accent (SVG dots/curve behind cards + hero)
   ========================================================================== */
.bg-accent {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-accent-curve {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.bg-accent-dot {
  fill: var(--gold);
  animation: dot-pulse 3s ease-in-out infinite;
}

.bg-accent-dot--delay1 { animation-delay: 0.6s; }
.bg-accent-dot--delay2 { animation-delay: 1.2s; }
.bg-accent-dot--delay3 { animation-delay: 1.8s; }

@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  z-index: 0;
}

.glow-ring {
  width: 100%;
  height: 100%;
  animation: ring-rotate 12s linear infinite;
}

.glow-ring-circle {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1;
  stroke-dasharray: 8 14;
  opacity: 0.5;
}

@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-logo {
  width: 140px;
  height: auto;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 6vw, 2.5rem);
  letter-spacing: 0.35em;
  /* optically re-center the wide tracking: the trailing letter-space
     otherwise reads as off-balance against the logo/tagline above/below */
  padding-left: 0.35em;
  color: var(--gold-bright);
  font-weight: 700;
}

.hero-tagline {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  transition: transform 0.3s var(--ease-glide), border-color 0.3s var(--ease-glide), box-shadow 0.3s var(--ease-glide);
}

.card--live:hover,
.card--live:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 28px rgba(232, 185, 35, 0.14);
}

.card--live:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.card--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-title {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 1.4rem;
  font-weight: 600;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.card-cta {
  margin-top: auto;
  color: var(--gold);
  font-weight: 600;
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(232, 185, 35, 0.15);
  color: var(--gold);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-contact {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease-glide), text-decoration-color 0.2s var(--ease-glide);
}

.footer-contact:hover,
.footer-contact:focus-visible {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-contact:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.footer-sep {
  margin: 0 0.5rem;
}

/* ==========================================================================
   Reveal animation (scroll-triggered)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Motion preference
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .card,
  .footer-contact {
    transition: none;
  }

  .card--live:hover {
    transform: none;
  }

  .bg-accent-dot,
  .glow-ring {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
  }
}
