/* ============================================================
   The Bench — design system
   Heritage sporting-club × clean modern studio.
   Mobile-first. One accent. Big, legible, editorial.
   ============================================================ */

:root {
  /* palette */
  --ink:        #15140F;   /* warm near-black — primary canvas */
  --ink-raise:  #1E1C16;   /* raised surface / cards on dark */
  --ink-line:   rgba(244, 241, 233, 0.12);
  --navy:       #16243A;   /* deep secondary surface */
  --chalk:      #F4F1E9;   /* off-white — light flip + reverse type */
  --chalk-dim:  #C9C5BA;   /* muted body text on dark */
  --chalk-soft: #A29E90;   /* captions / meta on dark — AA on --ink */
  --ink-dim:    #4A4740;   /* muted body text on chalk */
  --teal:       #1EBFA8;   /* THE accent — used sparingly */
  --teal-deep:  #149E8A;

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  /* rhythm */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --maxw: 1200px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (min-width: 640px) { body { font-size: 18px; } }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  font-optical-sizing: auto; /* use Fraunces opsz axis — finer at display sizes */
}

/* keyboard focus — visible on the dark canvas */
a:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.card:focus-within,
.card__link:focus-visible,
.contact__mail:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

p { margin: 0 0 1.1em; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--chalk); }
strong { font-weight: 600; }

::selection { background: var(--teal); color: var(--ink); }

.accent-dot { color: var(--teal); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- film grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 50; /* textures content, stays below header (100) + menu (110) */
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), padding 0.3s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--ink-line);
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.wordmark__the { font-weight: 400; opacity: 0.66; margin-right: 0.28em; font-style: italic; }
.wordmark__dot { color: var(--teal); }
.wordmark--sm { font-size: 1.25rem; }

.nav { display: none; gap: 2rem; }
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--chalk-dim);
  position: relative;
  padding: 0.2rem 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 1.5px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--chalk); }
.nav a:hover::after { transform: scaleX(1); }

@media (min-width: 820px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
}

/* hamburger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin-right: -10px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--chalk);
  margin-left: auto;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), width 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); width: 24px; }

/* mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--gutter);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu a {
  font-family: var(--display);
  font-size: clamp(2.5rem, 12vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.mobile-menu a:active { color: var(--teal); }
.mobile-menu__mail {
  margin-top: 2rem;
  font-family: var(--body);
  font-size: 1.05rem;
  color: var(--teal);
}

/* ---------- shared section bits ---------- */
section { padding-block: clamp(4.5rem, 12vw, 9rem); padding-inline: var(--gutter); }
.kicker {
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1.1rem;
}
.kicker--ink { color: var(--teal-deep); }
.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk-soft);
  margin: 0 0 1.6rem;
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-top: clamp(3rem, 10vw, 6rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero__title {
  font-size: clamp(3rem, 13.5vw, 9.5rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin: 0 0 1.6rem;
}
.hero__lede {
  max-width: 34ch;
  font-size: clamp(1.1rem, 3.4vw, 1.4rem);
  line-height: 1.5;
  color: var(--chalk-dim);
  margin-bottom: 2.4rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__scroll {
  margin-top: clamp(3rem, 9vw, 5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk-soft);
}
.hero__scroll svg { animation: bob 2.2s var(--ease) infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(5px);} }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--solid { background: var(--teal); color: var(--ink); }
.btn--solid:hover { background: var(--chalk); transform: translateY(-2px); }
.btn--ghost { border-color: var(--ink-line); color: var(--chalk); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

/* ---------- roster ---------- */
.roster { max-width: var(--maxw); margin-inline: auto; }
.section-head { max-width: 22ch; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head h2 { font-size: clamp(2rem, 7vw, 3.4rem); }

.roster__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 720px) { .roster__grid { grid-template-columns: 1fr 1fr; } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--ink);
  padding: clamp(1.6rem, 5vw, 2.6rem);
  min-height: 220px;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.card:hover { background: var(--ink-raise); }
.card__index {
  font-family: var(--body);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--chalk-soft);
}
.card__name {
  font-family: var(--display);
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.card__engine { color: var(--teal); font-weight: 600; font-size: 0.95rem; }
.card__desc { color: var(--chalk-dim); font-size: 1.02rem; line-height: 1.55; margin: 0; flex: 1; }
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--chalk);
  width: fit-content;
}
.card__link svg { transition: transform 0.3s var(--ease); }
.card__link:hover { color: var(--teal); }
.card__link:hover svg { transform: translate(3px, -3px); }
.card__link--muted { color: var(--chalk-soft); pointer-events: none; }
.card--accent { background: var(--navy); }
.card--accent:hover { background: #1a2c45; }

/* ---------- about (light flip) ---------- */
.about { background: var(--chalk); color: var(--ink); }
.about__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  gap: clamp(1.5rem, 5vw, 3.5rem);
}
@media (min-width: 880px) {
  .about__inner { grid-template-columns: 1fr 1fr; align-items: start; }
}
.about__lead h2 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  color: var(--ink);
}
.about__body { font-size: clamp(1.05rem, 2.6vw, 1.22rem); line-height: 1.7; color: #2a2822; }
.about__body em { color: var(--teal-deep); font-style: italic; font-weight: 500; }
.about__body strong { color: var(--ink); }
.about__sig { margin-top: 1.8rem; font-style: italic; color: var(--ink-dim); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact__inner { max-width: 760px; margin-inline: auto; }
.contact h2 { font-size: clamp(2rem, 7vw, 3.6rem); margin-bottom: 1.8rem; }
.contact__mail {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.4rem, 6vw, 2.6rem);
  font-weight: 500;
  color: var(--teal);
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.contact__mail:hover { border-bottom-color: var(--teal); }
.contact__sub { margin-top: 1.4rem; color: var(--chalk-soft); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--ink-line);
  padding: 2.5rem var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  max-width: var(--maxw);
  margin-inline: auto;
}
@media (min-width: 680px) {
  .site-footer { flex-direction: row; align-items: center; justify-content: space-between; }
}
.site-footer__brand { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.site-footer__tag { color: var(--chalk-soft); font-size: 0.9rem; font-style: italic; font-family: var(--display); }
.site-footer__meta { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: 0.9rem; color: var(--chalk-soft); }
.site-footer__meta a:hover { color: var(--teal); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* staggered reveal for the roster grid — choreographed, not one canned fade */
.roster__grid .card.reveal { transition-delay: calc(var(--i, 0) * 75ms); }

/* one-time life on the hero accent dot */
.hero__title .accent-dot { display: inline-block; transform-origin: bottom center; animation: dot-pop 0.6s var(--ease) 0.5s both; }
@keyframes dot-pop { 0% { transform: scale(0); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
