/* sYmple — symplebasketball.com
   One stylesheet, no dependencies, no web fonts, no trackers. */

:root {
  color-scheme: light dark;

  /* The app's accent is SwiftUI's `Color.orange` — system orange — so
     the site uses the same value and the two match on the same screen.
     `--orange-ink` is a darker shade of it, used only where orange has
     to carry small text on white and system orange would be too faint
     to read. */
  --orange: #ff9500;
  --orange-ink: #c96a00;
  --bg: #ffffff;
  --bg-soft: #f6f5f3;
  --card: #ffffff;
  --ink: #16181d;
  --ink-soft: #5b616e;
  --line: #e3e1dd;
  --shadow: 0 1px 2px rgba(22, 24, 29, .05), 0 12px 32px rgba(22, 24, 29, .07);
  --radius: 16px;
  --page: 1080px;

}

@media (prefers-color-scheme: dark) {
  :root {
    --orange: #ff9f0a;          /* system orange, dark appearance */
    --orange-ink: #ff9f0a;
    --bg: #000000;
    --bg-soft: #0b0b0d;
    --card: #121216;
    --ink: #f2f1ef;
    --ink-soft: #a2a7b3;
    --line: #2a2d35;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--orange-ink); }
a:hover { text-decoration: none; }

img { max-width: 100%; height: auto; }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); }

.site-nav a.lang {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .82rem;
  letter-spacing: .04em;
}
.site-nav a.lang:hover { border-color: var(--ink-soft); }

@media (max-width: 620px) {
  .site-nav a.hide-small { display: none; }
}

/* ---------- hero ---------- */

.hero { padding: 72px 0 24px; }

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.022em;
  margin: 0 0 18px;
  font-weight: 700;
}

.lede {
  font-size: 1.14rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 34em;
}

.hero-art {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.hero-art img { display: block; border-radius: 10px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--orange) 85%, #000); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--ink-soft); }

.note { font-size: .92rem; color: var(--ink-soft); margin: 14px 0 0; }

/* ---------- sections ---------- */

section { padding: 56px 0; scroll-margin-top: 72px; }   /* clears the sticky header on anchor jumps */
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0 0 10px;
}

.section-lede { color: var(--ink-soft); margin: 0 0 32px; max-width: 46em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
section.soft .card { box-shadow: var(--shadow); }

.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--orange) 14%, transparent);
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 14px;
}
.mark svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* numbered steps */

.steps { counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps .card { position: relative; }
.steps .card h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 25px; height: 25px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: .85rem;
  vertical-align: 2px;
}

/* two-column split */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.split ul { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.split li { margin-bottom: 9px; }
.split li strong { color: var(--ink); }

@media (max-width: 860px) {
  .hero { padding-top: 44px; }
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 30px; }
  .hero-art { order: -1; }
}

/* ---------- prose pages ---------- */

.prose { max-width: 760px; padding: 48px 0 72px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 6px; }
.prose h2 { font-size: 1.22rem; margin: 34px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose .updated { color: var(--ink-soft); margin-top: 0; font-size: .95rem; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose .back { display: inline-block; margin-bottom: 26px; font-size: .95rem; text-decoration: none; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line);
  padding: 34px 0 48px;
  color: var(--ink-soft);
  font-size: .93rem;
}
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }

/* ============================================================
   LANDING PAGE — full-bleed bands, revealed on scroll
   The legal and support pages keep the simpler layout above.
   ============================================================ */

.site-nav .section-links { display: flex; gap: 22px; }

.site-nav .section-links a {
  position: relative;
  padding-bottom: 2px;
}

/* Marks the section you're currently looking at. */
.site-nav .section-links a.current {
  color: var(--ink);
}
.site-nav .section-links a.current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

@media (max-width: 900px) {
  .site-nav .section-links { display: none; }
}

/* ---------- bands ---------- */

.band {
  padding: clamp(72px, 11vw, 140px) 0;
  border-bottom: 1px solid var(--line);
}

.band.tint { background: var(--bg-soft); }

/* Deliberately dark in both themes: the court artwork reads best on it,
   and the alternation is what gives the page its rhythm. */
.band.dark {
  background: #0b0c0f;
  color: #f4f3f1;
  border-bottom-color: #1d1f25;
}
.band.dark .band-lede,
.band.dark .point p { color: #a8adb8; }
.band.dark .eyebrow { color: var(--orange); }

.band-inner {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

.band h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 18px;
  max-width: 18ch;
}

.band.center h2,
.band.center .band-lede { margin-left: auto; margin-right: auto; text-align: center; }
.band.center { text-align: center; }

.band-lede {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 42px;
}

/* ---------- the three supporting points under a band ---------- */

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 30px;
  margin-top: 54px;
  text-align: left;
}

.point h3 { margin: 0 0 6px; font-size: 1.02rem; }
.point p { margin: 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.55; }

/* ---------- video ---------- */

.video-frame {
  position: relative;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #16181d;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-frame video,
.video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Shown until a real file is dropped in. */

.loop-frame { aspect-ratio: 4 / 3; max-width: 520px; }

/* ---------- side-by-side copy and media ---------- */

.band-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.band-split.flip > *:first-child { order: 2; }

@media (max-width: 860px) {
  .band-split, .band-split.flip > *:first-child { grid-template-columns: 1fr; order: 0; }
  .band h2 { max-width: none; }
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2, .6, .2, 1), transform .7s cubic-bezier(.2, .6, .2, 1);
}
.reveal.shown { opacity: 1; transform: none; }

/* Staggers the points so they arrive one after another. */
.reveal[data-delay="1"] { transition-delay: .09s; }
.reveal[data-delay="2"] { transition-delay: .18s; }

/* Anyone who asks for less motion gets none of it, and nothing is hidden
   if the script never runs. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* ============================================================
   ENTRY SCREEN + THE BALL THAT DRAWS ITSELF
   ============================================================ */

/* ---------- entry screen ---------- */

#splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--bg);
  cursor: pointer;
  transition: opacity .55s ease, transform .75s cubic-bezier(.65, 0, .35, 1);
}

#splash.gone {
  opacity: 0;
  transform: translateY(-14%);
  pointer-events: none;
}

.splash-inner { display: grid; justify-items: center; gap: 30px; padding: 24px; }

.splash-inner .mark { width: min(62vw, 420px); height: auto; }

.splash-ball {
  width: min(26vw, 130px);
  height: auto;
  color: var(--orange);
}
.splash-ball path, .splash-ball circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.splash-hint {
  margin: 0;
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: hint-pulse 2.4s ease-in-out infinite;
}

@keyframes hint-pulse { 0%, 100% { opacity: .45 } 50% { opacity: 1 } }

/* The ball bounces once, spinning, before the screen lifts away. */
#splash.leaving .splash-ball { animation: ball-bounce .85s cubic-bezier(.33, 0, .2, 1) forwards; }
#splash.leaving .splash-hint { opacity: 0; }

@keyframes ball-bounce {
  0%   { transform: translateY(0) rotate(0deg); }
  38%  { transform: translateY(26vh) rotate(150deg); }
  58%  { transform: translateY(2vh) rotate(230deg); }
  78%  { transform: translateY(16vh) rotate(300deg); }
  100% { transform: translateY(-120vh) rotate(420deg); }
}

@media (prefers-reduced-motion: reduce) {
  #splash.leaving .splash-ball { animation: none; }
  .splash-hint { animation: none; opacity: .7; }
  #splash { transition: opacity .3s ease; }
  #splash.gone { transform: none; }
}

/* Nothing scrolls behind the entry screen. */
body.entering { overflow: hidden; }

/* ============================================================
   TRY IT — a court you can actually drag players around on
   ============================================================ */

/* ---------- the logo, as the way in ---------- */

.hero-shot {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  color: var(--orange-ink);
  max-width: 100%;
}
.hero-shot img {
  /* The artwork is transparent, so it sits on the page in either theme
     without a white box behind it. */
  width: min(520px, 86vw);
  height: auto;
  transition: transform .25s ease;
}
.hero-shot:hover img { transform: translateY(-4px) scale(1.01); }

.hero-shot span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.hero-shot svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: cue-nudge 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-shot svg { animation: none; }
  .hero-shot:hover img { transform: none; }
}

/* ---------- the app's drawing tools ---------- */

.toolset {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 720px) {
  .toolset { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.toolset li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
}
/* On a light band the same tile needs the opposite treatment. */
.band:not(.dark) .toolset li {
  background: var(--bg-soft);
  border-color: var(--line);
}

.toolset-ico { color: var(--orange); width: 26px; height: 26px; }
.toolset-ico svg { width: 100%; height: 100%; display: block; }
.toolset strong { font-size: 1rem; }
.toolset li > span:not(.toolset-ico) {
  font-size: .86rem;
  line-height: 1.45;
  color: #a8adb8;
}
.band:not(.dark) .toolset li > span:not(.toolset-ico) { color: var(--ink-soft); }

/* ---------- a play, shown ---------- */

.showcase {
  margin: 38px auto 0;
  max-width: 900px;
}
.showcase video,
.showcase img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.showcase figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: .92rem;
  color: var(--ink-soft);
}

/* Trims the top band off an exported sheet, where the play's name is
   part of the picture. Used on the French page, whose sheet was
   exported from the English app. Measured: the name sits in rows 44-78
   of 1309 and the frame cards start at row 103, so hiding the first 90
   rows takes the name and nothing else. */
.shot-crop {
  aspect-ratio: 1600 / 1219;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
}
.shot-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  border: 0;
  border-radius: 0;
}

/* Two shown side by side on a wide screen, stacked on a phone. Explicit
   columns rather than auto-fit, which leaves an empty third track and a
   gap of trailing space beside the second figure. */
.showcase-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: start;
  margin-top: 38px;
}
@media (min-width: 760px) {
  .showcase-pair { grid-template-columns: 1fr 1fr; }
}
.showcase-pair .showcase { margin-top: 0; }

/* ---------- entry screen: the real logo animation ---------- */

.splash-video {
  width: min(70vw, 460px);
  height: auto;
  border-radius: 14px;
}

/* ---------- entry screen styled as the app's sign-in ---------- */

.signin {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(86vw, 380px);
}

.signin .app-art { width: min(52vw, 230px); height: auto; }

.signin .wordmark { width: min(46vw, 210px); height: auto; margin-top: 2px; }

.signin .sub {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: var(--ink-soft);
}

/* Deliberately not <input>: a real field invites password managers to
   offer to fill it, and this is a picture of a sign-in, not one. */
.signin .field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1.02rem;
  color: var(--ink-soft);
  text-align: left;
  background: var(--bg);
}

.signin .field.dots {
  letter-spacing: .3em;
  font-size: 1.15rem;
  color: var(--ink);
}

.signin .go {
  width: 100%;
  margin-top: 6px;
  border: none;
  border-radius: 999px;
  padding: 15px 20px;
  background: var(--orange);
  color: #fff;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.signin .go:hover { background: color-mix(in srgb, var(--orange) 86%, #000); }
.signin .go:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  .signin .go { transition: none; }
}

/* ---------- the opening: white, orange, and words ---------- */

/* The first screen fills the window and sits in the middle of it. It
   used to carry a smaller padding-top than the band default, which left
   64px of room above the words and 114px below — reading as crowded
   against the header. `svh` rather than `vh` so a phone's address bar
   sliding away doesn't shift everything. The header is sticky, so its
   height comes off the top. */
.opening {
  --head: 66px;
  min-height: calc(100vh - var(--head));
  min-height: calc(100svh - var(--head));
  display: grid;
  align-content: center;
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

.opening .band-lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); }

.opening .lead-in {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

@keyframes cue-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

