/* RenFly product site — dark theme, mobile-first, minimal JS (player loading state only) */

:root {
  --bg: #121212;
  --surface: #1d1d1d;
  --border: #2c2c2c;
  --text: #e0e0e0;
  --text-muted: #8a8a8a;
  /* palette — mirrors the logo top to bottom: teal band, gold brim, strawberry */
  --accent:         #3ec0bc;  /* teal-green band — primary links and hero CTAs */
  --accent-hover:   #65ceca;
  --accent-ink:     #0d2221;  /* dark text on teal fills */
  --accent-2:       #f0c060;  /* straw-hat gold */
  --accent-2-hover: #f6d189;
  --accent-2-ink:   #221608;  /* dark text on gold fills */
  --accent-3:       #ff5a6e;  /* strawberry coral */
  --accent-3-hover: #ff7585;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* Nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand:hover {
  color: var(--text);
}

.brand-logo {
  display: block;
  width: 36px;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hero */

.hero {
  text-align: center;
  padding: 3rem 1.25rem 3.5rem;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.subtitle {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
}

/* Player embed — desktop only */

.player-embed {
  display: none; /* hidden on mobile; PLAY button is the primary CTA */
  position: relative;
  width: 100%;
  max-width: calc(85vh * 16 / 9); /* fill the width, but stay on screen */
  aspect-ratio: 16 / 9;
  min-height: 280px;
  margin: 0 auto 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.player-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Loading spinner — shown until the Flutter player paints its first frame */

.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.player-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: player-spin 0.9s linear infinite;
}

@keyframes player-spin {
  to {
    transform: rotate(360deg);
  }
}

.player-embed.loaded .player-loading {
  display: none;
}

.maximize {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: var(--text);
  background: rgba(18, 18, 18, 0.65);
  transition: background 0.15s ease, color 0.15s ease;
}

.maximize:hover {
  color: #fff;
  background: rgba(18, 18, 18, 0.9);
}

/* PLAY button — primary CTA on mobile, secondary under the iframe on desktop */

.play-button,
.edit-button {
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.play-button {
  color: var(--accent-ink);
  background: var(--accent);
}

.play-button:hover {
  color: var(--accent-ink);
  background: var(--accent-hover);
}

.edit-button {
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--accent);
  padding: calc(1rem - 2px) calc(3rem - 2px);
}

.edit-button:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* About */

.about,
.downloads {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.about h2,
.downloads h2 {
  font-size: 1.3rem;
  margin: 0 0 0.75rem;
}

.about p {
  color: var(--text-muted);
  margin: 0;
}

/* Download badges */

.downloads {
  text-align: center;
  padding-bottom: 3.5rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.badge:hover {
  border-color: var(--text-muted);
}

.badge-platform {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

.badge-status {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Footer */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
}

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

/* Desktop */

@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .player-embed {
    display: block;
  }

  .play-button {
    padding: 0.65rem 2rem;
    font-size: 1rem;
  }

  .edit-button {
    padding: calc(0.65rem - 2px) calc(2rem - 2px);
    font-size: 1rem;
  }
}


/* RenSpine: a centered gold sub-hero, matching fiestavn.com's treatment, so
   the sibling product reads distinct from RenFly */

.renspine {
  text-align: center;
}

.renspine p {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.renspine a {
  color: var(--accent-2);
}

.renspine a:hover {
  color: var(--accent-2-hover);
}

.renspine-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.renspine .play-button {
  color: var(--accent-2-ink);
  background: var(--accent-2);
}

.renspine .play-button:hover {
  color: var(--accent-2-ink);
  background: var(--accent-2-hover);
}

.renspine .edit-button {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.renspine .edit-button:hover {
  color: var(--accent-2-hover);
  border-color: var(--accent-2-hover);
}
