/* Coaches Corner — shared design system.
   Matched to rockvalewrestlingclub.com: Archivo Black headings, Inter body,
   #2563eb blue on white. Light is the default; dark is a toggle for bright gyms.
   Every page uses these tokens instead of raw hex — change a value here and it
   changes on every page. */

:root{
  /* surfaces */
  --mat:#ffffff;
  --mat-2:#f5f7fa;
  --mat-3:#eef1f6;
  --line:#e5e7eb;
  /* brand */
  --royal:#2563eb;
  --royal-bright:#3b82f6;
  --royal-light:#1d4ed8;
  --slate:#6b7280;
  --green:#15803d;
  /* text */
  --ink:#1a1a1a;
  --ink-2:#4a4a4a;
  --ink-dim:#6b7280;
  --on-accent:#ffffff;
  /* rgb channels for tinted overlays */
  --mat-2-rgb:245,247,250;
  --royal-rgb:37,99,235;
  --royal-bright-rgb:59,130,246;
  --royal-light-rgb:29,78,216;
  --slate-rgb:107,114,128;
  --ink-rgb:26,26,26;
  --tint-rgb:26,26,26;
  --shadow:0 10px 30px rgba(26,26,26,.10);
  --shadow-lg:0 18px 50px rgba(26,26,26,.16);
  /* type */
  --display:"Archivo Black",Impact,system-ui,sans-serif;
  --body:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  color-scheme:light;
}

:root[data-theme="dark"]{
  --mat:#0f1523;
  --mat-2:#161d2e;
  --mat-3:#1e2739;
  --line:#2c3648;
  --royal:#2563eb;
  --royal-bright:#3b82f6;
  --royal-light:#93b4fd;
  --slate:#7c8aa0;
  --green:#4ade80;
  --ink:#f8fafc;
  --ink-2:#dbe2ec;
  --ink-dim:#9aa7b8;
  --on-accent:#ffffff;
  --mat-2-rgb:22,29,46;
  --royal-rgb:37,99,235;
  --royal-bright-rgb:59,130,246;
  --royal-light-rgb:147,180,253;
  --slate-rgb:124,138,160;
  --ink-rgb:248,250,252;
  --tint-rgb:255,255,255;
  --shadow:0 10px 30px rgba(0,0,0,.45);
  --shadow-lg:0 18px 50px rgba(0,0,0,.55);
  color-scheme:dark;
}

/* ---------- shared top bar ---------- */

.rw-bar{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 16px;border-bottom:1px solid var(--line);
  background:var(--mat);
  font-family:var(--body);
}
.rw-home{
  display:inline-flex;align-items:center;gap:10px;text-decoration:none;color:inherit;
  min-height:44px;
}
.rw-crest{width:34px;height:34px;flex:0 0 auto;border-radius:50%;display:block}
.rw-home-copy{display:flex;flex-direction:column;line-height:1.12}
.rw-home-copy b{
  font-family:var(--display);font-size:13px;letter-spacing:.01em;
  text-transform:uppercase;font-weight:400;
}
.rw-home-copy span{
  font-size:9.5px;letter-spacing:.13em;color:var(--ink-dim);
  text-transform:uppercase;font-weight:600;
}
.rw-bar-right{display:flex;align-items:center;gap:8px}
.rw-club{
  display:none;align-items:center;min-height:40px;padding:0 14px;border-radius:999px;
  background:var(--royal);color:var(--on-accent);text-decoration:none;
  font:600 13px/1 var(--body);white-space:nowrap;
}
.rw-club:hover{background:var(--royal-light)}
@media (min-width:640px){ .rw-club{display:inline-flex} }
.rw-theme{
  min-width:44px;min-height:44px;display:grid;place-items:center;
  background:none;border:1px solid var(--line);border-radius:999px;
  color:var(--ink-dim);cursor:pointer;font-size:16px;line-height:1;
}
.rw-theme:hover{color:var(--royal);border-color:var(--royal)}
.rw-theme:focus-visible{outline:3px solid var(--royal);outline-offset:2px}

/* ---------- floating menu button ---------- */

.rw-fab{
  position:fixed;right:16px;z-index:60;
  bottom:calc(16px + env(safe-area-inset-bottom,0px));
  display:inline-flex;align-items:center;gap:8px;
  min-height:50px;padding:0 20px;border-radius:999px;
  border:0;background:var(--royal);color:var(--on-accent);
  font:600 14.5px/1 var(--body);letter-spacing:.01em;cursor:pointer;
  box-shadow:var(--shadow-lg);
}
.rw-fab:hover{background:var(--royal-light)}
.rw-fab:focus-visible{outline:3px solid var(--royal);outline-offset:3px}
.rw-fab[hidden]{display:none}

/* ---------- menu sheet ---------- */

.rw-scrim{
  position:fixed;inset:0;z-index:70;background:rgba(15,21,35,.55);
  opacity:0;pointer-events:none;transition:opacity .18s ease;
}
.rw-scrim.open{opacity:1;pointer-events:auto}
.rw-sheet{
  position:fixed;z-index:80;left:0;right:0;
  bottom:0;max-height:82vh;overflow-y:auto;overscroll-behavior:contain;
  background:var(--mat);border-top:1px solid var(--line);
  border-radius:20px 20px 0 0;box-shadow:var(--shadow-lg);
  font-family:var(--body);
  transform:translateY(102%);
  padding:8px 0 calc(18px + env(safe-area-inset-bottom,0px));
  /* A closed sheet must not sit over the page catching clicks. Off-screen is
     not enough on wide screens, where the closed sheet stays inside the
     viewport and only opacity hides it. */
  visibility:hidden;pointer-events:none;
  transition:transform .22s cubic-bezier(.2,.8,.2,1),visibility 0s linear .22s;
}
.rw-sheet.open{
  transform:translateY(0);
  visibility:visible;pointer-events:auto;
  transition:transform .22s cubic-bezier(.2,.8,.2,1);
}
.rw-grip{width:38px;height:4px;border-radius:3px;background:var(--line);margin:6px auto 10px}
.rw-sheet h2{
  margin:16px 18px 8px;font:600 10.5px/1.2 var(--body);
  letter-spacing:.14em;text-transform:uppercase;color:var(--royal-light);
}
.rw-sheet a{
  display:flex;align-items:flex-start;gap:11px;
  padding:13px 18px;min-height:48px;
  color:var(--ink);text-decoration:none;
  font:500 15px/1.35 var(--body);
  border-top:1px solid var(--line);
}
.rw-sheet h2 + .rw-jump a:first-child,
.rw-sheet h2 + a{border-top:0}
.rw-sheet a small{display:block;margin-top:2px;font-size:11.5px;color:var(--ink-dim);font-weight:400}
.rw-sheet a:hover{background:var(--mat-2)}
.rw-sheet a[aria-current="page"]{background:rgba(var(--royal-rgb),.09);font-weight:700}
.rw-sheet a[aria-current="page"] .rw-dot{background:var(--royal)}
.rw-dot{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:var(--line);margin-top:7px}
.rw-jump a{font-size:14px}
.rw-close{
  display:block;width:calc(100% - 36px);margin:12px 18px 0;min-height:46px;
  border:1px solid var(--line);border-radius:999px;background:none;color:var(--ink-dim);
  font:600 13px/1 var(--body);letter-spacing:.06em;text-transform:uppercase;cursor:pointer;
}
.rw-close:hover{color:var(--ink);border-color:var(--royal)}

body{padding-bottom:88px}

@media (min-width:820px){
  .rw-sheet{
    left:auto;right:16px;bottom:82px;width:390px;
    border-radius:18px;border:1px solid var(--line);
    transform:translateY(14px) scale(.97);opacity:0;
    transition:transform .18s ease,opacity .18s ease,visibility 0s linear .18s;
  }
  .rw-sheet.open{
    transform:none;opacity:1;
    transition:transform .18s ease,opacity .18s ease;
  }
  .rw-grip{display:none}
}

@media (prefers-reduced-motion:reduce){
  .rw-sheet,.rw-scrim,.rw-fab{transition:none}
}

/* anchored sections clear the page's own sticky header */
[id^="rw-sec-"]{scroll-margin-top:104px}

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

.rw-clips{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:8px 0 2px}
.rw-clip{
  position:relative;display:block;width:100%;aspect-ratio:16/9;
  border:0;padding:0;border-radius:10px;overflow:hidden;cursor:pointer;
  background:var(--mat-3) center/cover no-repeat;
  box-shadow:var(--shadow);
}
.rw-clip:focus-visible{outline:3px solid var(--royal);outline-offset:2px}
.rw-clip img{width:100%;height:100%;object-fit:cover;display:block}
.rw-clip .rw-play{
  position:absolute;inset:0;display:grid;place-items:center;
  background:linear-gradient(180deg,rgba(15,21,35,.05),rgba(15,21,35,.45));
  transition:background .18s ease;
}
.rw-clip:hover .rw-play{background:linear-gradient(180deg,rgba(15,21,35,.15),rgba(15,21,35,.6))}
.rw-clip .rw-play span{
  width:46px;height:46px;border-radius:50%;
  background:var(--royal);color:#fff;
  display:grid;place-items:center;font-size:16px;padding-left:3px;
  box-shadow:0 6px 18px rgba(0,0,0,.35);
}
.rw-clip .rw-cap{
  position:absolute;left:0;right:0;bottom:0;padding:8px 10px;
  color:#fff;font:600 11.5px/1.3 var(--body);
  text-shadow:0 1px 3px rgba(0,0,0,.7);text-align:left;
}
.rw-clip iframe{width:100%;height:100%;border:0;display:block}
.rw-clip.playing{cursor:default}
.rw-clip.playing .rw-play,.rw-clip.playing .rw-cap{display:none}

/* ---------- global type normalisation ---------- */
/* Archivo Black ships one weight; stop browsers faux-bolding it into mud. */
html{font-synthesis-weight:none}

/* ---------- add to home screen ---------- */

.rw-a2hs{
  position:fixed;left:0;right:0;bottom:0;z-index:90;
  padding:0 12px calc(12px + env(safe-area-inset-bottom,0px));
  transform:translateY(120%);transition:transform .24s cubic-bezier(.2,.8,.2,1);
  pointer-events:none;
}
.rw-a2hs.open{transform:translateY(0);pointer-events:auto}
.rw-a2hs-card{
  max-width:520px;margin:0 auto;padding:16px 16px 14px;
  background:var(--mat);border:1px solid var(--line);border-radius:18px;
  box-shadow:var(--shadow-lg);
  display:grid;grid-template-columns:auto 1fr;gap:12px 13px;align-items:start;
}
.rw-a2hs-icon img{display:block;width:46px;height:46px;border-radius:11px}
.rw-a2hs-copy p{margin:0;font-size:14.5px;line-height:1.5;color:var(--ink-2)}
.rw-a2hs-copy b{color:var(--ink)}
.rw-a2hs-copy ol{margin:9px 0 0;padding-left:18px}
.rw-a2hs-copy li{font-size:14px;line-height:1.6;color:var(--ink-2);margin-bottom:2px}
.rw-a2hs-copy svg{vertical-align:-3px;color:var(--royal)}
.rw-a2hs-actions{grid-column:1 / -1;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.rw-a2hs-go{
  min-height:44px;padding:0 18px;border:0;border-radius:999px;
  background:var(--royal);color:#fff;font:600 14px/1 var(--body);cursor:pointer;
}
.rw-a2hs-go:hover{background:var(--royal-light)}
.rw-a2hs-no{
  min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:999px;
  background:var(--mat);color:var(--ink-dim);font:600 13.5px/1 var(--body);cursor:pointer;
}
.rw-a2hs-no:hover{color:var(--ink);border-color:var(--royal)}

/* keep the menu button clear of the card while it is up */
body.rw-a2hs-open .rw-fab{bottom:calc(150px + env(safe-area-inset-bottom,0px))}

@media (prefers-reduced-motion:reduce){ .rw-a2hs{transition:none} }

/* ---------- page gate ---------- */

html.rw-locked body > *:not(.rw-gate-screen){display:none !important}
html.rw-locked body{padding-bottom:0}
.rw-gate-screen{
  position:fixed;inset:0;z-index:200;display:grid;place-items:center;
  padding:20px;background:var(--mat);overflow-y:auto;
}
.rw-gate{
  width:min(100%,420px);text-align:left;
  padding:28px 24px;border:1px solid var(--line);border-radius:20px;
  background:var(--mat);box-shadow:var(--shadow-lg);
}
.rw-gate-crest{
  width:46px;height:46px;border-radius:50%;background:var(--royal);color:#fff;
  display:grid;place-items:center;font:400 20px/1 var(--display);margin-bottom:16px;
}
.rw-gate h1{
  margin:0 0 8px;font-family:var(--display);font-weight:400;text-transform:uppercase;
  font-size:26px;line-height:1.05;color:var(--ink);
}
.rw-gate p{margin:0 0 18px;font-size:14.5px;line-height:1.55;color:var(--ink-dim)}
.rw-gate input{
  width:100%;min-height:50px;padding:0 16px;border:1px solid var(--line);border-radius:12px;
  background:var(--mat-2);color:var(--ink);font:500 16px/1 var(--body);margin-bottom:10px;
}
.rw-gate input:focus{outline:none;border-color:var(--royal)}
.rw-gate button{
  width:100%;min-height:50px;border:0;border-radius:999px;background:var(--royal);
  color:#fff;font:600 15px/1 var(--body);cursor:pointer;
}
.rw-gate button:hover{background:var(--royal-light)}
.rw-gate-err{margin:10px 0 0;min-height:18px;font-size:13.5px;color:#b91c1c}
:root[data-theme="dark"] .rw-gate-err{color:#fca5a5}
.rw-gate-out{
  display:inline-block;margin-top:14px;font:600 13px/1 var(--body);
  color:var(--ink-dim);text-decoration:none;
}
.rw-gate-out:hover{color:var(--royal)}
