@font-face {
  font-family: "Fredoka";
  src: url("../assets/cup-clash/fonts/fredoka-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --navy: #101820;
  --navy-2: #182a3a;
  --field: #356b45;
  --field-dark: #1f4b31;
  --yellow: #ffd43b;
  --yellow-dark: #e6a91c;
  --cream: #f7f7f2;
  --white: #fff;
  --blue: #245db5;
  --muted: #657067;
  --line: rgba(16, 24, 32, 0.17);
  --shadow: 7px 7px 0 var(--navy);
  font-family: "Fredoka", system-ui, sans-serif;
  font-synthesis: none;
  color: var(--navy);
  background: var(--cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--cream); }
body { margin: 0; min-width: 280px; overflow-x: hidden; background: var(--cream); line-height: 1.55; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 16px; transform: translateY(-150%); border-radius: 10px; background: var(--navy); color: white; }
.skip-link:focus { transform: none; }

.game-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 2px solid var(--navy);
  background: rgba(247,247,242,.94);
  backdrop-filter: blur(14px);
}
.header-inner, .section, .footer-inner { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.header-inner { display: flex; min-height: 72px; gap: 24px; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 1.25rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand img { width: 42px; height: 42px; border: 2px solid var(--navy); border-radius: 12px; }
.header-inner nav { display: flex; gap: 8px 22px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.header-inner nav a { font-weight: 600; text-decoration: none; }
.header-inner nav a:hover, .header-inner nav a[aria-current] { color: var(--field); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 4px; text-underline-offset: 6px; }

.section { position: relative; padding-block: clamp(76px, 10vw, 138px); }
.section-line::before {
  position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(53,107,69,.18) 0 14px, transparent 14px 26px);
  content: "";
}
.kicker { margin: 0 0 10px; color: var(--field); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-heading { max-width: 760px; margin-bottom: clamp(30px, 5vw, 58px); }
.section-heading h2, .final-cta h2 { margin: 0; font-size: clamp(2.2rem, 6vw, 4.9rem); line-height: .98; letter-spacing: -.045em; }
.section-heading > p:last-child { max-width: 650px; color: var(--muted); font-size: 1.05rem; }

.hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(340px, 1.08fr); gap: clamp(40px, 8vw, 100px); align-items: center; min-height: calc(100vh - 72px); padding-top: clamp(50px, 7vw, 90px); }
.hero-copy { z-index: 2; }
.hero-logo { width: clamp(220px, 27vw, 390px); margin: 12px 0 24px; filter: drop-shadow(4px 5px 0 rgba(16,24,32,.12)); }
.hero h1 { margin: 0; font-size: clamp(3.4rem, 7.6vw, 7rem); line-height: .86; letter-spacing: -.055em; text-transform: uppercase; }
.hero h1 span { color: var(--field); }
.hero-copy > p:not(.kicker):not(.status) { max-width: 580px; color: #38433d; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; gap: 14px; margin: 30px 0 20px; flex-wrap: wrap; }
.button { display: inline-flex; min-height: 54px; padding: 12px 24px; border: 3px solid var(--navy); border-radius: 15px; align-items: center; justify-content: center; font-weight: 700; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--navy); }
.button-primary { background: var(--yellow); }
.button-primary[aria-disabled="true"] { cursor: default; opacity: .82; }
.button-ghost { background: white; }
.status { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.status span { width: 11px; height: 11px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255,212,59,.25); }

.hero-stage { position: relative; min-height: clamp(520px, 72vw, 760px); overflow: hidden; border: 4px solid var(--navy); border-radius: 44px; background: var(--field); box-shadow: 12px 12px 0 var(--yellow), 18px 18px 0 var(--navy); }
.pitch-markings { position: absolute; inset: 20px; border: 3px solid rgba(255,255,255,.74); border-radius: 28px; }
.pitch-markings::before { position: absolute; top: 50%; left: 0; width: 100%; height: 3px; background: rgba(255,255,255,.74); content: ""; }
.pitch-markings::after { position: absolute; top: 50%; left: 50%; width: 150px; aspect-ratio: 1; transform: translate(-50%,-50%); border: 3px solid rgba(255,255,255,.74); border-radius: 50%; content: ""; }
.collage-art { position: absolute; z-index: 2; inset: 70px 24px 28px; }
.collage-art img { position: absolute; object-fit: contain; filter: drop-shadow(8px 10px 0 rgba(16,24,32,.35)); }
.collage-player { width: 48%; bottom: 6%; }
.collage-player-left { left: 0; transform: rotate(-8deg); }
.collage-player-right { right: 0; transform: rotate(8deg); }
.collage-ball { z-index: 2; width: 34%; left: 50%; bottom: 20%; transform: translateX(-50%); }
.collage-rank { z-index: 3; width: 28%; top: 3%; left: 50%; transform: translateX(-50%) rotate(2deg); }
.score-chip { position: absolute; z-index: 3; top: 28px; left: 50%; display: flex; gap: 12px; padding: 9px 16px; transform: translateX(-50%); border: 3px solid var(--navy); border-radius: 999px; align-items: center; background: var(--cream); box-shadow: 4px 4px 0 var(--navy); font-size: .72rem; }
.score-chip b { color: var(--blue); font-size: 1.3rem; }

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 7vw, 90px); }
.intro-copy { padding: 28px; border-left: 7px solid var(--yellow); background: rgba(255,255,255,.78); font-size: 1.15rem; }
.spec-list { display: grid; margin: 0; border: 3px solid var(--navy); border-radius: 22px; overflow: hidden; background: white; box-shadow: var(--shadow); }
.spec-list div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.spec-list div:last-child { border: 0; }
.spec-list dt { color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.spec-list dd { margin: 0; font-weight: 600; }

.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.feature-card { position: relative; min-height: 270px; padding: 22px; overflow: hidden; border: 3px solid var(--navy); border-radius: 20px; background: white; transition: transform .18s ease; }
.feature-card:nth-child(3n+2) { background: #fff4bf; }
.feature-card:nth-child(4n) { background: #e6f1e9; }
.feature-card:hover { transform: translateY(-5px) rotate(-.5deg); }
.feature-index { position: absolute; right: 14px; color: rgba(16,24,32,.12); font-size: 3rem; font-weight: 700; }
.feature-icon { display: grid; width: 54px; height: 54px; margin-bottom: 38px; border: 3px solid var(--navy); border-radius: 50%; place-items: center; background: var(--yellow); font-weight: 700; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.18rem; line-height: 1.05; }
.feature-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.dark-section { width: 100%; max-width: none; padding-inline: max(16px, calc((100vw - 1180px)/2)); background: var(--navy); color: white; }
.dark-section .kicker { color: var(--yellow); }
.dark-section .section-heading > p:last-child { color: #b9c4cb; }
.gameplay-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; }
.gameplay-card { display: grid; min-height: 300px; overflow: hidden; border: 3px solid white; border-radius: 24px; background: var(--navy-2); }
.gameplay-main { grid-row: span 2; min-height: 620px; }
.gameplay-media { display: grid; min-height: 210px; place-items: center; background: linear-gradient(135deg, var(--field-dark), var(--field)); }
.gameplay-main .gameplay-media { min-height: 450px; }
.asset-fallback { display: grid; width: 100%; min-height: inherit; padding: 24px; place-items: center; color: rgba(255,255,255,.72); font-weight: 600; text-align: center; }
.gameplay-copy { padding: 20px 22px 24px; }
.gameplay-copy h3 { margin: 5px 0; font-size: 1.35rem; }
.gameplay-copy p { margin: 0; color: #b9c4cb; }
.media-state { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-size: .7rem; font-weight: 700; text-transform: uppercase; }

.screen-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.screen-card { min-width: 0; }
.screen-visual { position: relative; display: grid; min-height: 390px; overflow: hidden; border: 3px solid var(--navy); border-radius: 28px; place-items: center; background: var(--field); box-shadow: 7px 7px 0 var(--navy); }
.screen-visual::before { position: absolute; top: 10px; left: 16px; color: rgba(255,255,255,.3); content: attr(data-screen); font-size: 3rem; font-weight: 700; }
.screen-card h3 { margin: 24px 0 4px; font-size: 1.35rem; }
.screen-card p { margin: 0; color: var(--muted); }

.ranks-section { width: 100%; max-width: none; padding-inline: max(16px, calc((100vw - 1180px)/2)); background: #f0e5ba; }
.rank-track { display: grid; gap: 12px; }
.rank-card { display: grid; grid-template-columns: 138px 1fr; gap: 28px; min-height: 150px; padding: 18px 26px; border: 3px solid var(--navy); border-radius: 22px; align-items: center; background: var(--cream); }
.rank-card:nth-child(even) { transform: translateX(34px); }
.rank-visual { display: grid; height: 115px; place-items: center; }
.rank-visual img { width: 112px; height: 112px; object-fit: contain; }
.rank-card h3 { margin: 0; font-size: 1.65rem; }
.rank-cups { color: var(--field); }
.rank-card p { margin: 5px 0 0; color: var(--muted); }

.collection-heading { display: flex; gap: 24px; margin: 60px 0 20px; align-items: baseline; }
.collection-heading h3 { margin: 0; font-size: 2rem; }
.collection-heading p { margin: 0; color: var(--muted); }
.asset-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.ball-grid, .field-grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
.asset-card { min-width: 0; overflow: hidden; border: 3px solid var(--navy); border-radius: 20px; background: white; box-shadow: 5px 5px 0 var(--navy); }
.asset-visual { display: grid; min-height: 220px; margin: 0; place-items: center; background: #e9f1e9; }
.asset-visual img { width: 90%; height: 210px; object-fit: contain; }
.balls-card .asset-visual, .ball-grid .asset-visual { background: #eee9df; }
.field-grid .asset-visual { min-height: 170px; background: repeating-linear-gradient(0deg,#356b45 0 28px,#3f7950 28px 56px); }
.field-grid .asset-fallback { min-height: 170px; color: rgba(255,255,255,.86); }
.asset-card-header { display: flex; gap: 8px; padding: 17px 16px 6px; align-items: center; justify-content: space-between; }
.asset-card h3 { margin: 0; font-size: 1.2rem; }
.asset-card > p { margin: 0; padding: 0 16px 18px; color: var(--muted); }
.price-tag { padding: 4px 8px; border-radius: 999px; background: var(--yellow); font-size: .72rem; font-weight: 700; white-space: nowrap; }

.brand-section { width: 100%; max-width: none; padding-inline: max(16px, calc((100vw - 1180px)/2)); background: var(--field-dark); color: white; }
.brand-section .kicker { color: var(--yellow); }
.brand-showcase { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 18px; }
.logo-frame { display: grid; min-height: 330px; margin: 0; padding: 30px; border: 3px solid white; border-radius: 24px; place-items: center; }
.logo-frame.light { background: var(--cream); }
.logo-frame.dark { background: var(--navy); }
.logo-frame img { max-height: 260px; object-fit: contain; }
.brand-notes { padding: 30px; border: 3px solid white; border-radius: 24px; background: rgba(16,24,32,.24); }
.brand-notes h3 { margin-top: 0; font-size: 2rem; }
.swatches { display: grid; gap: 8px; margin-top: 26px; }
.swatches span { display: grid; grid-template-columns: 1fr auto; position: relative; padding: 10px 12px 10px 44px; border-radius: 10px; background: rgba(255,255,255,.1); font-size: .8rem; }
.swatches span::before { position: absolute; top: 8px; bottom: 8px; left: 9px; width: 24px; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; background: var(--swatch); content: ""; }

.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.media-card { display: grid; min-width: 0; overflow: hidden; border: 2px solid var(--navy); border-radius: 18px; grid-template-columns: 90px 1fr; background: white; }
.media-thumb { display: grid; min-height: 110px; margin: 0; place-items: center; background: #e7efe8; }
.media-thumb img { width: 100%; height: 110px; object-fit: contain; }
.media-thumb .asset-fallback { min-height: 110px; padding: 10px; color: var(--muted); font-size: .72rem; }
.media-card > div { padding: 14px; }
.media-card small { color: var(--muted); text-transform: uppercase; }
.media-card h3 { margin: 3px 0 10px; font-size: 1rem; line-height: 1.1; }
.text-link { color: var(--blue); font-size: .8rem; font-weight: 700; }
.copy-section { width: 100%; max-width: none; padding-inline: max(16px, calc((100vw - 1180px)/2)); background: #f0e5ba; }
.copy-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.copy-grid article { padding: 28px; border: 3px solid var(--navy); border-radius: 22px; background: var(--cream); box-shadow: 6px 6px 0 var(--navy); }
.copy-grid small { color: var(--field); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.copy-grid h3 { margin: 18px 0 8px; font-size: 1.65rem; line-height: 1.05; }
.copy-grid p { margin: 0; color: var(--muted); }

.final-cta { display: grid; grid-template-columns: 150px 1fr auto; gap: 32px; margin-bottom: 90px; padding: 34px; border: 4px solid var(--navy); border-radius: 28px; align-items: center; background: var(--yellow); box-shadow: 10px 10px 0 var(--navy); }
.final-cta img { max-height: 120px; object-fit: contain; }
.final-cta h2 { font-size: clamp(2rem,5vw,4rem); }
.final-cta p { margin-bottom: 0; }
.final-cta .button { background: var(--cream); }

footer { border-top: 3px solid var(--navy); background: var(--navy); color: white; }
.footer-inner { display: flex; min-height: 170px; gap: 30px; align-items: center; justify-content: space-between; }
.footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-inner a { color: white; }

@media (max-width: 1000px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .screen-grid, .asset-grid, .media-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ball-grid, .field-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .brand-showcase { grid-template-columns: 1fr 1fr; }
  .brand-notes { grid-column: 1 / -1; }
  .copy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 66px; }
  .header-inner nav { max-width: 70%; gap: 5px 12px; }
  .header-inner nav a { font-size: .75rem; }
  .header-inner nav a:nth-last-child(-n+2) { display: none; }
  .brand span { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 44px; }
  .hero-stage { min-height: 570px; }
  .intro-grid, .gameplay-grid { grid-template-columns: 1fr; }
  .gameplay-main { grid-row: auto; min-height: 500px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .rank-card:nth-child(even) { transform: none; }
  .brand-showcase { grid-template-columns: 1fr; }
  .brand-notes { grid-column: auto; }
  .final-cta { grid-template-columns: 90px 1fr; }
  .final-cta .button { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .rank-card:nth-child(even) { transform: none; }
}

@media (max-width: 520px) {
  .header-inner, .section, .footer-inner { width: min(100% - 22px, 1180px); }
  .section { padding-block: 72px; }
  .header-inner nav a:nth-last-child(-n+3) { display: none; }
  .hero h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  .hero-stage { min-height: 520px; border-radius: 30px; box-shadow: 7px 7px 0 var(--yellow), 11px 11px 0 var(--navy); }
  .hero-actions .button { width: 100%; }
  .section-heading h2 { font-size: clamp(2.45rem, 12vw, 3.7rem); }
  .feature-grid, .screen-grid, .asset-grid, .ball-grid, .field-grid, .media-grid { grid-template-columns: 1fr 1fr; gap: 11px; }
  .feature-card { min-height: 245px; padding: 16px; }
  .feature-icon { margin-bottom: 30px; }
  .screen-visual { min-height: 310px; border-radius: 20px; box-shadow: 4px 4px 0 var(--navy); }
  .screen-card p { font-size: .85rem; }
  .rank-card { grid-template-columns: 88px 1fr; gap: 15px; padding: 14px; }
  .rank-visual { height: 82px; }
  .rank-visual img { width: 80px; height: 80px; }
  .rank-card p { display: none; }
  .collection-heading { display: block; }
  .asset-visual { min-height: 170px; }
  .asset-visual img { height: 160px; }
  .asset-card-header { display: block; }
  .asset-card h3 { margin-bottom: 7px; }
  .asset-card > p { display: none; }
  .media-card { grid-template-columns: 1fr; }
  .media-thumb { min-height: 125px; }
  .logo-frame { min-height: 270px; }
  .final-cta { grid-template-columns: 1fr; text-align: center; }
  .final-cta img { margin-inline: auto; }
  .footer-inner { align-items: flex-start; padding-block: 38px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
