/* IV League — ivleague-pogo.app
   A dark-first, native-feeling iOS product page. The app leads: real captures in
   real device frames. Coral comes from the app icon and marks actions only.
   Battle-rating colors are PvPoke's, from PvPokeTheme fill tokens. */

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

:root {
  color-scheme: dark;

  /* Dark first: the app's own dark appearance, with true black as the ground. */
  --bg: #000000;
  --band: #0e0e10;           /* alternate section ground */
  --panel: #161618;          /* tiles and plans */
  --card: #1d1d1f;           /* raised cards on a band */
  --ink: #f5f5f7;
  --ink-2: #a1a1a6;          /* 6.9:1 on --card, 8.2:1 on black */
  --line: #3a3a3c;
  --hair: rgba(255, 255, 255, .1);

  --accent: #b8463c;         /* icon coral as a fill: white text 5.3:1 */
  --accent-hover: #a33d34;          /* 6.2:1 with white text */
  --accent-text: #ff8f82;    /* coral as text on dark: 9.5:1 on black */
  --live: #30d158;           /* iOS system green (dark) */

  /* PvPoke battle-rating fills (white labels ≥ 4.6:1) */
  --r-win: #117cb1;
  --r-tie: #787092;
  --r-closeloss: #a91c7e;
  --r-loss: #c71b71;

  /* The app is SwiftUI on SF Pro; the page speaks the same face where the
     platform has it, and the nearest platform sans elsewhere. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, "Segoe UI", Roboto, sans-serif;

  --t-hero: clamp(2.375rem, 1.3rem + 4vw, 4.625rem);
  --t-h2: clamp(2.25rem, 1.35rem + 3.2vw, 4rem);
  --t-h3: clamp(1.375rem, 1.2rem + .6vw, 1.75rem);
  --t-lede: clamp(1.1875rem, 1.05rem + .5vw, 1.5rem);
  --t-body: 1.0625rem;
  --t-small: .875rem;
  --t-micro: .75rem;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1080px;
  --radius: 28px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; scrollbar-color: #48484a transparent; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.47;
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 143, 130, .3); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b, strong { font-weight: 600; }

:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--ink); color: #000; padding: 10px 16px; border-radius: 12px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 10px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: 52px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; }
.nav ul { list-style: none; display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.nav-link a { text-decoration: none; font-size: var(--t-small); color: var(--ink); opacity: .8; padding: 14px 0; display: inline-block; }
.nav-link a:hover { opacity: 1; }
@media (max-width: 600px) { .nav-link { display: none; } }

/* ---------- Actions ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 980px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-size: var(--t-body); font-weight: 500; letter-spacing: -.01em;
  transition: background-color .2s ease, transform .15s var(--ease-out);
}
.pill:hover { background: var(--accent-hover); }
.pill:active { transform: scale(.97); }
.pill-sm { min-height: 30px; padding: 0 14px; font-size: .8125rem; }

.more-link {
  display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text);
  text-decoration: none; font-size: var(--t-body); padding: 12px 4px;
}
.more-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.more-link svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Type shared ---------- */
h1, h2 { font-weight: 700; text-wrap: balance; }
h1 span, h2 span { display: block; color: var(--ink-2); }
h2 { font-size: var(--t-h2); line-height: 1.06; letter-spacing: -.03em; }
h3 { font-size: var(--t-h3); line-height: 1.18; letter-spacing: -.025em; font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }

.section-head { text-align: center; max-width: 62rem; margin: 0 auto; }
.section-head p { margin: 20px auto 0; max-width: 36em; color: var(--ink-2); font-size: var(--t-lede); line-height: 1.42; letter-spacing: -.015em; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: clamp(24px, 3vw, 40px); overflow: hidden; }
.hero-copy { padding: 0 var(--gutter); max-width: 56rem; margin: 0 auto; }
.hero-icon {
  width: clamp(72px, 6.5vw, 92px); height: auto; margin: 0 auto 16px;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .6));
}
.hero h1 { font-size: var(--t-hero); line-height: 1.03; letter-spacing: -.032em; }
.lede {
  margin: 18px auto 0; max-width: 34em; color: var(--ink-2);
  font-size: var(--t-lede); line-height: 1.42; letter-spacing: -.015em;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 24px; margin-top: 24px; }
.availability {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  margin-top: 12px; font-size: var(--t-small); color: var(--ink-2);
}
.availability span { display: inline-flex; align-items: center; gap: 6px; }
.availability svg { width: 14px; height: 14px; fill: var(--live); }
.availability .soon svg { fill: none; stroke: var(--ink-2); stroke-width: 1.5; }

/* Device: a real iPhone 17 Pro Max bezel raster over the real capture.
   The screen box is measured from the bezel's transparent opening. */
.device { position: relative; aspect-ratio: 820 / 1699; }
.device-screen {
  position: absolute; left: 3.744%; top: 1.543%; width: 92.512%; height: 96.951%;
  object-fit: cover; object-position: top; border-radius: 10.5% / 4.85%; background: #000;
}
.device-bezel { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-stage {
  position: relative; height: clamp(300px, 34vw, 440px);
  margin: clamp(24px, 2.6vw, 36px) auto 0; max-width: var(--max);
}
.hero-stage .device {
  position: absolute; left: 50%; width: clamp(196px, 23vw, 300px);
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .7));
}
.hero-center { top: 0; z-index: 3; transform: translateX(-50%); }
.hero-left { top: 12%; z-index: 2; transform: translateX(-136%) rotate(-5deg) scale(.88); }
.hero-right { top: 12%; z-index: 2; transform: translateX(36%) rotate(5deg) scale(.88); }

@media (prefers-reduced-motion: no-preference) {
  .hero-center { animation: rise-c 1.1s var(--ease-out) both; }
  .hero-left { animation: rise-l 1.2s .08s var(--ease-out) both; }
  .hero-right { animation: rise-r 1.2s .16s var(--ease-out) both; }
  @keyframes rise-c { from { transform: translateX(-50%) translateY(60px); } }
  @keyframes rise-l { from { transform: translateX(-110%) translateY(90px) rotate(0) scale(.88); } }
  @keyframes rise-r { from { transform: translateX(10%) translateY(90px) rotate(0) scale(.88); } }
}

@media (max-width: 640px) {
  .hero-stage { height: 92vw; margin-top: 24px; }
  .hero-stage .device { width: 52vw; }
  .hero-left { transform: translateX(-116%) rotate(-5deg) scale(.82); }
  .hero-right { transform: translateX(16%) rotate(5deg) scale(.82); }
  @media (prefers-reduced-motion: no-preference) {
    @keyframes rise-l { from { transform: translateX(-98%) translateY(90px) rotate(0) scale(.82); } }
    @keyframes rise-r { from { transform: translateX(-2%) translateY(90px) rotate(0) scale(.82); } }
  }
}

/* ---------- PvPoke ---------- */
.pvpoke { background: var(--band); padding: clamp(72px, 11vw, 140px) 0; }

.ratings {
  margin-top: clamp(40px, 6vw, 64px);
  background: var(--card); border-radius: var(--radius);
  padding: clamp(20px, 3.4vw, 40px);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.ratings figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 22px; }
.ratings figcaption strong { font-size: var(--t-h3); letter-spacing: -.025em; }
.ratings figcaption span { color: var(--ink-2); font-size: var(--t-small); }

.ratings-grid { display: grid; gap: 10px; }
.r-row { display: grid; grid-template-columns: minmax(150px, 1.25fr) repeat(6, minmax(0, 1fr)); gap: 6px; }
.r-name { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding-right: 10px; }
.r-name b { font-size: var(--t-body); letter-spacing: -.02em; }
.types { display: flex; gap: 4px; flex-wrap: wrap; }
.types i { font-style: normal; font-size: var(--t-micro); font-weight: 600; padding: 1px 9px; border-radius: 999px; color: #000; letter-spacing: 0; }
.t-fairy { background: #ee90e6; }
.t-steel { background: #5695a3; }
.t-flying { background: #a1bbec; }
.t-normal { background: #a0a29f; }

.r {
  border-radius: 14px; padding: 12px 12px 11px; min-height: 78px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
}
.r b { font-size: 1.625rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.r span { font-size: var(--t-micro); line-height: 1.25; font-weight: 500; letter-spacing: 0; }
.r.win { background: var(--r-win); }
.r.tie { background: var(--r-tie); }
.r.closeloss { background: var(--r-closeloss); }
.r.loss { background: var(--r-loss); }

.js .ratings .r { transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .ratings:not(.is-in) .r { opacity: .2; transform: scale(.96); }
.js .ratings .r-row:nth-child(2) .r { transition-delay: .1s; }
.js .ratings .r-row:nth-child(3) .r { transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  .js .ratings:not(.is-in) .r { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .r-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .r-name { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; align-items: center; flex-wrap: wrap; padding: 4px 0; }
  .ratings-grid { gap: 20px; }
}

.compare { margin-top: clamp(40px, 6vw, 64px); }
.compare-head, .compare-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.compare-head { font-size: var(--t-small); font-weight: 600; color: var(--ink-2); padding-top: 0; }
.compare-row span:first-child { color: var(--ink-2); }
.compare-row span:last-child { font-weight: 500; }
@media (max-width: 600px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: 8px; }
  .compare-row span::before { content: attr(data-label); display: block; font-size: var(--t-micro); font-weight: 600; color: var(--ink-2); margin-bottom: 2px; }
}

/* ---------- Features (bento) ---------- */
.features { padding: clamp(72px, 11vw, 140px) 0; }
.bento {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px;
}
.tile {
  background: var(--panel); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; padding: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) 0;
}
.tile-copy p { margin-top: 10px; color: var(--ink-2); max-width: 30em; }
/* The top of the device, rising out of the tile at a readable size. */
.peek { margin: auto auto 0; padding-top: 32px; width: min(100%, 380px); height: 380px; overflow: hidden; }
.peek .device { width: 100%; }

.tile-rankings, .tile-roster, .tile-detail, .tile-teams { grid-column: span 3; }
.tile-battle {
  grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px; align-items: end;
}
.tile-battle .tile-copy { align-self: center; padding-bottom: clamp(24px, 3vw, 40px); }
.tile-battle .peek { margin-top: 0; }

.tile-scan {
  grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 32px; align-items: center; padding-bottom: clamp(24px, 3vw, 40px);
}
.scan-facts { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.scan-facts li { border-top: 1px solid var(--line); padding-top: 14px; }
.scan-facts b { display: block; font-size: var(--t-body); }
.scan-facts span { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--t-small); }

@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr; gap: 14px; }
  .tile-rankings, .tile-roster, .tile-detail, .tile-teams, .tile-battle, .tile-scan { grid-column: auto; }
  .tile-battle, .tile-scan { grid-template-columns: 1fr; gap: 0; }
  .tile-battle .tile-copy { padding-bottom: 0; }
  .tile-battle .peek { margin-top: 0; }
  .peek { width: min(100%, 320px); height: 330px; }
  .scan-facts { grid-template-columns: 1fr; gap: 14px; margin-top: 24px; }
}

/* ---------- Draft (Pick 3 band) ---------- */
.draft { background: var(--band); color: var(--ink); padding: clamp(72px, 11vw, 140px) 0; overflow: hidden; }
.draft-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.draft h2 span { color: var(--ink-2); }
.draft-copy > p:not(.premium-note) { margin-top: 20px; color: var(--ink-2); font-size: var(--t-lede); line-height: 1.42; max-width: 28em; }
.picks { list-style: none; margin-top: 32px; max-width: 26rem; counter-reset: pick; }
.picks li {
  counter-increment: pick; display: grid; grid-template-columns: 28px 1fr auto; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.picks li::before { content: counter(pick); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.picks b { font-size: 1.1875rem; }
.picks span { color: var(--accent-text); font-size: var(--t-small); font-weight: 500; }
.premium-note { margin-top: 18px; font-size: var(--t-small); color: var(--ink-2); }
.device-draft { width: min(100%, 340px); justify-self: center; }
@media (max-width: 760px) {
  .draft-inner { grid-template-columns: 1fr; }
  .device-draft { width: min(72%, 300px); }
}

/* ---------- More ---------- */
section.more { padding: clamp(72px, 11vw, 140px) 0 0; }
section.more h2 { text-align: center; }
.more-grid {
  margin-top: clamp(32px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px);
}
.more-grid > div { padding: 20px 0 24px; border-top: 1px solid var(--line); }
.more-grid dt { font-weight: 600; }
.more-grid dd { margin-top: 4px; color: var(--ink-2); font-size: var(--t-small); line-height: 1.43; }
@media (max-width: 860px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .more-grid { grid-template-columns: 1fr; } }

/* ---------- Premium ---------- */
.premium { padding: clamp(72px, 11vw, 140px) 0; }
.plans { margin-top: clamp(40px, 6vw, 64px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan { background: var(--panel); border-radius: var(--radius); padding: clamp(28px, 3.4vw, 44px); }
.plan h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.plan h3 span { font-size: var(--t-small); font-weight: 400; color: var(--ink-2); letter-spacing: -.01em; }
.plan-premium { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); }
.plan-premium h3 { color: var(--accent-text); }
.plan ul { list-style: none; margin-top: 20px; }
.plan li { position: relative; padding: 11px 0 11px 30px; border-top: 1px solid var(--hair); }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 15px; width: 16px; height: 16px;
  background: var(--ink-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan-premium li::before { background: var(--accent-text); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Get ---------- */
.get { text-align: center; padding: clamp(80px, 12vw, 150px) var(--gutter); background: var(--band); }
.get-icon { width: 96px; height: 96px; margin: 0 auto 28px; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .6)); }
.get p { margin: 18px auto 30px; color: var(--ink-2); font-size: var(--t-lede); max-width: 28em; line-height: 1.42; }

/* ---------- Footer ---------- */
.foot { background: var(--band); color: var(--ink-2); font-size: var(--t-micro); line-height: 1.5; padding: 0 0 calc(24px + env(safe-area-inset-bottom)); }
.foot .wrap::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 18px; }
.disclaimer { max-width: 70em; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; margin-top: 14px; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 20px; }
.foot ul a { display: inline-block; padding: 10px 0; }

/* ---------- 404 ---------- */
.notfound {
  min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 18px; padding: 64px var(--gutter);
}
.notfound h1 { font-size: var(--t-h2); line-height: 1.06; letter-spacing: -.035em; }
.notfound p { color: var(--ink-2); font-size: var(--t-lede); }
