/* ================================================================
   ELECTRONIC GAMES — STYLESHEET
   This file controls how the website LOOKS (colors, sizes, layout).

   👇 WANT TO CHANGE THE SITE'S COLORS?
   Just edit the color codes below! A color code starts with #
   followed by 6 letters/numbers. Try https://htmlcolorcodes.com
   to pick new ones.
   ================================================================ */

:root {
  /* 🎨 THE SITE'S COLORS — change these to restyle the WHOLE site! */
  --brand-red:   #e60012;   /* our signature red (Nintendo uses this one too!) */
  --brand-dark:  #1a1a1f;   /* near-black, used in the hero and footer */
  --ink:         #2d2d33;   /* main text color */
  --ink-soft:    #6b6b74;   /* lighter gray for smaller text */
  --paper:       #ffffff;   /* card and header background */
  --paper-soft:  #f5f5f7;   /* light gray section background */
  --line:        #e6e6ea;   /* thin border color */

  /* 🔠 FONT — clean and modern, uses fonts already on the computer */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
}

/* ================================================================
   BASICS — rules that apply to the whole page
   ================================================================ */

* {
  box-sizing: border-box;   /* makes sizing easier to predict */
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;  /* menu links glide instead of jumping */
}

body {
  font-family: var(--font-main);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

/* .container keeps content centered with a maximum width,
   like every professional site does */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

/* ================================================================
   HEADER — the bar at the top
   ================================================================ */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;                 /* header stays visible when scrolling */
  top: 0;
  z-index: 10;                      /* keeps it on top of everything */
}

.header-inner {
  display: flex;                    /* puts logo and menu side by side */
  justify-content: space-between;   /* logo left, menu right */
  align-items: center;
  flex-wrap: wrap;                  /* stacks nicely on small screens */
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

/* the red square with the white E — our logo mark */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand-red);
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
}

.logo-text {
  font-weight: 800;
  letter-spacing: 1.5px;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;            /* removes the underline */
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.15s;            /* smooth hover effect */
}

.site-nav a:hover {
  color: var(--brand-red);
  background: var(--paper-soft);
}

/* ================================================================
   HERO — the big product announcement (dark, dramatic)
   ================================================================ */

.hero {
  background: var(--brand-dark);
  /* a soft red glow rising from the bottom, like a stage light */
  background-image: radial-gradient(ellipse at 50% 120%,
    rgba(230, 0, 18, 0.35), transparent 60%);
  color: white;
  padding: 100px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;   /* text on the left, console on the right */
  align-items: center;
  gap: 48px;
}

/* on narrow screens (phones), stack them instead */
@media (max-width: 760px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ff8a92;                     /* soft red */
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.2rem);   /* big, but shrinks on phones */
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

/* the word in our brand red — used with class="accent" */
.accent {
  color: var(--brand-red);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #c9c9d1;                     /* soft gray on the dark background */
  max-width: 480px;
  margin-bottom: 28px;
}

@media (max-width: 760px) {
  .hero-subtitle { margin-left: auto; margin-right: auto; }
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .hero-badges { justify-content: center; }
}

/* the small pill labels under the headline */
.badge {
  display: inline-block;
  background: var(--brand-red);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
}

.badge-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #c9c9d1;
}

.console-art {
  cursor: pointer;                       /* shows a hand when hovering */
  transition: transform 0.25s;
}

.console-art:hover {
  transform: scale(1.04);                /* grows slightly on hover */
}

/* ================================================================
   SECTION TITLES + CARD GRIDS (shared by specs and games)
   ================================================================ */

/* the small red label above each section title */
.section-kicker {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-red);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 44px;
}

.card-grid {
  display: grid;
  /* makes columns that fit the screen: wide screen = more columns */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

/* ================================================================
   SPEC CARDS — the console feature boxes
   ================================================================ */

.specs {
  background: var(--paper-soft);
}

.spec-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);   /* soft, subtle shadow */
  transition: transform 0.2s, box-shadow 0.2s;
}

.spec-card:hover {
  transform: translateY(-4px);                 /* lifts gently on hover */
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* the icon sits in a soft red rounded square */
.spec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(230, 0, 18, 0.08);
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.spec-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.spec-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ================================================================
   NEWS CARDS
   ================================================================ */

.news-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  border-left: 4px solid var(--brand-red);   /* red stripe on the left */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 32px 36px;
  margin-bottom: 20px;
}

.news-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-red);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.news-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 8px 0 14px;
}

.news-card p {
  color: var(--ink-soft);
}

.news-card p + p {
  margin-top: 12px;    /* space between paragraphs */
}

/* ================================================================
   GAME CARDS
   ================================================================ */

.games {
  background: var(--paper-soft);
}

/* ---- THE FEATURED GAME — the big showcase card ---- */

.featured-game {
  display: grid;
  grid-template-columns: 1.2fr 1fr;   /* box art left, details right */
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;                   /* keeps art inside the rounded corners */
  /* a soft red glow makes it stand out from every other card */
  box-shadow: 0 16px 40px rgba(230, 0, 18, 0.15);
  margin-bottom: 28px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.featured-game:hover {
  transform: scale(1.015);            /* grows just a touch on hover */
  box-shadow: 0 20px 48px rgba(230, 0, 18, 0.22);
}

/* on narrow screens (phones), stack art on top of the details */
@media (max-width: 760px) {
  .featured-game { grid-template-columns: 1fr; }
}

.featured-cover {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;                  /* fills the space without squishing */
}

.featured-info {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;            /* centers the text vertically */
  align-items: flex-start;
  gap: 10px;
}

.featured-info h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
}

.featured-info > p {
  color: var(--ink-soft);
}

/* the developer credit line at the bottom of the featured card */
.featured-credit {
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 6px;
  width: 100%;
}

.featured-credit strong {
  color: var(--brand-red);
}

.games .card-grid {
  /* cards stay a nice size and centered, even when there's only one game */
  grid-template-columns: repeat(auto-fit, minmax(300px, 440px));
  justify-content: center;
  margin-bottom: 28px;
}

.game-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;               /* keeps the cover inside the rounded corners */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* the "cover art" — a colorful banner with the game's title */
.game-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  color: white;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* a real box-art picture as the cover (put the file in the static folder) */
.game-cover-img {
  display: block;
  width: 100%;                /* fills the card side to side */
  aspect-ratio: 16 / 9;       /* keeps the picture's shape on any screen */
  object-fit: cover;          /* crops instead of squishing */
}

/* no picture yet? give the game its own cover colors instead! */
.cover-mario   { background: linear-gradient(135deg, #e60012, #ff7b00); }

.game-info {
  padding: 24px 28px 28px;
}

.game-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.game-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.game-info p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ================================================================
   TEASER — the dark "more games coming soon" banner
   ================================================================ */

.teaser {
  background: var(--brand-dark);
  /* the same soft red glow as the hero, rising from the bottom */
  background-image: radial-gradient(ellipse at 50% 130%,
    rgba(230, 0, 18, 0.3), transparent 65%);
  color: white;
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
}

.teaser-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff8a92;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* the little red dot that gently pulses, like a "live" light */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-red);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(1.4); }
}

.teaser h3 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}

.teaser-text {
  color: #c9c9d1;
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 28px;
}

/* the three placeholder boxes for future games */
.teaser-slots {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.teaser-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.8rem;
  font-weight: 800;
  transition: all 0.2s;
}

.teaser-slot:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  transform: translateY(-4px);
}

/* ================================================================
   ABOUT SECTION
   ================================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;   /* story left, timeline right */
  gap: 48px;
  align-items: start;
}

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }   /* stack on phones */
}

.about-copy p + p {
  margin-top: 14px;
}

.about-copy {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.about-copy strong {
  color: var(--ink);
}

/* the company timeline */
.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
}

/* the little red dot before each timeline entry */
.timeline-marker {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-red);
}

/* ================================================================
   FOOTER
   ================================================================ */

.site-footer {
  text-align: center;
  background: var(--brand-dark);
  color: #c9c9d1;
  font-size: 0.9rem;
  padding: 48px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: white;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.footer-disclaimer {
  margin-top: 14px;
  font-size: 0.78rem;
  opacity: 0.6;
}

/* ================================================================
   CONFETTI — the pieces that burst out when you click the console.
   script.js creates them; this makes them look good and fall down.
   ================================================================ */

.confetti-piece {
  position: fixed;                /* floats over the page */
  width: 12px;
  height: 12px;
  border-radius: 3px;
  pointer-events: none;           /* clicks pass right through */
  animation: confetti-fall 1.5s ease-in forwards;
  z-index: 100;
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(300px) rotate(720deg);   /* falls and spins */
  }
}
