/* Playmates. Direction: Meetup 2015 structure (photo cards with a dark fade and bold
   white titles) + OpenSports 2018 photography (real amateurs playing).
   Rules: one family (Hanken Grotesk) at bold weights, one accent, 6px radius, no pills,
   no shadows. Status is carried by words and weight, never colour alone (colour-blind safe). */

@font-face{ font-family:"Hanken Grotesk"; font-style:normal; font-weight:300 700;
  src:url("fonts/hanken-grotesk-variable.woff2") format("woff2"); font-display:swap; }

:root{
  --ink:#15171c; --ink-soft:#33363d; --muted:#686c74; --faint:#9aa0a6;
  --paper:#ffffff; --tint:#f4f3f0; --tint2:#ebe9e4; --rule:#e3e1dc;
  --night:#101318;
  /* Accent: volt (tennis-ball yellow-green), chosen 2026-11-03. Always dark text on it. */
  --accent:#d4ff3a; --accent-ink:#15171c; --accent-dark:#c2ef1f;
  --font:"Hanken Grotesk", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius:6px;
}

*{ box-sizing:border-box; }
[hidden]{ display:none !important; }
html{ font-size:17px; -webkit-text-size-adjust:100%; }
body{ margin:0; background:var(--paper); color:var(--ink-soft); font-family:var(--font); line-height:1.55; -webkit-font-smoothing:antialiased; }
a{ color:inherit; text-decoration:none; }
img{ display:block; max-width:100%; }
.wrap{ max-width:1120px; margin:0 auto; padding:0 24px; }
@media(max-width:640px){ .wrap{ padding:0 16px; } }

h1,h2,h3{ margin:0; color:var(--ink); font-weight:700; line-height:1.08; letter-spacing:-.02em; }
h1{ font-size:clamp(2.6rem,7vw,4.6rem); }
h2{ font-size:clamp(1.7rem,4vw,2.4rem); }
h3{ font-size:1.15rem; letter-spacing:-.01em; }
.eyebrow{ font-size:.78rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--ink); }
.dek{ color:var(--muted); font-size:1.05rem; margin:.5rem 0 0; }

/* ---- top bar ------------------------------------------------------------ */
.topbar{ position:sticky; top:0; z-index:30; background:var(--paper); border-bottom:1px solid var(--rule); }
.topbar .wrap{ display:flex; align-items:center; gap:24px; height:62px; }
.brand{ font-weight:700; font-size:1.35rem; letter-spacing:-.03em; color:var(--ink); margin-right:auto; }
.brand::after{ content:"."; color:var(--ink); }
.tabs{ display:flex; gap:22px; }
.tabs a{ font-size:.95rem; font-weight:600; color:var(--muted); padding:.3em 0; border-bottom:2px solid transparent; }
.tabs a.on{ color:var(--ink); border-color:var(--ink); }
#unread-dot{ font-size:.8rem; color:var(--ink); }

/* ---- buttons: 6px rectangle, never a pill, never a shadow ---------------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; font:inherit; font-weight:700; font-size:.98rem;
  padding:.75em 1.4em; border-radius:var(--radius); border:2px solid var(--accent); background:var(--accent);
  color:var(--accent-ink); cursor:pointer; transition:background .12s, border-color .12s; white-space:nowrap; }
.btn:hover{ background:var(--accent-dark); border-color:var(--accent-dark); }
.btn-ghost{ background:transparent; color:var(--ink); border-color:var(--rule); }
.btn-ghost:hover{ background:transparent; border-color:var(--ink); }
.btn-big{ padding:1em 1.6em; font-size:1.05rem; }
.btn-sm{ padding:.45em 1em; font-size:.9rem; }
.btn:disabled{ opacity:.6; cursor:default; }
.linkish{ background:none; border:0; padding:0; font:inherit; font-size:.92rem; font-weight:700; color:var(--ink); cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.linkish.on-dark{ color:#fff; }

/* ---- forms --------------------------------------------------------------- */
.field{ display:block; margin-bottom:32px; }
.lab{ display:block; font-size:.78rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink); margin-bottom:.6em; }
.lab em{ text-transform:none; letter-spacing:0; font-weight:500; color:var(--muted); }
.hint{ color:var(--muted); font-size:.9rem; margin:.3em 0 .7em; }
.hint.center{ text-align:center; }
.error{ color:var(--ink); font-weight:700; min-height:1.2em; margin:.5em 0; }
input, select, textarea{ width:100%; font:inherit; font-size:1rem; color:var(--ink); background:var(--paper);
  border:2px solid var(--rule); border-radius:var(--radius); padding:.7em .85em; }
select{ appearance:none; background:var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2315171c'/%3E%3C/svg%3E") right .85em center no-repeat; padding-right:2.2em; }
input:focus, select:focus, textarea:focus{ outline:none; border-color:var(--ink); }
.inline{ display:flex; gap:8px; align-items:stretch; margin-top:.6rem; }
.inline input{ margin:0; flex:1; min-width:0; }
.inline .btn{ flex-shrink:0; }

.seg{ display:flex; flex-wrap:wrap; gap:8px; }
.seg button{ font:inherit; font-size:.95rem; font-weight:600; color:var(--ink); background:var(--tint);
  border:2px solid transparent; border-radius:var(--radius); padding:.55em .95em; cursor:pointer; }
.seg button:hover{ border-color:var(--ink); }
.seg button.on{ background:var(--ink); color:#fff; }
.seg button.on::before{ content:"✓ "; }
.levels button.on::before{ content:""; }
.levels button{ min-width:3em; font-variant-numeric:tabular-nums; }

.sport-level{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:12px 0; border-bottom:1px solid var(--rule); }
.sport-level:first-child{ border-top:1px solid var(--rule); margin-top:14px; }
.sport-level > b{ min-width:7.5em; color:var(--ink); }
.sport-level .hint{ flex-basis:100%; margin:0; }

.day{ border-top:1px solid var(--rule); padding:12px 0; }
.day:last-child{ border-bottom:1px solid var(--rule); }
.day > label{ display:flex; align-items:center; gap:10px; font-weight:700; color:var(--ink); cursor:pointer; }
.day input[type=checkbox]{ width:1.2rem; height:1.2rem; margin:0; accent-color:var(--ink); }
.range{ display:flex; align-items:center; gap:8px; margin-top:8px; }
.range select{ padding:.5em 2em .5em .65em; font-size:.95rem; }
.range span{ color:var(--muted); }
.range .linkish{ flex-shrink:0; color:var(--muted); font-weight:600; }
.day .add{ margin-top:8px; }

.photo-field{ display:flex; gap:18px; align-items:center; }
.file-btn{ cursor:pointer; }
.avatar{ width:46px; height:46px; border-radius:var(--radius); background:var(--ink); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; flex-shrink:0; overflow:hidden; }
.avatar img{ width:100%; height:100%; object-fit:cover; }
.avatar.big{ width:96px; height:96px; font-size:2.2rem; }

.account{ margin-top:48px; padding-top:24px; border-top:1px solid var(--rule); }
.account p{ margin:0 0 14px; color:var(--ink); }

/* ---- landing ------------------------------------------------------------- */
/* Hero. Desktop: the photo fills the width, cropped to the court, shaded on the text side.
   Phone (<=820px): the photo sits on top as its own block, text below on dark. */
.hero{ position:relative; min-height:min(86vh, 720px); display:flex; align-items:center; color:#fff; background:var(--night); overflow:hidden; }
.hero-photo{ position:absolute; inset:0; background:url("img/hero.jpg") center 78% / cover no-repeat; }
.hero-photo::before{ content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(16,19,24,.88) 0%, rgba(16,19,24,.62) 40%, rgba(16,19,24,.12) 75%, rgba(16,19,24,.05) 100%); }
.hero .wrap{ position:relative; width:100%; padding-top:72px; padding-bottom:72px; }
.hero h1{ color:#fff; max-width:11ch; }
.hero .sub{ font-size:1.2rem; max-width:40ch; color:rgba(255,255,255,.86); margin:18px 0 28px; }
@media(max-width:820px){
  .hero{ display:block; min-height:0; }
  .hero-photo{ position:relative; inset:auto; width:100%; aspect-ratio:4/3; background-position:center 60%; }
  .hero-photo::before{ background:linear-gradient(180deg, rgba(16,19,24,0) 55%, var(--night) 100%); }
  .hero .wrap{ padding-top:8px; padding-bottom:40px; }
}
.signin-box{ max-width:520px; }
.signin-box .lab{ color:#fff; }
.signin-box input{ border-color:transparent; }
.signin-box .error{ color:#fff; }
.hp{ position:absolute; left:-9999px; }
#waitlist-more select{ margin:4px 0 14px; max-width:320px; display:block; }
.seg.on-dark{ margin-bottom:16px; }
.seg.on-dark button{ background:rgba(255,255,255,.12); color:#fff; }
.seg.on-dark button:hover{ border-color:#fff; }
.seg.on-dark button.on{ background:var(--accent); color:var(--accent-ink); }
#waitlist-thanks h3{ color:#fff; font-size:1.5rem; }
.signin-box .fine{ font-size:.85rem; color:rgba(255,255,255,.7); margin:6px 0 0; }
input.code{ letter-spacing:.3em; font-variant-numeric:tabular-nums; font-weight:700; }

.section{ padding:72px 24px; }
@media(max-width:640px){ .section{ padding:52px 16px; } }
.tiles{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-top:28px; }
@media(max-width:900px){ .tiles{ grid-template-columns:repeat(3,1fr); } }
@media(max-width:600px){ .tiles{ grid-template-columns:repeat(2,1fr); gap:10px; } }
.tile{ position:relative; aspect-ratio:4/3; border-radius:var(--radius); overflow:hidden; background:var(--ink-soft) center / cover no-repeat;
  display:flex; align-items:flex-end; padding:14px; color:#fff; }
.tile:nth-child(3n+2){ background-color:#2a2e36; }
.tile:nth-child(3n+3){ background-color:#3b3f48; }
.tile::before{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.75) 100%); }
.tile span{ position:relative; font-weight:700; font-size:1.3rem; letter-spacing:-.02em; line-height:1.1; }
.tile small{ display:block; font-size:.8rem; font-weight:600; opacity:.8; letter-spacing:0; margin-top:2px; }

.band{ background:var(--tint); }
.steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:32px; padding-top:64px; padding-bottom:64px; }
@media(max-width:720px){ .steps{ grid-template-columns:1fr; gap:28px; } }
.steps b{ display:inline-flex; width:2.1rem; height:2.1rem; align-items:center; justify-content:center; border-radius:var(--radius);
  background:var(--accent); color:var(--accent-ink); font-size:1.05rem; margin-bottom:14px; }
.steps p{ color:var(--muted); margin:.4rem 0 0; }
.cities-list{ font-size:clamp(1.4rem,3.4vw,2.2rem); font-weight:700; color:var(--ink); letter-spacing:-.02em; margin:12px 0 0; }
.cities-list span{ color:var(--faint); font-weight:500; }
.footer{ padding:28px 24px 48px; color:var(--faint); font-size:.9rem; border-top:1px solid var(--rule); }

/* ---- app views ----------------------------------------------------------- */
.app{ max-width:640px; padding-top:32px; padding-bottom:72px; }
.head{ margin-bottom:32px; }
.head h2{ margin-top:6px; }

.filters{ display:flex; gap:12px; margin-bottom:18px; }
.filters label{ flex:1; }
.filters .lab{ margin-bottom:.35em; }

/* Deck card: Meetup-style photo with a dark fade and bold white name */
.deck{ position:relative; min-height:540px; touch-action:pan-y; }
.card{ position:absolute; inset:0; border-radius:var(--radius); overflow:hidden; background:var(--paper);
  border:2px solid var(--ink); display:flex; flex-direction:column; user-select:none; transition:transform .25s ease; cursor:grab; }
.card.behind{ transform:scale(.97) translateY(12px); }
.card.dragging{ transition:none; cursor:grabbing; }
.card .photo{ position:relative; flex:0 0 58%; background:var(--ink) center / cover no-repeat; display:flex; align-items:flex-end; padding:18px; color:#fff; }
.card .photo::before{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.78) 100%); }
.card .photo .initial{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:6rem; font-weight:700; color:rgba(255,255,255,.18); }
.card .photo .who{ position:relative; }
.card .photo h2{ color:#fff; font-size:2.3rem; }
.card .photo .lvl{ font-weight:700; margin-top:4px; }
.card .photo .lvl span{ font-weight:500; opacity:.85; }
.card .body{ padding:16px 18px 18px; display:flex; flex-direction:column; flex:1; min-height:0; }
.card .meta{ color:var(--muted); font-size:.9rem; margin:0; }
.card .bio{ color:var(--ink); margin:6px 0 0; }
.card .plan{ margin-top:auto; padding-top:12px; }
.card .plan .where{ font-size:1.15rem; font-weight:700; color:var(--ink); }
.card .plan .also{ color:var(--muted); font-size:.88rem; margin-top:2px; }
.card .stamp{ position:absolute; z-index:2; top:18px; right:18px; font-weight:700; letter-spacing:.06em; font-size:1.2rem; padding:.15em .5em;
  border-radius:var(--radius); background:var(--accent); color:var(--accent-ink); opacity:0; }
.card .stamp.pass{ right:auto; left:18px; background:#fff; color:var(--ink); }
.deck-actions{ display:flex; gap:12px; margin-top:16px; }
.deck-actions .btn{ flex:1; }
.empty{ border:2px solid var(--ink); border-radius:var(--radius); padding:32px 24px; }
.empty h3{ font-size:1.6rem; margin:6px 0 4px; }
.empty p{ color:var(--muted); }

.rows{ border-top:1px solid var(--rule); }
.row.match{ display:flex; justify-content:space-between; align-items:center; gap:14px; padding:16px 0; border-bottom:1px solid var(--rule); cursor:pointer; }
.row.match .who{ display:flex; gap:14px; align-items:center; min-width:0; }
.row-title{ font-weight:700; color:var(--ink); display:block; }
.row-sub{ display:block; color:var(--muted); font-size:.9rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:34ch; }
.row-sub .new{ font-weight:700; color:var(--ink); }
.row-meta{ color:var(--faint); font-size:.85rem; }
.pending{ color:var(--muted); padding:20px 0; }
@media(max-width:640px){ .row-sub{ max-width:22ch; } }

.chat{ display:flex; flex-direction:column; min-height:calc(100vh - 62px - 3rem); }
.chat-head{ display:flex; align-items:center; gap:14px; padding-bottom:14px; border-bottom:1px solid var(--rule); }
.chat-who{ flex:1; min-width:0; display:flex; gap:12px; align-items:center; }
.chat-who .n{ font-weight:700; color:var(--ink); }
.chat-who .s{ font-size:.85rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-tools{ display:flex; gap:14px; }
.chat-tools .linkish{ color:var(--muted); font-weight:600; text-decoration:none; }
.chat-log{ flex:1; padding:20px 0; display:flex; flex-direction:column; gap:8px; }
.msg{ max-width:80%; padding:.6em .9em; border-radius:var(--radius); background:var(--tint); color:var(--ink); white-space:pre-wrap; word-wrap:break-word; }
.msg.mine{ align-self:flex-end; background:var(--ink); color:#fff; }
.msg time{ display:block; font-size:.72rem; opacity:.65; margin-top:.2em; }
.chat-note{ color:var(--muted); font-size:.92rem; text-align:center; margin:auto 0; }
.chat-send{ display:flex; gap:8px; position:sticky; bottom:0; background:var(--paper); padding:10px 0 16px; }

.sheet{ position:fixed; inset:0; z-index:50; background:rgba(16,19,24,.75); display:flex; align-items:flex-end; justify-content:center; }
.sheet-body{ background:var(--paper); width:100%; max-width:640px; border-radius:var(--radius) var(--radius) 0 0; padding:32px 20px 40px; max-height:92vh; overflow:auto; }
.sheet-body h2{ margin:8px 0 12px; }
.sheet-body p{ color:var(--muted); }
.sheet-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:20px; }
@media(min-width:700px){ .sheet{ align-items:center; } .sheet-body{ border-radius:var(--radius); } }
