/* Como Tesla — minimal black, white and red. Black carries structure, red is reserved for a few signals.
   Archivo for headings and numbers, Public Sans for text. */
:root {
  --white: #ffffff;
  --black: #0a0a0a;
  --ink: #0a0a0a;
  --muted: #62626a;
  --line: #e4e4e7;
  --tint: #f6f6f7;
  --red: #d0101c;
  --red-dark: #a50c16;
  --ok: #157347;
  --warn: #9a5800;
  --bad: #d0101c;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 2px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
.h1, h1 { font-size: clamp(1.9rem, 4.4vw, 2.6rem); }
.h2, h2 { font-size: clamp(1.35rem, 2.8vw, 1.75rem); }
h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
::selection { background: var(--red); color: var(--white); }

/* Layout */
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
main.wrap { padding-block: 48px 96px; display: grid; gap: 56px; }
.narrow { max-width: 620px; width: 100%; }
.narrow-text { max-width: 46ch; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.center { justify-items: center; text-align: center; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
@media (max-width: 860px) { .split, .hero-inner { grid-template-columns: minmax(0, 1fr); } }

.eyebrow { font: 600 0.72rem/1 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.label { display: inline-flex; align-items: center; gap: 10px; font: 600 0.72rem/1 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
.label::before { content: ""; flex: none; width: 20px; height: 2px; background: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
/* Codes like VINs and member numbers: same body font, with even digit widths and a little spacing to read character by character */
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.upper { text-transform: uppercase; letter-spacing: 0.06em; }

/* Header */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1080px; margin: 0 auto; padding: 14px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--black); font: 800 0.95rem/1 var(--f-display); letter-spacing: 0.2em; }
.mark img { width: 40px; height: 40px; flex: none; }
.mark span { font-weight: 400; }
.mark:hover { color: var(--black); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a, .linkbtn { text-decoration: none; color: var(--muted); font: 500 0.9rem/1 var(--f-body); padding: 10px 12px; background: none; border: 0; cursor: pointer; }
.nav a:hover, .linkbtn:hover { color: var(--black); }
.nav .nav-cta { background: var(--black); color: var(--white); border-radius: var(--r); margin-left: 6px; }
.nav .nav-cta:hover { background: var(--red); color: var(--white); }
.nav .nav-admin { color: var(--red); }
form.inline { display: inline; }

/* Home */
/* Home hero: the club banner (public/hero-banner.jpg) across the full width, fading into a black band
   that carries the headline. A public/hero.mp4 plays in the banner's place if one is added. */
.hero-band { position: relative; overflow: hidden; isolation: isolate; margin-inline: calc(50% - 50vw); margin-top: -48px; background: #0a0a0a; color: var(--white); }
.hero-banner { position: relative; }
.hero-banner img, .hero-banner video { display: block; width: 100%; height: auto; max-height: 76vh; min-height: 260px; object-fit: cover; object-position: center 62%; }
.hero-banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, rgba(10,10,10,0) 0%, #0a0a0a 100%); pointer-events: none; }
.hero-inner { position: relative; max-width: 1080px; margin: -96px auto 0; padding: 0 20px 88px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.hero-copy { display: grid; gap: 20px; }
.hero-side { display: grid; gap: 24px; }
.hero-band h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); line-height: 1; letter-spacing: -0.035em; max-width: 13ch; color: var(--white); text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.hero-band h1 em { font-style: normal; color: var(--red); }
.hero-band .lede { color: #c4c4cc; }
.label-light { color: var(--white); }
/* Lane markings running along the bottom edge, a nod to the road in the logo */
.hero-road { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--red) 0 48px, transparent 48px 84px); opacity: .9; }
.btn.btn-red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn.btn-red:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.btn.btn-ghost { background: transparent; border-color: rgba(255,255,255,.6); color: var(--white); }
.btn.btn-ghost:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 50ch; }

/* What we do */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border: 1px solid var(--line); }
.feature { display: grid; gap: 10px; align-content: start; padding: 28px 24px; border-right: 1px solid var(--line); transition: background .2s; }
.feature:last-child { border-right: 0; }
.feature:hover { background: var(--tint); }
.feature svg { width: 30px; height: 30px; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature b { font: 700 1.05rem/1.2 var(--f-display); }
.feature p { color: var(--muted); font-size: 0.93rem; }

/* Closing call to action */
.cta-band { background: var(--black); color: var(--white); padding: 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 6px solid var(--red); }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #c4c4cc; margin-top: 8px; }

.section-head { display: grid; gap: 12px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 32px 24px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; gap: 8px; align-content: start; border-top: 2px solid var(--black); padding-top: 18px; }
.steps li::before { content: "0" counter(s); font: 700 0.85rem/1 var(--f-display); letter-spacing: 0.04em; color: var(--red); }
.steps b { font: 700 1.05rem/1.2 var(--f-display); }
.steps p { color: var(--muted); font-size: 0.93rem; }

/* Cards & forms */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; min-width: 0; }
.card.stack { display: grid; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, legend { font-weight: 600; font-size: 0.86rem; padding: 0; margin-bottom: 6px; }
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=number], input[type=datetime-local], select, textarea {
  font: inherit; color: var(--ink); background: var(--white); border: 1px solid #cfcfd4; border-radius: var(--r); padding: 11px 12px; width: 100%; min-width: 0;
}
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #a1a1aa; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 1px var(--black); }
.grow { flex: 1 1 220px; width: auto; }
.actions select { width: auto; }
.hint { font-size: 0.82rem; color: var(--muted); }
.err { font-size: 0.84rem; color: var(--red); font-weight: 600; }
.segs { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 10px 16px; border: 1px solid #cfcfd4; border-radius: var(--r); background: var(--white); font-weight: 500; font-size: 0.92rem; cursor: pointer; }
.seg span:hover { border-color: var(--black); }
.seg input:checked + span { border-color: var(--black); background: var(--black); color: var(--white); }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 0.93rem; align-items: start; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--black); }
.divider { border-top: 1px solid var(--line); padding-top: 18px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-block; text-decoration: none; font: 600 0.92rem/1 var(--f-body); padding: 14px 22px; border-radius: var(--r); border: 1px solid var(--black); background: var(--white); color: var(--black); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--black); color: var(--white); }
.btn.primary { background: var(--black); color: var(--white); }
.btn.primary:hover { background: var(--red); border-color: var(--red); }
.btn.danger { color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red); color: var(--white); }
.btn.small { padding: 9px 14px; font-size: 0.82rem; }

.note { border-left: 2px solid var(--black); background: var(--tint); padding: 14px 16px; font-size: 0.93rem; }
.note.ok { border-color: var(--ok); } .note.warn { border-color: var(--warn); } .note.bad { border-color: var(--red); }

/* Status */
.badge { display: inline-block; font: 600 0.72rem/1 var(--f-body); letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 12px; border-radius: var(--r); border: 1px solid currentColor; white-space: nowrap; }
.st-unverified { color: var(--muted); }
.st-pending, .st-needs_info { color: var(--warn); }
.st-approved { color: var(--white); background: var(--red); border-color: var(--red); }
.st-rejected { color: var(--black); }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: var(--r); border: 1px solid currentColor; margin: 0 4px 4px 0; white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); } .pill.bad { color: var(--red); } .pill.mut { color: var(--muted); } .pill.gold { color: var(--red); }
.account-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--black); }


/* Events */
.event-list { list-style: none; padding: 0; margin: 0; display: grid; border-top: 1px solid var(--line); }
.event-list li { display: grid; gap: 2px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.event-list a { text-decoration: none; }
.event-row { display: grid; grid-template-columns: 64px 1fr; gap: 20px; text-decoration: none; color: var(--ink); align-items: center; }
.event-row:hover { border-color: var(--black); color: var(--ink); }
.event-body { display: grid; gap: 6px; min-width: 0; }
.date { display: grid; text-align: center; border: 1px solid var(--black); border-radius: var(--r); overflow: hidden; }
.date span { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--white); background: var(--red); padding: 4px 0; }
.date b { font: 700 1.5rem/1 var(--f-display); padding: 8px 0; }
.prose { white-space: pre-wrap; }

/* Membership card: fixed colors so it reads like a physical card */
.mcard { width: 100%; max-width: 400px; min-height: 236px; border-radius: 10px; padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto auto; text-align: left;
  background: #0a0a0a; color: #ffffff; box-shadow: 0 20px 40px -12px rgba(0,0,0,.35); position: relative; overflow: hidden; }
.mcard::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #3a3a3f; }
.mcard.verified::after { background: #d0101c; }
.mcard-top { display: flex; justify-content: space-between; align-items: center; }
.mcard-club { font: 800 0.82rem/1 var(--f-display); letter-spacing: 0.2em; }
.mcard-club b { font-weight: 400; }
.mcard-no { font-size: 0.82rem; color: #a1a1aa; }
.mcard-name { align-self: end; font: 700 clamp(1.25rem, 5vw, 1.6rem)/1.1 var(--f-display); letter-spacing: -0.01em; }
.mcard-status { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #a1a1aa; margin-top: 6px; }
.mcard.verified .mcard-status { color: #ff4651; }
.mcard-bottom { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-top: 12px; }
.mcard-meta { min-width: 0; display: grid; gap: 2px; font-size: 0.75rem; color: #a1a1aa; }
.mcard-qr { flex: none; width: 92px; height: auto; background: #ffffff; padding: 4px; border-radius: 4px; }
.check-result { display: grid; gap: 12px; justify-items: center; padding: 36px 28px; border: 1px solid var(--line); border-top: 4px solid var(--black); background: var(--white); width: 100%; }
.check-result.verified { border-top-color: var(--red); }

/* Directory */
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.dir-item { display: grid; gap: 4px; padding: 20px; }

/* Admin */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border: 1px solid var(--line); }
.kpi { padding: 20px; display: grid; gap: 10px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi b { font: 700 2rem/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.kpi small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.kpi.gold { background: var(--black); color: var(--white); }
.kpi.gold .eyebrow, .kpi.gold small { color: #a1a1aa; }
.kpi.gold b { color: var(--white); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white); background: var(--black); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--tint); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; font-size: 0.93rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rules { padding-left: 2.2em; display: grid; gap: 10px; }
.rules li::marker { color: var(--red); font-weight: 700; }

/* Footer */
.foot { background: var(--black); color: #a1a1aa; padding-block: 40px; font-size: 0.84rem; }
.foot .wrap { display: grid; gap: 6px; }
.foot-logo { width: 72px; height: 72px; margin-bottom: 10px; }
.foot strong { color: var(--white); font: 800 0.85rem/1 var(--f-display); letter-spacing: 0.2em; margin-bottom: 8px; }
.foot strong span { font-weight: 400; }
.foot a { color: var(--white); }
.foot a:hover { color: #ff4651; }

/* Phones */
@media (max-width: 640px) {
  main.wrap { padding-block: 28px 64px; gap: 44px; }
  .bar-in { padding: 10px 16px 0; gap: 4px; }
  .wrap { padding-inline: 16px; }
  /* One swipeable row of links instead of a menu that wraps onto several lines */
  .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding-bottom: 6px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .linkbtn { padding: 12px; white-space: nowrap; }
  .nav .nav-cta { margin-left: auto; }
  .hero-band { margin-top: -28px; }
  .hero-banner img, .hero-banner video { min-height: 220px; object-position: 45% 70%; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); margin-top: -40px; padding: 0 16px 64px; gap: 24px; }
  .feature { border-right: 0; border-bottom: 1px solid var(--line); }
  .feature:last-child { border-bottom: 0; }
  .cta-band { padding: 28px 20px; }
  .label { letter-spacing: 0.12em; line-height: 1.4; }
  .actions .btn { flex: 1 1 auto; text-align: center; }
  .card { padding: 20px; }
  .steps { gap: 24px; }
  .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(odd) { border-right: 1px solid var(--line); }
  .event-row { grid-template-columns: 52px 1fr; gap: 14px; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
