/* Brand base for every page. Values: docs/design/system.md (T2 brief wins on conflicts).
   play.css (T1) relies on the token names and the "Now" / "Montserrat" families. */

@font-face { font-family: "Now"; font-weight: 900; font-display: swap; src: url("fonts/now-black.b715306cd594.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("fonts/montserrat-regular.23e63dbbd92b.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url("fonts/montserrat-medium.22cdb34d02e2.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("fonts/montserrat-bold.37075fdc76f3.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 800; font-display: swap; src: url("fonts/montserrat-extrabold.572ecd432fde.woff2") format("woff2"); }

/* Palette + edition theme (system.md §1). Default = page without an edition or a colour outside the palette. */
:root {
  --cream: #fffcf8; --black: #181818; --violet: #4200d3; --pink: #feb7db; --lime: #e3f98a;
  --ed-bg: var(--cream); --ed-fg: var(--black); --ed-card: var(--cream); --ed-mark: var(--black); --ed-pill: var(--pink); --ed-backdrop: var(--black);
  --ed-edge: var(--black); /* frame, so a cream tile doesn't melt into the cream page */
}
[data-accent="#4200d3"] { --ed-bg: var(--violet); --ed-fg: var(--pink); --ed-card: var(--pink); --ed-mark: var(--violet); --ed-pill: var(--pink); --ed-backdrop: var(--black); --ed-edge: transparent; }
[data-accent="#feb7db"] { --ed-bg: var(--pink); --ed-fg: var(--black); --ed-card: var(--cream); --ed-mark: var(--black); --ed-pill: var(--pink); --ed-backdrop: var(--violet); --ed-edge: transparent; }
[data-accent="#e3f98a"] { --ed-bg: var(--lime); --ed-fg: var(--violet); --ed-card: var(--cream); --ed-mark: var(--violet); --ed-pill: var(--lime); --ed-backdrop: var(--black); --ed-edge: transparent; }
[data-accent="#181818"] { --ed-bg: var(--black); --ed-fg: var(--pink); --ed-card: var(--cream); --ed-mark: var(--black); --ed-pill: var(--pink); --ed-backdrop: var(--violet); --ed-edge: transparent; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--black);
  font-family: "Montserrat", system-ui, sans-serif; font-size: 1rem; line-height: 1.5;
  font-size-adjust: from-font; overflow-wrap: break-word;
}
body > header, body > main, body > footer {
  max-width: 1120px; margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); /* viewport-fit=cover: landscape notch */
}
a { color: inherit; text-underline-offset: .15em; }
:where(button, input) { font: inherit; }
:focus-visible { outline: 3px solid var(--ed-fg); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: 2.125rem; line-height: 1.05; }
h2 { font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.5rem); line-height: 1.1; }

/* NOW Black: logo and edition names only. from-font again, so NOW doesn't inherit Montserrat's ratio. */
.now { font-family: "Now", system-ui, sans-serif; font-weight: 900; letter-spacing: -0.076em; line-height: .95; text-transform: uppercase; font-size-adjust: from-font; }
.logo { font-size: 1.625rem; line-height: 1; text-decoration: none; }
.eyebrow { margin: 0; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.badge { padding: 4px 8px; border-radius: 999px; background: var(--ed-fg); color: var(--ed-bg); font-size: .625rem; font-weight: 700; letter-spacing: .04em; line-height: 1.2; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 24px;
  border: 0; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ed-fg); color: var(--ed-bg); }
.btn-violet { background: var(--violet); color: var(--cream); }
.btn-lime { background: var(--lime); color: var(--black); }

/* Header and footer */
body > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-block: calc(12px + env(safe-area-inset-top)) 12px; }
body > header .logo { display: inline-flex; align-items: center; min-height: 44px; }
.tagline { margin: -6px 0 0; font-size: .8125rem; line-height: 1.3; }
body > header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
body > header nav form { margin: 0; }
.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: inherit;
  font-size: .875rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.nav-pill { padding: 0 16px; border: 2px solid var(--black); border-radius: 999px; }
body > main { padding-bottom: 24px; }
body > footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-block: 24px calc(16px + env(safe-area-inset-bottom)); }
body > footer .logo { font-size: 1.125rem; }
body > footer ul { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; padding: 0; list-style: none; }
body > footer a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8125rem; font-weight: 500; text-decoration: none; }

/* Forms on content pages (login). :where() keeps specificity 0, so page styles win. */
body > main > h1 { margin: 8px 0 20px; }
:where(main form) { display: grid; gap: 12px; max-width: 28rem; }
:where(main form label) { display: grid; gap: 6px; font-size: .875rem; font-weight: 500; }
:where(main form input) { min-height: 56px; padding: 0 16px; border: 2px solid var(--black); border-radius: 16px; background: var(--cream); color: var(--black); font-size: 1rem; }
:where(main form button) { min-height: 56px; padding: 0 24px; border: 0; border-radius: 999px; background: var(--black); color: var(--cream); font-weight: 700; cursor: pointer; }
:where(main form [role="alert"]) { margin: 0; font-size: .875rem; font-weight: 700; }

/* Home: landing (mockup "Landing page") */
.hero, .outro { display: grid; justify-items: start; gap: 20px; padding: clamp(28px, 6vw, 72px); }
.hero { margin-top: 8px; border-radius: 28px; background: var(--lime); }
.hero h1 { max-width: 14em; font-size: clamp(2.125rem, 6vw, 4.5rem); line-height: 1.02; letter-spacing: -0.035em; color: var(--violet); }
.hero p, .outro p { max-width: 34em; margin: 0; font-size: clamp(1rem, .9rem + .4vw, 1.125rem); }
.editions { margin-block: clamp(28px, 4vw, 48px); }
.editions h2 { margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 8px; min-height: 196px; padding: 16px 14px 14px; border: 2px solid var(--ed-edge); border-radius: 20px;
  background: var(--ed-bg); color: var(--ed-fg); text-decoration: none;
}
.tile:focus-visible { outline-color: var(--black); }
.tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.tile h3 { margin-top: auto; font-size: 1.5625rem; }
.tile-sub { display: none; margin: 0; }
.tile-cta { margin-top: auto; font-size: .75rem; font-weight: 500; }
.outro { border-radius: 24px; background: var(--violet); color: var(--cream); --ed-fg: var(--pink); }
.outro h2 { font-size: clamp(1.75rem, 1rem + 3vw, 3.5rem); color: var(--pink); }

@media (min-width: 48rem) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
  .tile { min-height: 380px; padding: 26px; border-radius: 24px; }
  .tile h3 { font-size: 2.75rem; }
  .tile-sub { display: block; min-height: 3em; font-size: .9375rem; } /* 2 lines, so names line up across tiles */
  .tile-cta { align-self: flex-end; font-size: .875rem; }
}

/* Edition page and "Jak grać": one phone-like column, centred on desktop */
.column { display: grid; gap: 28px; max-width: 40rem; margin: 8px auto 0; }
.ed-hero {
  display: grid; justify-items: start; gap: 12px; padding: 28px 20px 20px; border: 2px solid var(--ed-edge); border-radius: 28px;
  background: var(--ed-bg); color: var(--ed-fg);
}
.ed-hero .eyebrow { font-size: .75rem; letter-spacing: .08em; }
.ed-hero h1 { font-size: 2.625rem; }
.ed-hero p { margin: 0; font-size: .875rem; line-height: 1.4; }
.ed-hero .btn { justify-self: stretch; margin-top: 8px; }
.prose p { margin: 0 0 1em; }
@media (min-width: 48rem) {
  .ed-hero { padding: 40px; }
  .ed-hero .btn { justify-self: start; }
}

.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: grid; gap: 6px; padding: 18px 20px; border: 2px solid var(--black); border-radius: 20px; counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); font-size: 1.75rem; font-weight: 800; line-height: 1; color: var(--violet); }
.section { display: grid; gap: 10px; }
.section p { margin: 0; }
.minigames { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.minigames li { display: grid; gap: 4px; padding: 14px 16px; border: 2px solid var(--black); border-radius: 16px; }
.minigames h3 { font-size: 1rem; letter-spacing: -0.01em; text-transform: uppercase; }
