/* ═══════════════════════════════════════════════════════════════
   CAJA redesign sample — design system
   Earthen dojo: dark bark & clay grounds, warm bone text, iron-oxide
   terracotta accent, moss undertones. Low-glare, easy on the eyes.
   Mobile-first; no frameworks, no external assets.
═══════════════════════════════════════════════════════════════ */

:root {
  --paper: #211b15;        /* dark bark ground */
  --paper-2: #2a221a;      /* raised earth strip */
  --card: #2d251d;         /* walnut card */
  --ink: #eae1d1;          /* warm bone text */
  --ink-soft: #c2b6a1;
  --muted: #a0947b;
  --line: #3e3428;
  --accent: #bf5b3d;       /* iron-oxide terracotta */
  --accent-deep: #93402a;
  --accent-text: #e39877;  /* accent used AS text on dark panels */
  --accent-soft: rgba(191, 91, 61, 0.14);
  --paper-glass: rgba(33, 27, 21, 0.88); /* sticky-header ground; color-mix fallback */
  --gold: #c9a25a;         /* ochre */
  --moss: #8a9364;         /* sage/moss secondary */
  --parchment: #f0e7d4;    /* the one light surface: animation panels */
  --parchment-ink: #5c5240;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(10, 8, 5, 0.35);
  --shadow-md: 0 12px 34px rgba(10, 8, 5, 0.45);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino,
    Georgia, "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* seigaiha wave texture, inline — no requests; faint bone ink on bark */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%23eae1d1' stroke-width='1.4'%3E%3Ccircle cx='0' cy='60' r='54'/%3E%3Ccircle cx='0' cy='60' r='40'/%3E%3Ccircle cx='0' cy='60' r='26'/%3E%3Ccircle cx='120' cy='60' r='54'/%3E%3Ccircle cx='120' cy='60' r='40'/%3E%3Ccircle cx='120' cy='60' r='26'/%3E%3Ccircle cx='60' cy='30' r='54'/%3E%3Ccircle cx='60' cy='30' r='40'/%3E%3Ccircle cx='60' cy='30' r='26'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 60px;
  opacity: 0.028;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-text); }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 6px;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.4em; }
h1 { font-size: clamp(38px, 7vw, 64px); font-weight: 800; letter-spacing: -0.5px; }
h1 em { font-style: normal; color: var(--accent-text); }
h2 { font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }

.eyebrow {
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.eyebrow.light { color: #d9c9a8; }

/* keyboard users get a way past the ten header links */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  color: #f7efe0;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ═══════════ Header ═══════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper-glass);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: none; /* never let the nav crush the club name */
}
.brand-mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #f7efe0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(146, 64, 42, 0.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-family: var(--font-display); font-size: 20px; letter-spacing: 1px; }
.brand-text small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* wraps to a tidy right-aligned second row on mid widths instead of
   squeezing links into the brand or word-wrapping the CTA */
.site-nav { display: flex; align-items: center; gap: 2px 3px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 9px;
  border-radius: 10px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--paper-2); }
.site-nav .nav-cta {
  color: #f7efe0;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 4px 14px rgba(146, 64, 42, 0.35);
  margin-left: 6px;
}
.site-nav .nav-cta:hover { filter: brightness(1.08); background: linear-gradient(180deg, var(--accent), var(--accent-deep)); }

.nav-toggle {
  display: none;
  flex: none; /* never let the brand crush the burger on 320px phones */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════ Buttons ═══════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  color: #f7efe0;
  box-shadow: 0 8px 22px rgba(146, 64, 42, 0.4);
}
.btn.ghost { background: transparent; box-shadow: none; }
.btn.light { background: var(--parchment); border-color: transparent; color: #7c341f; }
.btn.small { min-height: 42px; padding: 9px 16px; font-size: 14px; }

/* ═══════════ Sections ═══════════ */

.section { max-width: 1160px; margin: 0 auto; padding: 72px 20px; }
.section.alt {
  max-width: none;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
/* 1120 = 1160 minus the 20px side padding plain sections carry, so the
   content line is identical across alternating section styles */
.section.alt > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-sub { color: var(--ink-soft); font-size: 17px; margin: 0; }

/* ═══════════ Hero ═══════════ */

.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 64px 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: center;
}
.hero-lead { color: var(--ink-soft); font-size: 18px; max-width: 480px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-facts {
  list-style: none;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 0;
  margin: 34px 0 0;
}
.hero-facts li { display: flex; flex-direction: column; max-width: 150px; }
.hero-facts strong { font-family: var(--font-display); font-size: 28px; color: var(--accent-text); }
.hero-facts span { color: var(--muted); font-size: 13px; line-height: 1.4; }

.hero-panel { position: relative; display: grid; gap: 18px; justify-items: center; }
.hero-card {
  background: var(--parchment);
  border: 1px solid #d9cbb0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: rotate(-2.5deg);
  width: min(300px, 90%);
}
.hero-card.offset { transform: rotate(2deg) translateX(26px); }
.hero-card img { width: 100%; height: 210px; object-fit: contain; }
.hero-card span { color: var(--parchment-ink); font-size: 13px; font-weight: 650; }

/* ═══════════ Programs ═══════════ */

.program-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.program-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.program-card p { color: var(--ink-soft); margin: 0; }
.program-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.program-tag.kids { background: rgba(201, 162, 90, 0.16); color: #dcbc80; }
.program-tag.adults { background: var(--accent-soft); color: var(--accent-text); }
.sched { border-collapse: collapse; margin: 8px 0 12px; width: 100%; }
.sched th, .sched td { text-align: left; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.sched th { color: var(--muted); font-weight: 650; padding-right: 18px; white-space: nowrap; }
.sched td { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ═══════════ Split layouts ═══════════ */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}
.split-copy p { color: var(--ink-soft); }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { padding-left: 30px; position: relative; font-weight: 600; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(138, 147, 100, 0.18);
  color: var(--moss);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.device-duo { position: relative; min-height: 340px; }
.device-duo .shot { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-md); }
/* aspect-ratios reserve space before the lazy images load, so anchor
   jumps and scroll positions don't drift as the page fills in */
.device-duo .desktop { width: 92%; aspect-ratio: 1280 / 900; }
.device-duo .phone {
  position: absolute;
  right: -6px;
  bottom: -26px;
  width: 34%;
  border-radius: 22px;
  border: 5px solid #120e0a;
}

.about-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-tile {
  background: var(--parchment);
  border: 1px solid #d9cbb0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 14px 10px;
  text-align: center;
}
.about-tile img { width: 100%; height: 190px; object-fit: contain; }
.about-tile span { color: var(--parchment-ink); font-size: 13px; font-weight: 650; }

.kano-quote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 12px 12px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
}
.kano-quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 13px; color: var(--muted); font-family: var(--font-body); }

/* ═══════════ Etiquette ═══════════ */

.etiquette-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.eti-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.eti-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.eti-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
.eti-card h3 { font-size: 18px; }
.eti-kanji {
  position: absolute;
  top: -14px;
  right: 2px;
  font-family: var(--font-display);
  font-size: 84px;
  font-weight: 800;
  color: var(--ink);
  opacity: 0.07;
  pointer-events: none;
  line-height: 1;
}
.eti-card.accent { background: linear-gradient(180deg, var(--accent-soft), var(--card) 65%); border-color: rgba(191, 91, 61, 0.35); }

/* ═══════════ Belt ranks ═══════════
   Parchment cards (same family as .hero-card / .about-tile) carrying
   CSS-drawn belts: woven texture + stitched edges + a center knot wrap. */

.rank-groups { display: grid; gap: 30px; }
.rank-group-title {
  font-size: 19px;
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.rank-group-title [lang="ja"] { color: var(--accent-text); font-size: 15px; }

.belt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.belt-list.kyu { grid-template-columns: repeat(5, 1fr); }
.belt-list.dan { grid-template-columns: repeat(4, 1fr); }

.belt-card {
  background: var(--parchment);
  border: 1px solid #d9cbb0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.belt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.belt-card strong {
  color: #3f3729;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.15;
}
.belt-sub { color: var(--parchment-ink); font-size: 12px; }

.belt {
  display: block;
  height: 22px;
  border-radius: 4px;
  position: relative;
  border: 1px solid rgba(60, 45, 25, 0.35);
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 7px),
    var(--belt-c, #ccc);
  /* stitched edges, like the rows of stitching on a real judo belt */
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.16),
    inset 0 -3px 0 rgba(0, 0, 0, 0.16);
}
/* the knot wrap at the belt's center */
.belt::after {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 50%;
  width: 18px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.16);
  border-left: 1px solid rgba(0, 0, 0, 0.18);
  border-right: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 2px;
}
.belt-kohaku {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(90deg, #b02832 0 26px, #f2efe6 26px 52px);
}
.belt-kuroaka {
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(90deg, #20201e 0 26px, #b02832 26px 52px);
}

/* ═══════════ Instructors ═══════════ */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.staff-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  text-align: center;
}
.staff-card.lead { grid-column: span 2; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; align-items: center; }
.staff-card.lead h3 { grid-column: 2; margin: 0; }
.staff-card.lead .avatar { grid-row: 1 / 4; width: 84px; height: 84px; font-size: 28px; }
.staff-card.lead .rank { grid-column: 2; }
.staff-card.lead .bio { grid-column: 2; }
.staff-card h3 { font-size: 17px; margin-bottom: 2px; }
.avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #453a2c, #2b241c);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  font-family: var(--font-display);
  border: 3px solid var(--accent);
}
.avatar::after { content: attr(data-initials); }
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--paper); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 50%; }
.rank { color: var(--accent-text); font-size: 12.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 6px; }
.bio { color: var(--ink-soft); font-size: 14px; margin: 0; }
.fineprint { color: var(--muted); font-size: 12.5px; text-align: center; margin-top: 18px; }

.team-banner {
  margin: 0 0 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.team-banner img { width: 100%; max-height: 340px; aspect-ratio: 1800 / 859; object-fit: cover; object-position: center 20%; background: var(--card); }

.spotlight {
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: linear-gradient(120deg, var(--accent-soft), var(--card) 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.spotlight img {
  width: 92px;
  height: 122px;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex: none;
}
.spotlight-text h3 { margin: 0 0 4px; }
.spotlight-text p:last-child { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ═══════════ Camp ═══════════ */

.section.camp { padding-top: 0; }
.camp-card {
  background:
    radial-gradient(700px 320px at 90% -10%, rgba(234, 225, 209, 0.08) 0%, transparent 60%),
    linear-gradient(140deg, #232a1d 0%, #171c13 55%, #2e1d12 100%);
  color: #ece4d2;
  border-radius: 26px;
  border: 1px solid #35402a;
  padding: clamp(28px, 5vw, 54px);
  box-shadow: 0 24px 60px rgba(8, 10, 6, 0.5);
}
.camp-card h2 { color: #f4edda; }
.camp-card p { color: #c4bda7; max-width: 640px; }
.camp-card strong { color: #f4edda; }
.camp-meta { display: flex; gap: 34px; flex-wrap: wrap; margin: 24px 0 26px; }
.camp-meta div { display: flex; flex-direction: column; gap: 2px; }
.camp-meta strong { font-size: 12px; letter-spacing: 1.8px; text-transform: uppercase; color: #8f9678; }
.camp-meta span { font-weight: 700; font-size: 16px; }
.camp-meta a { color: #e0a284; }
/* the camp email is the one unbreakable string wider than a 320px screen */
.camp-meta span, .camp-meta a { overflow-wrap: anywhere; }

/* ═══════════ Sister clubs & community links ═══════════ */

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.r-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
}
.r-body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.r-title { font-weight: 700; font-size: 14.5px; }
.r-url { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════ Contact ═══════════ */

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.contact-label { color: var(--accent-text); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.contact-card strong { font-size: 18px; font-family: var(--font-display); }
.contact-card span:last-child { color: var(--muted); font-size: 14px; }

/* ═══════════ Footer ═══════════ */

.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 34px 20px; text-align: center; color: var(--ink-soft); font-size: 14px; }
.footer-inner p { margin: 4px 0; }

/* ═══════════ Reveal on scroll ═══════════ */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ═══════════ Responsive ═══════════ */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero-panel { grid-auto-flow: column; justify-content: center; }
  .hero-card.offset { transform: rotate(2deg); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .etiquette-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .staff-card.lead { grid-column: 1 / -1; }
  .belt-list.kyu { grid-template-columns: repeat(3, 1fr); }
  .belt-list.dan { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .brand { flex: 0 1 auto; } /* shrink + ellipsize the tagline before anything else gives */
  .site-nav {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 10px;
    display: none;
    z-index: 60;
    /* short viewports (landscape phones, SE-class screens): the menu
       scrolls itself instead of clipping its last links */
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 14px; font-size: 15px; }
  .site-nav .nav-cta { margin-left: 0; text-align: center; justify-content: center; display: flex; }
  .nav-toggle { display: flex; }
  .program-grid { grid-template-columns: 1fr; }
  .etiquette-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 18px; }
  .hero-card { width: min(240px, 100%); }
  .hero-card img { height: 160px; }
  .hero-facts { gap: 20px; }
  .device-duo .phone { width: 38%; right: 0; }
  .about-tile img { height: 150px; }
  .staff-card.lead { grid-template-columns: 1fr; text-align: center; }
  .staff-card.lead .avatar { grid-row: auto; margin: 0 auto 10px; }
  .staff-card.lead h3, .staff-card.lead .rank, .staff-card.lead .bio { grid-column: 1; }
  .team-banner, .spotlight { border-radius: var(--radius-sm); }
  .team-banner img { max-height: 220px; }
  .spotlight { flex-direction: column; align-items: flex-start; }
  .spotlight img { width: 100%; height: 170px; }
  .belt-list.kyu { grid-template-columns: repeat(2, 1fr); }
  .belt-list.dan { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ═══════════ Ippon Toss mini-game ═══════════
   The game (js/judo-game.js) styles itself through these --jg-*
   tokens, so it wears the site's earthen palette. */

:root {
  --jg-accent: var(--accent);
  --jg-accent-text: var(--accent-text);
  --jg-surface: var(--card);
  --jg-text: var(--ink);
  --jg-muted: var(--ink-soft);
  --jg-border: var(--line);
  --jg-radius: var(--radius);
  --jg-gold: var(--gold);
  --jg-font-body: var(--font-body);
  --jg-font-display: var(--font-display);
  --jg-shadow: var(--shadow-md);
}

/* left-aligned like every other section's content; capped so the
   canvas doesn't letterbox on wide screens */
.game-wrap { max-width: 880px; }
.game-wrap .jg-frame { border-color: var(--line); }

/* anchor jumps must clear the sticky header at every breakpoint */
.section, #main { scroll-margin-top: 84px; }
/* mid widths: the nav wraps to a second row and the sticky header grows */
@media (min-width: 781px) and (max-width: 1159px) {
  .section, #main { scroll-margin-top: 126px; }
}
