/* =============================================
   style-index.css — X·O: Ultimate Tic-Tac-Toe
   Styles and colours of Numbers'19 (numbers-19.web.app), one to one;
   light only. X·O additions at the end.
   ============================================= */

/* ── TOKENS ── */
:root {
  --bg:        #FFFDF9;
  --bg-alt:    rgba(245, 239, 230, 0.75);
  --bg-dark:   #2E4384;

  --text:      #2E4384;
  --text-dark: #FFFDF9;
  --muted:     #6B7EAD;
  --muted-dark:#A8B4C8;

  --accent:    #9F586D;

  --border:    rgba(46, 67, 132, 0.12);

  --px: 60px;
}

html {
  scroll-behavior: smooth;
  background-color: #FFFDF9;
}

body {
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  font-weight: 400;
  color: var(--text);
  background: transparent;
  min-width: 360px;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FFFDF9;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--px);
}

#meet,
#howtoplay {
  scroll-margin-top: 57px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 6px rgba(46, 67, 132, 0.22));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Download pill */
.nav-download {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600 !important;
  transition: opacity 0.2s !important;
}

.nav-download:hover {
  color: #fff !important;
  opacity: 0.85;
}

/* ── HERO ── */
.hero {
  background: #FFFDF9;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 61px);
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 80px;
  max-width: 1200px;
  width: 100%;
  padding: 60px var(--px);
}

.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 540px;
}

.hero-left h1 {
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-sub {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text);
}

.appstore-btn {
  display: block;
  margin-top: 36px;
}

.appstore-icon {
  height: 52px;
  width: auto;
  display: block;
  transition: opacity 0.2s, transform 0.2s;
}

.appstore-icon:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.hero-right {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.app-screen {
  width: 100%;
  max-width: 520px;
  display: block;
  filter: drop-shadow(0 20px 48px rgba(46, 67, 132, 0.18));
}

/* ── SHARED SECTION HEADER ── */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-header .sub {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.65;
}

/* ── HOW IT WORKS (cards) ── */
.howtoplay-section {
  background: #9F586D;
  padding: 70px 0;
}

.howtoplay-section .section-header {
  padding: 0 var(--px);
  margin-bottom: 40px;
}

.howtoplay-section .section-header h2 {
  color: #FFFDF9;
}

.howtoplay-section .section-header .sub {
  color: #F5CEDB;
}

.feat-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0 28px;
  justify-content: safe center;
  scrollbar-width: thin;
  scrollbar-color: rgba(46, 67, 132, 0.18) transparent;
}

.feat-card:first-child { margin-left: 16px; }
.feat-card:last-child  { margin-right: 16px; }

.feat-grid::-webkit-scrollbar {
  height: 4px;
}

.feat-grid::-webkit-scrollbar-track {
  background: transparent;
}

.feat-grid::-webkit-scrollbar-thumb {
  background: rgba(46, 67, 132, 0.18);
  border-radius: 2px;
}

.feat-card {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  flex-shrink: 0;
  width: 280px;
  gap: 20px;
  padding: 28px 24px 32px;
  background: rgba(255, 253, 249, 0.92);
  border-radius: 24px;
  scroll-snap-align: start;
  box-shadow: 0 4px 20px rgba(46, 67, 132, 0.10);
}

.feat-card-img-wrap {
  flex-shrink: 0;
  border-radius: 18px;
  overflow: hidden;
}

.feat-card-img {
  width: 210px;
  display: block;
}

.feat-card-body {
  text-align: center;
}

.feat-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.feat-card-body p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
}

/* ── FOOTER ── */
footer {
  background: #FFFDF9;
  border-top: 1px solid var(--border);
  padding: 28px var(--px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--text);
}

.social-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.social-links a {
  display: flex;
  align-items: center;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.social-links a:hover {
  opacity: 1;
}

.social-icon {
  width: 28px;
  height: 28px;
  display: block;
  background-color: var(--accent);
  -webkit-mask: url('../images/social/email.png') no-repeat center / contain;
  mask: url('../images/social/email.png') no-repeat center / contain;
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: var(--accent);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  :root { --px: 32px; }

  .nav-download {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    flex-direction: column;
    gap: 48px;
    padding: 56px var(--px);
  }

  .hero-left {
    max-width: 100%;
  }

  .hero-right {
    width: 100%;
    justify-content: center;
  }

  .app-screen {
    max-width: 420px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-copy {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  :root { --px: 20px; }

  .nav-download {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    flex-direction: column;
    gap: 40px;
    padding: 48px var(--px);
  }

  .hero-left {
    max-width: 100%;
  }

  .hero-right {
    width: 100%;
    justify-content: center;
  }

  .app-screen {
    max-width: 300px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .footer-copy {
    margin-top: 0;
  }
}

/* ── X·O ADDITIONS ── */
:root { color-scheme: light; }

img { max-width: 100%; height: auto; }

/* Narrow windows: Download always stays in the nav;
   How to Play gives way instead (Numbers'19 hides Download here). */
@media (max-width: 960px) {
  .nav-links a[href="#howtoplay"] { display: none; }
  .nav-download { display: inline-block; }
}

/* Footer: Privacy Policy and Terms of Use on the left, the e-mail icon on the right of the
   same line, at every width (Numbers'19 stacks them below 960 px). */
.social-links {
  margin-left: auto;
}

@media (max-width: 960px) {
  footer {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .footer-nav { gap: 8px 14px; }
  .footer-nav a { font-size: 0.8rem; }
}
