/* Home Plate Hitting Co. — shared stylesheet for index.html and 404.html.
   No build step: this file is authored by hand and served as-is by Cloudflare. */

/* ---------- Display face. One weight only, so nothing above the fold waits
     on a second file and the swap cannot shift layout twice. ---------- */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/barlow-condensed-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Palette taken from the Home Plate Sports Facility logo: deep navy badge,
     Carolina-blue highlight, white wordmark. The accent is true Carolina
     (#4B9CD3) rather than the logo's paler shadow blue, and the maize the old
     app carried is deliberately absent. */
  --navy: #0a1523;
  --navy-2: #0f1e30;
  --navy-3: #142639;
  --line: #1e3149;
  --line-soft: #17273b;
  --chalk: #f2f6fa;
  --chalk-dim: #a2b4c6;
  --carolina: #4b9cd3;
  --carolina-deep: #3b87bd;
  --on-accent: #06131f;
  --scrim: 6, 14, 24;

  /* type scale */
  --fs-1: 0.8125rem;
  --fs-2: 0.9375rem;
  --fs-3: 1.0625rem;
  --fs-4: clamp(1.15rem, 1.6vw, 1.35rem);
  --fs-5: clamp(1.75rem, 3.6vw, 2.6rem);
  --fs-6: clamp(2.75rem, 7.4vw, 5.25rem);

  /* spacing scale */
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: 4rem;
  --s-6: 6rem;

  --display: "Barlow Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1140px;
  --radius: 14px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--chalk);
  font: var(--fs-3) / 1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.94;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-6); }
h2 { font-size: var(--fs-5); }

h3 {
  margin: 0;
  font-family: var(--body);
  font-size: var(--fs-4);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--carolina);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  background: var(--carolina);
  color: var(--on-accent);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* Eyebrow: the one place the accent carries type. */
.eyebrow {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--fs-1);
  color: var(--carolina);
}

.lede {
  font-size: var(--fs-4);
  color: var(--chalk-dim);
  max-width: 54ch;
  line-height: 1.55;
}

/* Baseball-stitch rule — the brand motif, used sparingly as a divider. */
.stitch {
  height: 2px;
  border: 0;
  margin: 0;
  background-image: repeating-linear-gradient(
    90deg,
    var(--carolina) 0 14px,
    transparent 14px 26px
  );
  opacity: 0.5;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 10px;
  font: 650 var(--fs-2) / 1 var(--body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}

/* Exactly one filled control per view — the primary action. */
.btn-primary {
  background: var(--carolina);
  color: var(--on-accent);
  font-weight: 700;
}
.btn-primary:hover { background: var(--carolina-deep); }

.btn-ghost {
  background: rgba(242, 246, 250, 0.04);
  border-color: rgba(242, 246, 250, 0.28);
  color: var(--chalk);
}
.btn-ghost:hover { border-color: var(--chalk); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 9, 10, 0.94);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 1.3rem;
  line-height: 1;
}

/* CSS-drawn home plate: no image request, and it survives images being blocked. */
.plate {
  width: 20px;
  height: 20px;
  flex: none;
  background: var(--chalk);
  clip-path: polygon(50% 100%, 0 55%, 0 0, 100% 0, 100% 55%);
}
.brand .accent { color: var(--carolina); }

.site-nav { display: none; }

@media (min-width: 900px) {
  .site-nav { display: block; }
  .site-nav ul {
    display: flex;
    gap: var(--s-3);
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .site-nav a {
    display: inline-block;
    padding: 0.5rem 0.25rem;
    font-size: var(--fs-2);
    font-weight: 550;
    color: var(--chalk-dim);
    text-decoration: none;
  }
  .site-nav a:hover { color: var(--chalk); }
}

.header-cta { display: none; }
@media (min-width: 620px) {
  .header-cta { display: inline-flex; min-height: 44px; padding: 0.6rem 1.15rem; }
}

/* ---------- Hero ----------
   Two different compositions, not one compromise:
   - Narrow screens stack a clean photo band above type on solid ground, so the
     photograph is never reduced to texture and contrast never depends on which
     pixel landed behind a word.
   - Wide screens overlay type on the left half, where the scrim is opaque, and
     leave the right half of the photograph almost untouched. */
.hero {
  position: relative;
  isolation: isolate;
  /* Solid base colour so the hero is never a bright void if the photo fails. */
  background: var(--navy-2);
  overflow: hidden;
}

.hero-media { position: relative; height: 42vh; min-height: 250px; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 42%;
}
/* Soft landing from photograph into the page colour. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(var(--scrim), 0.98) 0%,
    rgba(var(--scrim), 0.55) 16%,
    rgba(var(--scrim), 0.1) 46%,
    rgba(var(--scrim), 0.16) 100%
  );
}

.hero-body { padding-block: var(--s-4) var(--s-5); }
.hero-body h1 { margin-block: var(--s-2) var(--s-3); }
/* Full-strength chalk, not the muted tone: on wide screens these runs sit over
   a photograph, where --chalk-dim cannot hold 4.5:1. */
.hero-body .lede { margin-bottom: var(--s-4); color: var(--chalk); }

@media (min-width: 900px) {
  .hero {
    display: flex;
    align-items: center;
    min-height: min(90vh, 840px);
    padding-block: var(--s-6);
  }
  .hero-media {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    z-index: -2;
  }
  /* Subject pushed right, clear of the type column. */
  .hero-media img { object-position: 72% 45%; }
  .hero-media::after { content: none; }

  /* The type column sits entirely inside the opaque band: ~0.94 out to 50% of
     the viewport, then a fast fall so the hitter stays visible. */
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      linear-gradient(
        95deg,
        rgba(var(--scrim), 0.96) 0%,
        rgba(var(--scrim), 0.94) 38%,
        rgba(var(--scrim), 0.88) 50%,
        rgba(var(--scrim), 0.3) 66%,
        rgba(var(--scrim), 0.06) 100%
      ),
      linear-gradient(to top, rgba(var(--scrim), 0.5), rgba(var(--scrim), 0) 55%);
  }
  .hero-body { max-width: 32rem; padding-block: 0; }
}

/* Offering strip — the named formats, no numbers and no claims needing proof. */
.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem var(--s-3);
  margin: var(--s-4) 0 0;
  padding: var(--s-3) 0 0;
  border-top: 1px solid rgba(242, 246, 250, 0.18);
  font-size: var(--fs-2);
  color: var(--chalk);
}
.hero-strip li { list-style: none; }
.hero-strip li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.55rem;
  vertical-align: 0.15em;
  border-radius: 50%;
  background: var(--carolina);
}

/* ---------- Section shell ---------- */
.section { padding-block: var(--s-6); border-top: 1px solid var(--line-soft); }
.section-head { max-width: 60ch; margin-bottom: var(--s-5); }
.section-head h2 { margin-block: var(--s-2) var(--s-3); }
.section-head p { color: var(--chalk-dim); }

/* ---------- Layout A: offering cards with photography ---------- */
/* Explicit column counts: auto-fit dropped the fourth card to its own row at
   1440px, leaving an orphan. */
.card-grid {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--navy-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Featured offering. Cage rental leads the section because search demand for
   cages runs roughly 28x demand for lessons in this metro — cages are the way
   in the door, everything else stacks on top. */
.card-feature { margin-bottom: var(--s-3); }
.card-feature .card-media { aspect-ratio: 16 / 9; }
.card-feature h3 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.96;
  font-size: var(--fs-5);
}
.card-feature .card-body p { font-size: var(--fs-3); }

@media (min-width: 700px) {
  .card-feature { display: grid; grid-template-columns: 1.15fr 1fr; }
  .card-feature .card-media {
    aspect-ratio: auto;
    height: 100%;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
  .card-feature .card-body { justify-content: center; padding: var(--s-4); gap: 0.8rem; }
}

.card-media {
  /* Reserved box: fixes CLS, and gives blocked-image alt text a dark backdrop. */
  aspect-ratio: 4 / 3;
  background: var(--navy-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  color: var(--chalk-dim);
  font-size: var(--fs-2);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: var(--s-3);
  flex: 1;
}
.card-body p { color: var(--chalk-dim); font-size: var(--fs-2); }

.card-ask {
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: var(--fs-2);
  font-weight: 650;
  color: var(--carolina);
  text-decoration: none;
}
.card-ask:hover { text-decoration: underline; }
.card-ask::after { content: " \2192"; }

/* ---------- Layout B: numbered steps, no imagery ---------- */
.steps {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step { border-top: 2px solid var(--line); padding-top: var(--s-3); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--carolina);
  margin-bottom: 0.6rem;
}
.step dt { font-weight: 650; font-size: var(--fs-4); letter-spacing: -0.01em; }
.step dd { margin: 0.5rem 0 0; color: var(--chalk-dim); font-size: var(--fs-2); }

/* ---------- Layout C: asymmetric split ---------- */
.split { display: grid; gap: var(--s-4); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.05fr 0.95fr; gap: var(--s-5); }
}
.split-media {
  aspect-ratio: 3 / 2;
  background: var(--navy-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--chalk-dim);
  font-size: var(--fs-2);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }

.notes { margin: var(--s-3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); }
.notes li { padding-left: 1.6rem; position: relative; color: var(--chalk-dim); }
.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 2px;
  background: var(--carolina);
}
.notes strong { color: var(--chalk); font-weight: 650; }

/* ---------- Layout D: full-bleed contact band ---------- */
.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-2);
  border-top: 1px solid var(--line-soft);
  padding-block: var(--s-6);
}
.band-media { position: absolute; inset: 0; z-index: -2; }
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    92deg,
    rgba(var(--scrim), 0.95) 0%,
    rgba(var(--scrim), 0.9) 46%,
    rgba(var(--scrim), 0.62) 100%
  );
}
.band-body { max-width: 46rem; }
.band-body h2 { margin-bottom: var(--s-3); }
.band-body .lede { margin-bottom: var(--s-4); }

.contact-list {
  margin: var(--s-4) 0 0;
  padding-top: var(--s-3);
  border-top: 1px solid rgba(242, 246, 250, 0.18);
  display: grid;
  gap: var(--s-2);
  font-size: var(--fs-2);
  color: var(--chalk-dim);
}
.contact-list a { color: var(--chalk); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding-block: var(--s-4);
  color: var(--chalk-dim);
  font-size: var(--fs-2);
}
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--chalk); }

/* ---------- 404 ---------- */
.stack {
  min-height: 78vh;
  display: grid;
  /* align-content, not place-content: the shorthand also sets
     justify-content, which sizes the single grid track to max-content and
     centres it, detaching the 404 body from the column .wrap established. */
  align-content: center;
  gap: var(--s-3);
  text-align: left;
  padding-block: var(--s-6);
}

/* ---------- Motion: opt-in only. Nothing animates unless the visitor has
     expressed no preference against it. ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn,
  .site-nav a,
  .card-ask,
  .card {
    transition: background-color 0.16s ease, border-color 0.16s ease,
      color 0.16s ease, transform 0.16s ease;
  }
  .card:hover { transform: translateY(-3px); }
}
