/* ==========================================================================
   Owyhee Outlaws Soccer Club — stylesheet
   Direction: a county-fair poster for youth soccer. Slab headlines, cream
   paper with grain, the logo's teal + orange, one restrained motion moment.
   Layout stays conventional — parents need "simple, clear directions."
   Mobile-first. Colors are variables; sampled from the logo.
   ========================================================================== */

:root {
  /* Brand — sampled from the Owyhee Outlaws logo (2026-09-19) */
  --teal:        #0a7fa8;   /* "OWHYEE" lettering — rules, borders, structure (decorative) */
  --teal-text:   #08728f;   /* same hue, darker: links + small labels. 4.9:1 on cream (WCAG AA) */
  --teal-deep:   #075e7d;
  --orange:      #e8563f;   /* "OUTLAWS" — hover/glow only */
  --orange-deep: #c9432e;   /* the ONE loud color: Register button fill. 4.9:1 with white text (AA) */
  --brown:       #3d2410;   /* horse & rider — headlines, footer */
  --ink:         #2b1d12;
  --muted:       #6b5f55;
  --cream:       #f6f1e7;   /* paper */
  --cream-deep:  #ede5d5;
  --paper-line:  #d9cfbd;
  --white:       #fffdf9;

  --font-display: "Alfa Slab One", "Rockwell", "Arial Black", serif;
  --font-body:    "Source Sans 3", "Segoe UI", Roboto, sans-serif;

  --radius: 6px;
  --max: 1040px;
  --gutter: 16px;
  --shadow: 0 1px 0 rgba(61,36,16,.06), 0 6px 18px -8px rgba(61,36,16,.25);
}

/* --- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }   /* the hidden attribute always wins, whatever display a class sets */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--cream);
  /* Paper grain: an SVG noise layer, very faint. Felt, not seen. */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.14 0 0 0 0 0.06 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: var(--teal-text); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--brown);
  line-height: 1.1;
  margin: 0 0 .45em;
  letter-spacing: .005em;
}
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.45rem, 4vw, 1.9rem); margin-top: 1.6em; }
h3 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; color: var(--brown); }
/* An <h2> for the document outline that should look like an h3. Heading
   order is an accessibility check; fixing it should not cost a design
   change, and docs/design-brief.md is binding. Matches h3 exactly,
   including cancelling the margin-top h2 adds. */
h2.sub { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; margin-top: 0; }

/* Off-screen until focused: the first Tab on any page offers to jump the
   nav. Without it a keyboard or switch user tabs the whole menu on every
   page before reaching the content. */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cream); color: var(--brown); font-weight: 700;
  padding: 10px 16px; border: 2px solid var(--teal-text); border-radius: 4px; }
.skip-link:focus { left: 8px; top: 8px; }

p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.placeholder { color: var(--muted); font-style: italic; }
.center { text-align: center; }
.left { text-align: left; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 680px; }
.narrow { max-width: 560px; }

/* --- Section label: the poster "ribbon" ----------------------------------- */
.section { padding: 36px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }

.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-text);
  margin-bottom: 6px;
}

/* --- Prototype banner ----------------------------------------------------- */
.proto-banner {
  background: #fff3cd; color: #664d03;
  font-size: .82rem; text-align: center;
  padding: 6px var(--gutter);
  border-bottom: 1px solid #ffe69c;
}

/* --- Header --------------------------------------------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--teal);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 0 rgba(61,36,16,.04);
}
.site-header .container {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  min-height: 64px; gap: 8px 12px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 0; min-width: 0;            /* shrink and wrap the name before pushing the buttons down */
  color: var(--brown); text-decoration: none;
  font-family: var(--font-display); font-size: .95rem; line-height: 1.05;
}
@media (min-width: 480px) { .brand { font-size: 1.05rem; } }
.brand img { width: 56px; height: 56px; }

.header-tools { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.lang-toggle, .nav-toggle {
  font: inherit; font-weight: 700; font-size: .9rem;
  background: none; color: var(--teal-text);
  border: 2px solid var(--teal); border-radius: var(--radius);
  padding: 6px 10px; cursor: pointer; line-height: 1;
}
.lang-toggle { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.lang-toggle:hover, .nav-toggle:hover { background: var(--teal); color: #fff; }

.site-nav { display: none; flex-basis: 100%; order: 3; }
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 4px 0 12px; }
.site-nav a {
  display: block; padding: 11px 4px;
  color: var(--ink); text-decoration: none; font-weight: 600;
  border-top: 1px solid var(--paper-line); white-space: nowrap;
}
.site-nav a.active { color: var(--teal-text); }
.site-nav a.cta {
  background: var(--orange-deep); color: #fff;
  border: 0; border-radius: var(--radius);
  padding: 12px 16px; margin-top: 10px; text-align: center;
  font-family: var(--font-display); font-weight: 400; letter-spacing: .02em;
}
.site-nav a.cta:hover { background: var(--orange); }

/* The horizontal nav needs room for 8 items + the brand + the language toggle.
   Below this the brand gets squeezed and wraps to several lines, so stay on the
   Menu button until there's genuinely space. */
@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  /* Two deliberate rows: brand + language toggle on top, nav beneath it.
     Eight items plus the brand won't fit on one line at any sane width, and a
     nav that wraps by accident lands in odd places. This wraps on purpose. */
  .site-nav { display: block; flex-basis: 100%; order: 3; border-top: 1px solid var(--paper-line); }
  .brand { flex: 0 0 auto; }                 /* never shrink or wrap the name */
  .brand > span { white-space: nowrap; }
  .site-nav ul { display: flex; align-items: center; justify-content: flex-start; gap: 2px; padding: 0; margin-left: -10px; }
  .site-nav a { border: 0; padding: 8px 10px; font-size: .95rem; }
  .site-nav a.active { box-shadow: inset 0 -3px 0 var(--teal); }
  .site-nav a.cta { margin: 0 0 0 10px; padding: 10px 18px; }
}

/* --- Hero (home) ------------------------------------------------------------ */
.hero {
  text-align: center;
  padding: 36px 0 44px;
  border-bottom: 3px solid var(--teal);
  position: relative;
}
/* a faint diagonal rule pattern behind the hero — poster stock */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: repeating-linear-gradient(-45deg, rgba(10,127,168,.05) 0 2px, transparent 2px 14px);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }
.hero-logo { width: 210px; height: 210px; margin: 0 auto 6px; filter: drop-shadow(0 6px 10px rgba(61,36,16,.18)); }
.hero h1 { margin-bottom: .25em; }
.hero .lead { margin: 0 auto 1.4em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (min-width: 640px) { .hero-logo { width: 280px; height: 280px; } .hero { padding-top: 44px; } }

/* The one motion moment: hero elements rise in, staggered. */
@media (prefers-reduced-motion: no-preference) {
  .hero .rise { opacity: 0; transform: translateY(14px); animation: rise .6s cubic-bezier(.2,.7,.2,1) forwards; }
  .hero .rise:nth-child(1) { animation-delay: .05s; }
  .hero .rise:nth-child(2) { animation-delay: .18s; }
  .hero .rise:nth-child(3) { animation-delay: .3s; }
  .hero .rise:nth-child(4) { animation-delay: .42s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* --- Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 400; font-size: 1rem;
  letter-spacing: .02em;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange-deep); color: #fff; box-shadow: 0 3px 0 #a3351f; }
.btn-primary:hover { background: var(--orange); color: #fff; }
.btn-outline { background: transparent; color: var(--teal-text); border-color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; }
.btn-outline.dark { color: var(--teal-text); border-color: var(--teal); }

/* --- Cards / grid ---------------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

.key-dates { list-style: none; padding: 0; margin: 0; }
.key-dates li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--paper-line); }
.key-dates li:last-child { border-bottom: 0; }
.key-dates li span:last-child { color: var(--muted); text-align: right; }
.key-dates .big { font-family: var(--font-display); font-size: 1.3rem; color: var(--brown); }

/* --- Matchup cards: the "pro league" feeling ---------------------------------------- */
.matchups { display: grid; gap: 12px; }
@media (min-width: 720px) { .matchups { grid-template-columns: 1fr 1fr; } }

.matchup {
  background: var(--white);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 10px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "home vs away" "meta meta meta";
  align-items: center; gap: 6px 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.matchup:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(61,36,16,.06), 0 12px 24px -10px rgba(61,36,16,.35); }
.matchup .team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.matchup .team.home { grid-area: home; }
.matchup .team.away { grid-area: away; }
.matchup .badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--cream); border: 2px solid var(--paper-line);
  display: grid; place-items: center; overflow: hidden;
  font-size: .65rem; color: var(--muted);
}
.matchup .badge img { width: 100%; height: 100%; object-fit: cover; }
.matchup .name { font-family: var(--font-display); font-size: 1rem; line-height: 1.1; color: var(--brown); }
.matchup .vs {
  grid-area: vs;
  font-family: var(--font-display); font-size: .85rem; color: #fff;
  background: var(--brown); border-radius: 50%;
  width: 34px; height: 34px; display: grid; place-items: center;
  letter-spacing: .04em;
}
.matchup .meta {
  grid-area: meta;
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  font-size: .88rem; color: var(--muted);
  border-top: 1px dashed var(--paper-line); padding-top: 8px; margin-top: 4px;
}
.matchup .meta .time { font-weight: 700; color: var(--ink); }

/* --- Tables ---------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--white); }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--paper-line); white-space: nowrap; }
th { font-family: var(--font-display); font-weight: 400; font-size: .85rem; color: var(--brown); background: var(--cream-deep); letter-spacing: .02em; }

/* --- Team cards ---------------------------------------------------------------- */
.team-badge {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--cream); border: 2px dashed var(--paper-line);
  display: grid; place-items: center; font-size: .7rem; color: var(--muted);
  margin-bottom: 10px;
}

/* --- Forms ----------------------------------------------------------------------- */
form { display: grid; gap: 14px; }
fieldset { border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; background: var(--white); }
legend { font-family: var(--font-display); font-size: .95rem; color: var(--brown); padding: 0 6px; }
label { display: grid; gap: 4px; font-weight: 600; }
input, select, textarea {
  font: inherit; padding: 11px 12px;
  border: 1.5px solid var(--paper-line); border-radius: var(--radius);
  width: 100%; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(10,127,168,.3); border-color: var(--teal); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
.note { font-size: .9rem; color: var(--muted); }

/* --- Sponsors strip: "brought to you by" ---------------------------------------------- */
.sponsor-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sponsor-strip .slot {
  width: 140px; height: 60px;
  border: 2px dashed var(--paper-line); border-radius: var(--radius);
  display: grid; place-items: center; font-size: .8rem; color: var(--muted); background: var(--white);
}

/* --- Help-us row ------------------------------------------------------------------- */
.help-row { display: grid; gap: 12px; }
@media (min-width: 560px) { .help-row { grid-template-columns: 1fr 1fr; } }
.help-row .btn { display: block; text-align: center; }

/* --- Stamp (done page) ------------------------------------------------------------- */
.stamp {
  width: 84px; height: 84px; margin: 0 auto 12px;
  border: 4px solid var(--teal); border-radius: 50%;
  color: var(--teal-text); font-family: var(--font-display); font-size: 2.4rem;
  display: grid; place-items: center;
  transform: rotate(-8deg);
}

/* --- Footer ------------------------------------------------------------------------- */
.site-footer {
  background: var(--brown); color: #e9dccb;
  padding: 28px 0; margin-top: 44px; font-size: .92rem;
  border-top: 4px solid var(--teal);
}
.site-footer a { color: #fff; }
.site-footer .container { display: grid; gap: 8px; }
.site-footer .footer-brand { font-family: var(--font-display); font-size: 1rem; }
.site-footer .credit {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .9rem; opacity: .9;
}
.site-footer .credit img { border-radius: 50%; }

/* --- Registration form: steps, players, errors --------------------------------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.steps {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  counter-reset: step;
}
.step {
  counter-increment: step;
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding-top: 8px; border-top: 3px solid var(--paper-line);
}
.step::before { content: counter(step) ". "; }
.step.is-current { color: var(--teal-text); border-top-color: var(--teal); }
.step.is-done { color: var(--brown); border-top-color: var(--brown); }

.panel { display: grid; gap: 14px; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin-top: 6px; }
.panel-actions .btn-primary { margin-left: auto; }

fieldset.player { position: relative; }
fieldset.player legend .player-n { font-family: var(--font-display); }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .85rem; color: var(--teal-text); text-decoration: underline;
  position: absolute; top: 14px; right: 14px;
}
.division-line {
  margin: 0; padding: 8px 12px; border-radius: var(--radius);
  background: var(--cream); border-left: 4px solid var(--teal); font-size: .95rem;
}

.error { display: block; font-weight: 400; font-size: .85rem; color: #a3351f; }
[aria-invalid="true"] { border-color: #c9432e !important; }

details.waiver { border: 1px solid var(--paper-line); border-radius: var(--radius); background: var(--white); }
details.waiver summary { padding: 12px 14px; cursor: pointer; font-weight: 700; color: var(--teal-text); }
details.waiver .waiver-text { padding: 0 14px 14px; max-height: 40vh; overflow-y: auto; font-size: .92rem; }

#summary h4 { margin: 12px 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 1rem; color: var(--brown); }
#summary h4:first-child { margin-top: 0; }
#summary dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: .92rem; }
#summary dt { color: var(--muted); }
#summary dd { margin: 0; }

/* --- Coaches page --------------------------------------------------------------- */
.draft-note { background: var(--cream-deep); border-left: 4px solid var(--teal); margin: 18px 0 8px; }

.division-picker { max-width: 420px; margin-bottom: 24px; }

.plan-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: flex-start; justify-content: space-between;
  border-top: 3px solid var(--teal); padding-top: 14px; margin-top: 8px;
}
.plan-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; margin: 0 0 2px; }
.plan-head .note { margin: 0; }

#plan h4 { margin: 1.6em 0 .5em; font-size: 1.05rem; }

.plan-blocks { list-style: none; padding: 0; margin: 0; counter-reset: block; }
.plan-blocks li {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 2px 14px;
  padding: 12px 0; border-bottom: 1px dashed var(--paper-line);
}
.plan-blocks li:last-child { border-bottom: 0; }
.plan-blocks .block-mins {
  grid-row: span 2;
  font-family: var(--font-display); font-size: 1rem; color: var(--teal-text);
  padding-top: 1px;
}
.plan-blocks strong { color: var(--brown); }
.plan-blocks p { margin: 0; color: var(--muted); font-size: .95rem; }

@media (max-width: 520px) {
  .plan-blocks li { grid-template-columns: 1fr; }
  .plan-blocks .block-mins { grid-row: auto; font-size: .85rem; }
}

/* --- Print: a coach prints the plan and takes it to the field ------------------- */
@media print {
  .no-print, .proto-banner, .site-header, .site-footer,
  .draft-note, .division-picker, #basics,
  [data-i18n="coach.pick_h"], [data-i18n="coach.basics_h"] { display: none !important; }

  body { background: #fff; font-size: 11pt; }
  .section { padding: 0; }
  .container, .container.narrow { max-width: none; padding: 0; }
  h1 { font-size: 18pt; }
  .plan-head { border-top: 2px solid #000; }
  .plan-blocks li { break-inside: avoid; }
  a[href]::after { content: ""; }   /* don't print URLs after every link */
}

/* --- The coaches' ball in the footer -------------------------------------------
   Quiet by default, comes alive on hover. Not a secret — just not shouting at
   parents who don't need it. Nice to point out to a new coach. */
.site-footer .coach-ball {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: #cfc0a8; opacity: .55;
  transition: opacity .2s ease, transform .35s ease, color .2s ease, background .2s ease;
}
.site-footer .coach-ball:hover,
.site-footer .coach-ball:focus-visible {
  opacity: 1; color: #fff; background: rgba(255,255,255,.1);
  transform: rotate(140deg);
}
@media (prefers-reduced-motion: reduce) {
  .site-footer .coach-ball { transition: opacity .2s ease, color .2s ease; }
  .site-footer .coach-ball:hover, .site-footer .coach-ball:focus-visible { transform: none; }
}

/* --- Play-Practice-Play phase labels -------------------------------------------- */
.plan-blocks .block-mins { display: flex; flex-direction: column; gap: 1px; }
.plan-blocks .phase-label {
  font-family: var(--font-body); font-weight: 700;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
}
.plan-blocks .mins { font-family: var(--font-display); font-size: .95rem; color: var(--muted); }
.plan-blocks .phase-play     .phase-label { color: var(--orange-deep); }
.plan-blocks .phase-practice .phase-label { color: var(--teal-text); }
.plan-blocks .phase-finish   .phase-label { color: var(--muted); }
/* the two Play blocks bookend the session — tint them so the shape is visible */
.plan-blocks li.phase-play { background: linear-gradient(90deg, rgba(232,86,63,.05), transparent 55%); }

.sources { margin-top: 32px; border-top: 1px solid var(--paper-line); padding-top: 8px; }
.sources ul { padding-left: 1.1em; }
.sources li { margin-bottom: 8px; }
.sources .note { display: block; }

/* --- 404 ------------------------------------------------------------------------- */
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }

/* --- Team cards with practice info ----------------------------------------------- */
.team-card .team-badge img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.team-badge.badge-initials, .matchup .badge-initials {
  font-family: var(--font-display); color: var(--brown); font-size: 1.1rem;
}
.matchup .badge-initials { font-size: .95rem; }
.team-card .practice {
  margin-top: 12px; padding-top: 10px;
  border-top: 1px dashed var(--paper-line);
}
.team-card .practice p { margin: 2px 0 0; font-size: .92rem; }
.team-card .practice .kicker { margin-bottom: 2px; }
