/*
 * Garden City Tile Club landing page.
 *
 * This is the one file that carries brand color decisions for the landing
 * page, the same way src/app/globals.css carries them for the app.
 * scripts/check-theme-containment.sh enforces that; a brand hex written into
 * index.html fails the build.
 *
 * Design notes, so the next person does not undo them by accident:
 *
 * 1. The page is navy end to end. The club's crest is ivory tiles inside a
 *    navy field, and the page repeats that: the four league cards are the only
 *    light objects on it, drawn as mahjong tiles with the crest's gold outline
 *    and a thicker gold foot for the tile's edge.
 * 2. Two voices, each with one job. Playfair Display SC (Hamston's licensed
 *    stand-in since 8/19) is the club's sign painter and
 *    appears only where the crest would speak: the big line, the section
 *    headings, the button, the tile corner marks, the footer wordmark.
 *    Baskerville reads everything else.
 * 3. One accent. Gold carries every emphasis. Sage is hairlines only. The
 *    palette's blush, powder blue, and forest stay in the crest artwork where
 *    the club's designer put them.
 */

/* Hamston retired 2026-08-19: the club's designer contract does not cover web
   use (Joanna's email, 8/19). Playfair Display SC Bold is the approved close
   match: same bold small-caps structure, SIL Open Font License. hamston.ttf
   stays on disk only so cached copies keep resolving. */
@font-face {
  font-family: 'Playfair Display SC';
  src: url('/assets/fonts/playfair-display-sc-700.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('/assets/fonts/libre-baskerville-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('/assets/fonts/libre-baskerville-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette, straight off the club's brand guide. */
  --navy: #132243;
  --navy-deep: #0d1930;
  --navy-lift: #1a2c55;
  --gold: #d29a2e;
  --gold-soft: #eac38a;
  --sage: #a4ae8b;
  --ivory: #f7f4ef;

  --display: 'Playfair Display SC', 'Trebuchet MS', sans-serif;
  --text: 'Libre Baskerville', Georgia, 'Times New Roman', serif;

  --shell: 33rem;
  --gutter: 1.5rem;
}

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

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

body {
  margin: 0;
  background: var(--navy);
  color: var(--ivory);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 0;
  z-index: 10;
  margin: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--gold-soft);
  color: var(--navy);
  font-family: var(--display);
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 4px;
}

/* ── Shared type ──────────────────────────────────────────────────── */

.eyebrow {
  margin: 0;
  color: var(--sage);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
}

.section-title {
  margin: 1rem 0 0;
  color: var(--gold-soft);
  font-family: var(--display);
  font-size: clamp(2.25rem, 11vw, 3.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.95;
}

.section-note {
  margin: 1rem 0 0;
  max-width: 26rem;
  color: rgba(247, 244, 239, 0.72);
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 4.75rem;
}

/* A single warm light behind the crest, so the navy is not a flat wall. */
.hero__glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: 40rem;
  height: 40rem;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(210, 154, 46, 0.2) 0%,
    rgba(210, 154, 46, 0.06) 42%,
    rgba(210, 154, 46, 0) 68%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
}

.hero__crest {
  margin: 0 auto;
  max-width: 14rem;
}

.hero__copy {
  margin-top: 2.25rem;
}

.display {
  margin: 0.875rem 0 0;
  color: var(--ivory);
  font-family: var(--display);
  font-size: clamp(3.25rem, 17vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.88;
}

.lede {
  margin: 1.5rem 0 0;
  max-width: 27rem;
  color: rgba(247, 244, 239, 0.76);
  font-size: 0.9375rem;
  line-height: 1.85;
}

/* ── Call to action ───────────────────────────────────────────────── */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.5rem;
  margin: 2.25rem 0 0;
  padding: 0 0.5rem 0 1.75rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--display);
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  transition: background-color 160ms ease, transform 160ms ease;
}

.cta__chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-soft);
}

.cta:hover {
  background: var(--gold-soft);
}

.cta:active {
  transform: scale(0.985);
}

/* ── Leagues ──────────────────────────────────────────────────────── */

.leagues {
  padding: 1rem 0 4rem;
}

.tiles {
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.875rem;
}

/*
 * A mahjong tile: ivory face, the crest's gold outline, and a heavier gold
 * foot along the bottom edge for the thickness of the tile.
 */
.tile {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.375rem;
  border: 1.5px solid rgba(210, 154, 46, 0.55);
  border-radius: 0.875rem;
  background: var(--ivory);
  box-shadow: 0 4px 0 0 rgba(210, 154, 46, 0.55), 0 14px 28px rgba(0, 0, 0, 0.26);
}

/* The corner mark, the way a tile carries its index. */
.tile__index {
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.tile__name {
  margin: 0.625rem 0 0;
  color: var(--navy);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.tile__when {
  margin: 0.375rem 0 0;
  color: rgba(19, 34, 67, 0.7);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* The lower register: how long the league runs, and how often it meets. */
.tile__run {
  margin: 0.75rem 0 0;
  padding-top: 0.625rem;
  border-top: 1px solid rgba(210, 154, 46, 0.35);
  color: rgba(19, 34, 67, 0.6);
  font-size: 0.75rem;
  line-height: 1.5;
}

.season {
  margin: 1.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(164, 174, 139, 0.28);
  color: var(--gold-soft);
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ── Visit ────────────────────────────────────────────────────────── */

.visit {
  padding: 1rem 0 3.5rem;
}

.visit__inner {
  display: grid;
  gap: 2.25rem;
}

.visit__value {
  margin: 0.875rem 0 0;
  font-size: 1rem;
  line-height: 1.6;
}

.visit__link {
  margin: 0.25rem 0 0;
}

.visit__link a {
  display: inline-block;
  min-height: 2.75rem;
  padding-top: 0.625rem;
  color: var(--gold-soft);
  font-size: 0.9375rem;
  text-decoration-color: rgba(210, 154, 46, 0.5);
  text-underline-offset: 0.3em;
  transition: color 160ms ease;
}

.visit__link a:hover {
  color: var(--gold);
}

/* ── Footer ───────────────────────────────────────────────────────── */

.footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(164, 174, 139, 0.2);
  background: var(--navy-deep);
}

.footer__name {
  margin: 0;
  color: var(--gold-soft);
  font-family: var(--display);
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

.footer__meta {
  margin: 0.5rem 0 0;
  color: rgba(247, 244, 239, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ── Page load ────────────────────────────────────────────────────── */

/*
 * One orchestrated moment, in the hero only. Nothing else on the page moves,
 * and a scroll-triggered version would need JavaScript this page does without.
 */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  animation: rise 620ms cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.reveal--1 {
  animation-duration: 760ms;
}
.reveal--2 {
  animation-delay: 110ms;
}
.reveal--3 {
  animation-delay: 190ms;
}
.reveal--4 {
  animation-delay: 300ms;
}
.reveal--5 {
  animation-delay: 400ms;
}

/* ── Wider screens ────────────────────────────────────────────────── */

@media (min-width: 48rem) {
  :root {
    --shell: 56rem;
    --gutter: 2.5rem;
  }

  .hero {
    padding: 5.5rem 0 6.5rem;
  }

  /* The crest takes the right half and the type hangs off the left edge. */
  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3.5rem;
  }

  .hero__crest {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    max-width: 19rem;
  }

  .hero__copy {
    grid-column: 1;
    grid-row: 1;
    margin-top: 0;
  }

  /* Follow the crest to the right half, so the light sits behind the mark. */
  .hero__glow {
    left: 72%;
  }

  .display {
    letter-spacing: 0;
  }

  .lede {
    font-size: 1.0625rem;
  }

  .leagues {
    padding: 1rem 0 5.5rem;
  }

  .section-note {
    font-size: 1rem;
  }

  /* Four across, so the section shows a hand of four tiles at a glance. */
  .tiles {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2.75rem;
  }

  .tile {
    min-height: 13.5rem;
    padding: 1.375rem 1.25rem;
  }

  .tile__name {
    margin-top: auto;
  }

  .tile__run {
    margin-top: 0.875rem;
  }

  .season {
    margin-top: 2.25rem;
  }

  .visit {
    padding: 1rem 0 5rem;
  }

  .visit__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
  }

  .cta {
    transition: none;
  }
}
