/* ==========================================================================
   Yosemite Lanes — shared shell component library ("House League")
   Import order: every page <head> links css/tokens.css BEFORE this file.
   Page CSS (if any) loads AFTER site.css and only extends — never
   redefine palette hexes.
   ========================================================================== */

/* Offset anchor jumps for the sticky header */
html { scroll-padding-top: 96px; }

/* ==========================================================================
   1. Layout
   ========================================================================== */

.section--tint  { background: var(--scoresheet); }
.section--dark  { background: var(--dark); color: var(--cream); }

.grid {
  display: grid;
  gap: var(--space-6);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.split {  /* text + media two-up that stacks */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: var(--space-6); }
}

.stack-sm > * + * { margin-top: var(--space-3); }
.stack    > * + * { margin-top: var(--space-5); }

.center { text-align: center; }
.center p { margin-inline: auto; }

/* Section header block: eyebrow + h2 + optional lead */
.section-head { margin-bottom: var(--space-7); max-width: 46rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .lead { font-size: var(--text-lead); line-height: 1.55; margin-bottom: 0; }
.section-head--center .lead { margin-inline: auto; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 200;
  background: var(--ink);
  color: var(--btn-label);
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-chip) var(--radius-chip);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   2. Sticky header + mobile nav (no framework)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: 80px;
  padding-block: var(--space-2);
}

.site-header__logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.site-header__logo img { width: 130px; height: auto; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__list a {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav__list a:hover { color: var(--ketchup); }
.site-nav__list a[aria-current="page"] {
  color: var(--ketchup);
  border-bottom-color: var(--neon-red);
}
.site-nav__cta { white-space: nowrap; font-size: 0.9375rem; padding: 0.7em 1.4em; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius-chip);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1020px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    background: var(--cream);
    border-bottom: 2px solid var(--ink);
    box-shadow: var(--shadow-lift);
    padding: var(--space-5);
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__list a {
    display: block;
    padding: 12px 4px;
    font-size: 1.0625rem;
    border-bottom: 1px solid rgba(51,38,28,.14);
  }
  .site-nav__list a[aria-current="page"] { border-bottom-color: var(--neon-red); }
  .site-nav__cta { text-align: center; }
}

/* ==========================================================================
   3. Hero variants
   ========================================================================== */

/* Full "front window at dusk" hero (home) */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(82vh, 760px);
  background: var(--dark);
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media::after {  /* espresso dusk scrim */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-dusk);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-9);
  max-width: 44rem;
}
.hero h1 { color: var(--cream); }
.hero .eyebrow { color: var(--amber); }
.hero .lead { font-size: var(--text-lead); line-height: 1.55; color: var(--cream); }
.hero__glow-word {  /* ONE key word, single soft glow */
  color: var(--neon-red);
  text-shadow: 0 0 18px rgba(217,52,43,.5);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.hero__badge { margin-bottom: var(--space-5); }

/* Interior-page band hero (~40vh, same recipe) */
.hero--band { min-height: min(44vh, 420px); }
.hero--band .hero__content { padding-block: var(--space-8); }

/* Secondary button legibility on dark photo heroes (.hero / .hero--band);
   the light .hero--flat variant keeps the default ink treatment */
.hero:not(.hero--flat) .btn--secondary { color: var(--cream); border-color: var(--cream); }
.hero:not(.hero--flat) .btn--secondary:hover { background: var(--dark-raised); color: var(--cream); }

/* Flat Scoresheet band for pages without a worthy photo */
.hero--flat {
  background: var(--scoresheet);
  color: var(--ink);
  min-height: 0;
}
.hero--flat h1 { color: var(--ink); }
.hero--flat .lead { color: var(--ink); }
.hero--flat .eyebrow { color: var(--neon-red); }
.hero--flat .hero__content { padding-block: var(--space-8); }

/* ==========================================================================
   4. Images: frames, overlays, figures (mixed-quality photo rescue)
   ========================================================================== */

.figure { margin: 0; }
.figure figcaption {
  font-size: var(--text-small);
  color: var(--ink);
  opacity: .8;
  margin-top: var(--space-2);
}
.after-dark .figure figcaption { color: var(--cream); }

/* Framed photo with warm grade + optional amber wash */
.photo-frame { box-shadow: var(--shadow-card); }
.photo-frame img { width: 100%; }
.photo-frame--wash { position: relative; }
.photo-frame--wash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
  opacity: .07;
  mix-blend-mode: multiply;
  pointer-events: none;
  border-radius: inherit;
}

/* Bottom-up espresso gradient overlay (community/car-show treatment) */
.media-overlay { position: relative; overflow: hidden; border-radius: var(--radius-photo); }
.media-overlay img { width: 100%; display: block; }
.media-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(34,26,20,.78) 0%, rgba(34,26,20,.25) 45%, rgba(34,26,20,0) 70%);
  pointer-events: none;
}
.media-overlay__caption {
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 1;
  color: var(--cream);
}
.media-overlay__caption .eyebrow { color: var(--amber); margin-bottom: var(--space-1); }

/* Fixed-ratio crops so mixed sources line up in grids */
.crop-16x9  { aspect-ratio: 16 / 9; }
.crop-4x3   { aspect-ratio: 4 / 3; }
.crop-16x9 img, .crop-4x3 img { width: 100%; height: 100%; object-fit: cover; }

/* Corkboard cluster wrapper for .snapshot prints (about + parties pages) */
.corkboard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-6);
}
.corkboard figure.snapshot { margin: 0; }
.snapshot figcaption {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  text-align: center;
  padding-top: 8px;
  color: var(--ink);
}

/* Pullquote: shared testimonial block.
   Markup: <blockquote class="pullquote"><p>…</p><cite>…</cite></blockquote> */
.pullquote {
  margin: 0;
  border-left: 3px solid var(--amber);
  padding-left: var(--space-5);
  max-width: 34rem;
}
.pullquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 0;
}
.pullquote cite {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 600;
  font-size: var(--text-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--felt);
  margin-top: var(--space-3);
}
/* Centered stand-alone variant (about page): borderless, self-centering, larger */
.pullquote--center {
  border-left: 0;
  padding-left: 0;
  margin: var(--space-7) auto 0;
  text-align: center;
}
.pullquote--center p { font-size: 1.5rem; }

/* ==========================================================================
   5. Cards + tables + forms (extends tokens.css)
   ========================================================================== */

.card__tab + * { margin-top: var(--space-3); }
.card__meta {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--felt);
  margin: 0 0 var(--space-3);
}
.after-dark .card__meta { color: var(--amber); }
.card .price-lg {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}
.card .price-lg .unit {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-small);
}

/* Rate card recipe — shared by the home rates teaser and the bowling rate board.
   Same card, same look, on every page it appears. */
.rate-card { text-align: left; }
.rate-card .price-lg { font-size: 2.75rem; }
.rate-card .rate-when {  /* schedule line: mono numerals, felt accent */
  display: block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: var(--text-small);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--felt);
  margin: var(--space-2) 0 var(--space-3);
}
.card-grid { display: grid; gap: var(--space-6); padding-top: 14px; } /* room for index tabs */
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .card-grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .card-grid--2 { grid-template-columns: 1fr; } }

/* Simple definition rows inside cards (hours, contacts) */
.fact-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 8px 0;
  border-bottom: 1px dashed rgba(51,38,28,.25);
}
.fact-row:last-child { border-bottom: 0; }
.fact-row dt { font-weight: 600; }
.fact-row dd { margin: 0; font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Forms */
.form-grid { display: grid; gap: var(--space-5); }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid--2 { grid-template-columns: 1fr; } }
.form-field { margin: 0; }
.form-field--full { grid-column: 1 / -1; }
form [type="submit"], form .btn { width: auto; }
.form-success[hidden] { display: none; }
.form-success__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--felt);
  color: var(--btn-label);
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.site-footer {
  background: var(--dark);
  color: var(--cream);
  margin-top: var(--space-9);
}
.site-footer a { color: var(--cream); text-decoration-color: rgba(232,163,61,.6); }
.site-footer a:hover { color: var(--amber); }
.site-footer__main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-7);
  padding-block: var(--space-8) var(--space-7);
}
@media (max-width: 820px) {
  .site-footer__main { grid-template-columns: 1fr; gap: var(--space-6); }
}
.site-footer__logo img { width: 200px; height: auto; }
.site-footer__strapline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--amber);
  margin-top: var(--space-4);
}
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-4);
}
.site-footer address { font-style: normal; }
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { padding: 4px 0; }
.site-footer__list a { text-decoration: none; }
.site-footer__list a:hover { text-decoration: underline; }
.site-footer .hours { color: var(--cream); }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-5);
  border-top: 1px solid rgba(232,163,61,.35);
  font-size: var(--text-small);
}
.site-footer__credit { opacity: .75; }

/* ==========================================================================
   7. Scroll-reveal utilities (JS adds .is-revealed via IntersectionObserver)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal--delay-1 { transition-delay: .1s; }
.reveal--delay-2 { transition-delay: .2s; }
.reveal--delay-3 { transition-delay: .3s; }
.reveal.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
/* No-JS safety: pages set .js on <html> via site.js; without it, show everything */
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   8. Misc utilities
   ========================================================================== */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
