/* Card Sense Trainer site styles. Theme matches the app: felt greens, gold,
   and cream, with the screenshot carousel cross-fading like a dealt hand. */

:root {
  --felt: #0F5132;
  --felt-dark: #0B3F27;
  --felt-deep: #08361F;
  --gold: #E0B34A;
  --gold-ink: #2E2101;
  --cream: #F8F5EC;
  --muted: rgba(248, 245, 236, 0.72);
  --line: rgba(248, 245, 236, 0.16);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--felt-dark);
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  padding-top: 56px; /* fixed navbar */
}

/* Fixed navbar: brand on the left, links centered, hamburger on mobile. */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--felt-deep);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  z-index: 100;
}
.nav-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-weight: 800;
  font-size: 18px;
}
.nav-brand:hover { text-decoration: none; color: var(--cream); }
.nav-crown { width: 42px; height: 42px; flex: none; }
.nav-menu {
  list-style: none;
  display: flex;
  gap: 6px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-menu a {
  display: block;
  color: rgba(248, 245, 236, 0.85);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 14px;
}
.nav-menu a:hover { color: var(--gold); text-decoration: none; }
.nav-toggler {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  cursor: pointer;
}
.nav-toggler span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cream);
  margin: 4px 0;
  border-radius: 1px;
}

a { color: var(--gold); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

/* Hero: copy on the left, the phone carousel on the right. */
.hero { padding: 52px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.brand .crown { width: 64px; height: 64px; flex: none; }
.brand h1 { font-size: 34px; font-weight: 800; letter-spacing: 0.3px; line-height: 1.15; }
.tagline {
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 14px;
}
.lede { color: var(--muted); font-size: 17px; margin-bottom: 14px; }
/* The call to action: gold button with the App Store badge below, both
   centered on the hero text column. */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}
.cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 999px;
}
.cta-btn:hover { text-decoration: none; background: var(--cream); }
.store-badge { height: 50px; width: auto; transition: transform 0.2s ease; }
.store-badge:hover { transform: scale(1.05); }

/* The phone: seven framed screenshots stacked and cross-faded on a 21s
   cycle. The iPhone frame is baked into each image with transparency, so
   the container adds no chrome of its own. */
.phone {
  max-width: 264px;
  margin: 0 auto;
  position: relative;
  background: transparent;
}
.phone img { width: 100%; height: auto; display: block; }
.shot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
}
.shot:first-child { position: relative; opacity: 1; }
.phone.loaded .shot:nth-child(1) { animation: shotCycle1 21s ease-in-out infinite; }
.phone.loaded .shot:nth-child(2) { animation: shotCycle2 21s ease-in-out infinite; }
.phone.loaded .shot:nth-child(3) { animation: shotCycle3 21s ease-in-out infinite; }
.phone.loaded .shot:nth-child(4) { animation: shotCycle4 21s ease-in-out infinite; }
.phone.loaded .shot:nth-child(5) { animation: shotCycle5 21s ease-in-out infinite; }
.phone.loaded .shot:nth-child(6) { animation: shotCycle6 21s ease-in-out infinite; }
.phone.loaded .shot:nth-child(7) { animation: shotCycle7 21s ease-in-out infinite; }

@keyframes shotCycle1 { 0% { opacity: 1; } 43% { opacity: 1; } 48% { opacity: 0; } 100% { opacity: 0; } }
@keyframes shotCycle2 { 0% { opacity: 0; } 5% { opacity: 0; } 10% { opacity: 1; } 53% { opacity: 1; } 58% { opacity: 0; } 100% { opacity: 0; } }
@keyframes shotCycle3 { 0% { opacity: 0; } 19% { opacity: 0; } 24% { opacity: 1; } 67% { opacity: 1; } 72% { opacity: 0; } 100% { opacity: 0; } }
@keyframes shotCycle4 { 0% { opacity: 0; } 33% { opacity: 0; } 38% { opacity: 1; } 81% { opacity: 1; } 86% { opacity: 0; } 100% { opacity: 0; } }
@keyframes shotCycle5 { 0% { opacity: 0; } 48% { opacity: 0; } 53% { opacity: 1; } 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes shotCycle6 { 0% { opacity: 0; } 62% { opacity: 0; } 67% { opacity: 1; } 100% { opacity: 1; } }
@keyframes shotCycle7 { 0% { opacity: 0; } 76% { opacity: 0; } 81% { opacity: 1; } 100% { opacity: 1; } }

/* Sections and panels. */
section { padding: 34px 0; }
.section-title {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  text-align: center;
  margin-bottom: 22px;
}
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--felt);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 20px 18px;
}
.card h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }
.card .pip {
  color: var(--gold);
  font-size: 18px;
  margin-right: 9px;
  font-weight: 400;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.pro-panel {
  background: var(--felt);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px;
  text-align: center;
}
.pro-panel h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.pro-panel p { color: var(--muted); font-size: 16px; max-width: 560px; margin: 0 auto; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 26px 0 34px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
footer p { margin-bottom: 6px; }

@media (max-width: 760px) {
  .hero { padding: 36px 0 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero-visual { order: -1; }
  .brand { justify-content: center; }
  .brand h1 { font-size: 28px; }
  .phone { max-width: 224px; }
  .features { grid-template-columns: 1fr; }

  /* Collapsed nav: hamburger toggles a dropdown under the bar. */
  .nav-toggler { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    transform: none;
    flex-direction: column;
    gap: 0;
    background: var(--felt-deep);
    border-top: 1px solid var(--line);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.4);
    padding: 6px 0 10px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 24px; }
}
