/* Salibandy-sovellus – landing page */

/* Fonts (self-hosted, assets/fonts/) */
@font-face {
  font-family: "Nineties Headliner";
  src: url("assets/fonts/NinetiesHeadliner-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "City";
  src: url("assets/fonts/City.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("assets/fonts/Urbanist-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("assets/fonts/Urbanist-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("assets/fonts/Urbanist-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue: #0000FF;
  --blue-dark: #00008A;
  --navy: #0B0B3B;
  --navy-deep: #06062A;
  --gold: #FFD34D;
  --bg: #F3F5FB;
  --text: #0B0B3B;
  --text-muted: #2B2E5A;
  --on-blue-muted: #E4E7FF;
  --footer-text: #C9CCF0;
  --display: "Nineties Headliner", "Arial Narrow", sans-serif;
  --script: "City", cursive;
  --body: "Urbanist", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
}

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

img, video { max-width: 100%; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.display {
  font-family: var(--display);
  font-weight: 400; /* Nineties Headliner has one (already heavy) weight */
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}

/* Script tagline above headings (City) */
.eyebrow {
  margin: 0 0 14px;
  font-family: var(--script);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.2;
  padding-left: 0.15em; /* room for the script swash */
}

/* Header */
.site-header { background: var(--blue); color: #fff; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand:hover { color: #fff; }
.brand img { height: 36px; width: auto; }
.brand span {
  font-family: var(--display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.site-nav { display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.site-nav a { color: #fff; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; color: #fff; }

/* Hero */
.hero { background: var(--blue); color: #fff; overflow: hidden; }
.hero .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 48px;
  padding-top: 56px;
}
.hero-text { flex: 1 1 460px; min-width: 0; padding-bottom: 72px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { font-size: clamp(34px, 6vw, 72px); line-height: 0.95; overflow-wrap: break-word; }
.hero-lead {
  margin: 24px 0 0;
  font-size: 20px;
  line-height: 1.5;
  max-width: 520px;
  color: var(--on-blue-muted);
}

/* Official store badges (assets/badges/). Do not recolor or alter them. */
.store-buttons {
  --badge-h: 54px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}
.badge { display: block; border-radius: 10px; }
.badge img { display: block; height: var(--badge-h); width: auto; }
.badge:hover { opacity: 0.85; }
/* The Google Play PNG has 29px transparent padding above and below a
   192px-high badge (250px image). Scale and trim it so both badges match. */
.badge img.badge-google {
  height: calc(var(--badge-h) * 250 / 192);
  margin: calc(var(--badge-h) * -29 / 192) 0;
}

/* Features */
.features { padding-top: 96px; padding-bottom: 96px; }
.features .eyebrow { color: var(--blue); }
.section-title { font-size: clamp(34px, 4.5vw, 52px); overflow-wrap: break-word; }
.features .section-title { max-width: 760px; }
.section-lead { margin: 20px 0 0; max-width: 720px; font-size: 19px; line-height: 1.55; color: var(--text-muted); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
}
.card { background: #fff; border-radius: 20px; padding: 28px; }
.card svg { stroke: var(--blue); }
.card h3 {
  margin: 16px 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  text-transform: uppercase;
}
.card ul { margin: 0; padding-left: 20px; line-height: 1.6; font-size: 16px; color: var(--text-muted); }
.card--dark { background: var(--navy); color: #fff; }
.card--dark svg { stroke: var(--gold); }
.card--dark h3 { color: var(--gold); }
.card--dark ul { color: var(--on-blue-muted); }

/* Screenshots */
/* Store images already include the headline and phone frame */
.screen-row { display: flex; gap: 20px; overflow-x: auto; margin-top: 40px; padding-bottom: 12px; }
.screen-row img {
  display: block;
  flex: 0 0 240px;
  width: 240px;
  height: auto;
  border-radius: 20px;
}

/* Download CTA */
.cta { background: var(--navy); color: #fff; }
.cta .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding-top: 80px;
  padding-bottom: 80px;
}
.cta-icon { width: 140px; height: 140px; border-radius: 32px; display: block; }
.cta-text { flex: 1 1 420px; min-width: 0; }
.cta .store-buttons { margin-top: 28px; }

/* Footer */
.site-footer { background: var(--navy-deep); color: var(--footer-text); }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 14px;
  line-height: 1.6;
}
.site-footer p { margin: 0; max-width: 640px; }
.site-footer a { color: #fff; }

/* Small screens */
@media (max-width: 640px) {
  .hero .container { padding-top: 40px; gap: 32px; }
  .hero-text { padding-bottom: 0; }
  .hero-lead { font-size: 18px; }
  .features { padding-top: 64px; padding-bottom: 64px; }
  .feature-grid { grid-template-columns: 1fr; }
  .cta .container { padding-top: 56px; padding-bottom: 56px; gap: 24px; }
  .cta-icon { width: 96px; height: 96px; border-radius: 22px; }
}

/* Hero video */
.hero--video { overflow: visible; --video-overlap: 120px; }
.hero--video .container { flex-direction: column; align-items: stretch; gap: 48px; }
.hero--video .hero-text { flex: none; padding-bottom: 0; max-width: 900px; }
.hero--video .hero-lead { max-width: 640px; }
.hero-video {
  position: relative;
  margin-bottom: calc(-1 * var(--video-overlap));
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 80px rgba(6, 6, 42, 0.35);
}
.hero-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.video-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 11, 59, 0.75);
  color: #fff;
  cursor: pointer;
}
.video-toggle:hover { background: var(--navy); }
.video-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.video-toggle svg { fill: currentColor; }
.video-toggle .icon-play { display: none; }
.video-toggle.is-paused .icon-play { display: block; }
.video-toggle.is-paused .icon-pause { display: none; }
.features--after-video { padding-top: calc(96px + 120px); }

@media (max-width: 640px) {
  .hero--video { --video-overlap: 48px; }
  .hero--video .container { gap: 32px; }
  .hero-video { border-radius: 14px; }
  .video-toggle { right: 10px; bottom: 10px; width: 36px; height: 36px; }
  .features--after-video { padding-top: calc(64px + 48px); }
}
