/* ========================================================================
   iCANSports Portal — styles.css
   Brand palette: Canadian red #C8102E · near-black #1A1A1A
   Sport-category colours sourced from iCANSports/Theme/AppTheme.swift
   ======================================================================== */

:root {
  /* Brand — primary */
  --brand-red:       #C8102E;
  --brand-red-dark:  #A00D24;
  --brand-red-light: #E8152F;
  --brand-black:     #1A1A1A;
  --brand-black-soft:#2E2E2E;

  /* Kept for sport chips only */
  --sport-green:     #27A35A;
  --sport-blue:      #0A7AE5;
  --sport-orange:    #FF7A00;

  /* Surface (light) */
  --bg:        #FFFFFF;
  --bg-muted:  #F7F7F7;
  --bg-card:   #FFFFFF;
  --border:    #E4E4E4;
  --border-strong: #CACACA;

  /* Text (light) */
  --ink:       #1A1A1A;
  --ink-muted: #4A4A4A;
  --ink-soft:  #7A7A7A;
  --on-brand:  #FFFFFF;

  /* Radii & spacing */
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  /* Type scale — fluid */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --step-2: clamp(1.375rem, 1.15rem + 1vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.5vw, 4.5rem);

  /* Motion */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --dur: 220ms;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26,26,26,.07), 0 1px 2px rgba(26,26,26,.05);
  --shadow-md: 0 10px 24px rgba(26,26,26,.10), 0 2px 6px rgba(26,26,26,.06);
  --shadow-lg: 0 24px 48px rgba(26,26,26,.13), 0 4px 10px rgba(26,26,26,.07);
  --shadow-red: 0 8px 24px rgba(200,16,46,.28);

  --content-max: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0D0D0D;
    --bg-muted:  #161616;
    --bg-card:   #1C1C1C;
    --border:    #2C2C2C;
    --border-strong: #3C3C3C;

    --ink:       #F5F5F5;
    --ink-muted: #BFBFBF;
    --ink-soft:  #888888;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
    --shadow-md: 0 10px 24px rgba(0,0,0,.55);
    --shadow-lg: 0 24px 48px rgba(0,0,0,.65);
    --shadow-red: 0 8px 24px rgba(200,16,46,.4);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }

a {
  color: var(--brand-red);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}
a:hover { color: var(--brand-red-dark); }

img, svg { display: block; max-width: 100%; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-red) 60%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 100;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 12px; color: var(--bg); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.3) blur(16px);
  -webkit-backdrop-filter: saturate(1.3) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.nav-logo {
  display: block;
  height: 36px;
  width: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
}
.lang-btn {
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}
.lang-btn[aria-pressed="true"] {
  color: var(--on-brand);
  background: var(--brand-red);
}
.lang-btn:hover:not([aria-pressed="true"]) { color: var(--ink); }
.lang-sep { color: var(--ink-soft); font-size: 0.75rem; }

.nav-download {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--on-brand);
  background: var(--brand-red);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}
.nav-download:hover {
  background: var(--brand-red-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-red);
  color: var(--on-brand);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 10vw, 120px) clamp(16px, 5vw, 40px) clamp(56px, 9vw, 100px);
  background:
    radial-gradient(1000px 500px at 15% -5%,
      color-mix(in srgb, var(--brand-red) 14%, transparent), transparent 55%),
    radial-gradient(700px 400px at 85% 15%,
      color-mix(in srgb, var(--brand-black) 8%, transparent), transparent 60%),
    var(--bg);
}

.hero-glow {
  position: absolute;
  inset: auto -20% -50% -20%;
  height: 60%;
  background:
    radial-gradient(40% 60% at 25% 40%,
      color-mix(in srgb, var(--brand-red) 10%, transparent), transparent 70%),
    radial-gradient(40% 50% at 75% 40%,
      color-mix(in srgb, var(--brand-black) 6%, transparent), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

/* Hero icon logo — styled as iOS app icon card so white bg looks intentional */
.hero-logo {
  width: clamp(110px, 14vw, 148px);
  height: auto;
  margin: 0 auto 24px;
  border-radius: 28px;
  box-shadow:
    0 2px 0 rgba(200,16,46,.12) inset,
    0 12px 32px rgba(200,16,46,.22),
    0 2px 8px rgba(0,0,0,.10);
  border: 1px solid rgba(200,16,46,.12);
}

/* Hero wordmark image inside h1 */
.hero-wordmark {
  display: block;
  height: clamp(44px, 6vw, 72px);
  width: auto;
  margin: 0 auto;
  mix-blend-mode: multiply;
}

/* Dark mode: wordmark PNGs get a white pill so they stay readable */
@media (prefers-color-scheme: dark) {
  .hero-wordmark,
  .nav-logo,
  .footer-logo {
    background: #fff;
    border-radius: 8px;
    padding: 3px 10px;
  }
  .hero-wordmark { mix-blend-mode: normal; }
}

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-red);
  background: color-mix(in srgb, var(--brand-red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-red) 22%, transparent);
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 12px;
  color: var(--brand-black);
  /* red "iCAN" + dark "Sports" achieved via wordmark logo */
}
@media (prefers-color-scheme: dark) {
  .hero-title { color: var(--ink); }
}

.hero-tagline {
  margin: 0 auto 22px;
  max-width: 22ch;
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-pitch {
  max-width: 58ch;
  margin: 0 auto 36px;
  font-size: var(--step-1);
  color: var(--ink-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
  text-decoration: none;
  line-height: 1.2;
  position: relative;
}

/* App Store button — always black (Apple guideline style) */
.btn-primary {
  background: #000;
  color: #fff;
  padding: 10px 22px;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  color: #fff;
  background: #111;
}
.btn-primary[aria-disabled="true"] { cursor: default; opacity: 0.95; }

.btn-primary .btn-label {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1;
}
.btn-kicker { font-size: 0.7rem; font-weight: 500; opacity: 0.85; letter-spacing: 0.02em; }
.btn-main   { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; margin-top: 3px; }
.apple-glyph { flex-shrink: 0; }

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  margin-left: 4px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand-red);
  border-radius: 999px;
  box-shadow: 0 0 0 2px #000;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border-strong);
  padding: 13px 22px;
}
.btn-ghost:hover {
  background: var(--bg-muted);
  color: var(--ink);
  transform: translateY(-1px);
}

/* ---------- Hero trust pills ---------- */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 0.94rem;
  color: var(--ink-muted);
}
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust .dot {
  width: 8px; height: 8px;
  background: var(--dot, var(--brand-red));
  border-radius: 999px;
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(56px, 8vw, 96px) clamp(16px, 5vw, 40px);
  max-width: var(--content-max);
  margin: 0 auto;
}
.section-muted {
  max-width: none;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-muted > * {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  max-width: 62ch;
  margin: 0 auto clamp(32px, 5vw, 56px);
  text-align: center;
}
.section-head h2 { margin-bottom: 12px; }
.section-sub {
  margin: 0;
  font-size: var(--step-1);
  color: var(--ink-muted);
}

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-card {
  padding: 24px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent, var(--brand-red));
  opacity: 0.95;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent, var(--brand-red)) 35%, var(--border));
}
.feature-card h3 { margin: 16px 0 8px; font-size: 1.18rem; }
.feature-card p  {
  color: var(--ink-muted);
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.55;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  color: var(--accent, var(--brand-red));
  background: color-mix(in srgb, var(--accent, var(--brand-red)) 12%, transparent);
}

/* ---------- Sport chip cloud ---------- */
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.97rem;
  color: var(--chip-ink, #fff);
  background: var(--chip, var(--brand-red));
  border-radius: 999px;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--chip, var(--brand-red)) 28%, transparent);
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
  letter-spacing: -0.01em;
}
.chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--chip, var(--brand-red)) 38%, transparent);
}

/* ---------- How it works ---------- */
.how-grid {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 860px) {
  .how-grid { grid-template-columns: 1fr 1.15fr; }
}
.how-grid > div p {
  color: var(--ink-muted);
  font-size: var(--step-1);
  max-width: 46ch;
}

.how-steps { display: grid; gap: 14px; }
.how-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 6px 18px;
  align-items: start;
  padding: 20px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.how-steps strong {
  grid-column: 2;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
}
.step-num {
  grid-row: 1 / 3;
  grid-column: 1;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--on-brand);
  background: var(--brand-red);
  border-radius: 12px;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(200,16,46,.30);
}
.step-desc {
  grid-column: 2;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* ---------- Availability banner ---------- */
.availability { padding-top: 0; }
.avail-card {
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 48px);
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--brand-red) 8%, var(--bg-card)),
    color-mix(in srgb, var(--brand-black) 5%, var(--bg-card)));
  border: 1px solid color-mix(in srgb, var(--brand-red) 18%, var(--border));
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.avail-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--brand-red);
}
.avail-kicker {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-red);
}
.avail-card h2 { max-width: 26ch; margin: 0 auto 12px; }
.avail-card p  {
  max-width: 58ch;
  margin: 0 auto;
  color: var(--ink-muted);
  font-size: var(--step-1);
}

/* ---------- Footer ---------- */
.footer {
  padding: clamp(40px, 6vw, 64px) clamp(16px, 5vw, 40px);
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
}
.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  gap: 16px;
  text-align: center;
}
.footer-logo {
  height: 32px;
  width: auto;
  margin: 0 auto;
}
.footer-tag {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-weight: 500;
  font-size: 0.96rem;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
}
.footer-dot { color: var(--ink-soft); }
.footer-privacy {
  max-width: 62ch;
  margin: 4px auto 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Legal / support pages ---------- */
.legal-page {
  padding: clamp(48px, 8vw, 88px) clamp(16px, 5vw, 40px);
  background: var(--bg);
}

.legal-content {
  max-width: 860px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: 24px;
}

.legal-content h2 {
  margin-top: 36px;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
}

.legal-content p {
  color: var(--ink-muted);
}

.legal-list {
  margin: 0 0 24px 1.25rem;
  padding: 0;
  list-style: disc;
  color: var(--ink-muted);
}

.legal-list li + li {
  margin-top: 8px;
}

/* ---------- Disclaimer ---------- */
.disclaimer {
  padding: clamp(28px, 4vw, 48px) clamp(16px, 5vw, 40px);
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
}
.disclaimer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}
.disclaimer-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}
.disclaimer-body {
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 72ch;
  margin: 0;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 540px) {
  .nav { padding: 8px 16px; gap: 10px; }
  .nav-logo { height: 30px; }
  .nav-download { padding: 8px 14px; font-size: 0.9rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; }
  .coming-soon-badge { margin-left: 0; margin-top: 4px; }
  .btn-primary { padding: 12px 20px; }
  .hero-trust { gap: 10px 16px; }
}
