/* ============================================================
   Intro to Chess - Curriculum
   Brand system: jmineo.com / Jordan Mineo
   ============================================================ */

:root {
  --ink: #10131a;
  --paper: #f3efe2;
  --paper-line: #d9d2bd;
  --plasma: #ff3d8b;
  --plasma-deep: #c81e63;
  --volt: #5ef2c4;
  --volt-deep: #1bbf8f;
  --beaker: #3b5bff;
  --amber: #ffb627;
  --grid: rgba(16,19,26,0.06);
  --white: #ffffff;
  --muted: #55524a;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 14px;
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--white); padding: 12px 20px;
  font-family: var(--font-mono); font-size: 12px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============ HEADER / NAV ============ */
.site-header {
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-brand { display: flex; flex-direction: column; gap: 1px; text-decoration: none; color: var(--ink); }
.nav-brand .eyebrow {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--plasma-deep);
}
.nav-brand .name {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  line-height: 1; letter-spacing: -0.02em;
}
.nav-brand .name .accent { color: var(--plasma); }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  padding: 7px 12px; border-radius: 8px; transition: background .12s ease;
}
.nav-links a:hover { background: var(--white); }
.nav-links a.active { background: var(--ink); color: var(--white); }
.nav-toggle {
  display: none; background: var(--white); border: 2px solid var(--ink);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 16px;
  box-shadow: var(--shadow-sm);
}

/* ============ LAYOUT ============ */
.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 40px 24px 80px; }

/* ============ HERO ============ */
.hero { margin-bottom: 40px; }
.hero .eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--plasma-deep); margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.hero h1 .accent { color: var(--plasma); }
.hero .lede {
  font-size: clamp(15px, 2vw, 19px); line-height: 1.55; color: var(--muted);
  max-width: 42em;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 20px;
}
.breadcrumb a { color: var(--ink); text-decoration: none; }
.breadcrumb a:hover { color: var(--plasma-deep); }
.breadcrumb span { margin: 0 8px; }

/* ============ CARDS ============ */
.card {
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card-grid { display: grid; gap: 20px; }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Week navigation cards */
.week-card {
  display: block; color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .1s ease, box-shadow .1s ease;
  position: relative; overflow: hidden;
}
.week-card:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.week-card .wk-title-link { color: var(--ink); text-decoration: none; }
.week-card .wk-title-link:hover { color: var(--plasma-deep); }
.week-card .wk-days a {
  font-family: var(--font-mono); font-size: 10px; padding: 3px 8px;
  border: 1.5px solid var(--ink); border-radius: 6px; background: var(--paper);
  text-decoration: none; color: var(--ink); transition: background .1s ease;
}
.week-card .wk-days a:hover { background: var(--volt); }
.week-card .wk-num {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--plasma-deep); margin-bottom: 8px;
}
.week-card h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  line-height: 1.1; margin-bottom: 8px;
}
.week-card p { font-size: 13px; color: var(--muted); line-height: 1.45; }
.week-card .wk-tag {
  display: inline-block; margin-top: 12px; font-family: var(--font-mono);
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border: 1.5px solid var(--ink); border-radius: 20px;
}
.week-card .wk-days { display: flex; gap: 6px; margin-top: 12px; }

/* accent variants for phases */
.phase-learn .wk-num { color: var(--beaker); }
.phase-notation .wk-num { color: var(--plasma-deep); }
.phase-play .wk-num { color: var(--volt-deep); }
.phase-tournament .wk-num { color: var(--amber); }

/* ============ EYEBROW SECTION HEADERS ============ */
.section-head {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink); margin: 48px 0 20px;
  display: flex; align-items: center; gap: 14px;
}
.section-head::after { content: ''; flex: 1; height: 2px; background: var(--ink); }
.section-head:first-child { margin-top: 0; }

/* ============ DAY PAGE BLOCKS ============ */
.day-header {
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--ink);
  color: var(--paper); padding: 28px; margin-bottom: 32px; box-shadow: var(--shadow);
}
.day-header .eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--volt); margin-bottom: 10px;
}
.day-header h1 {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 14px; color: var(--paper);
}
.day-header .day-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.day-header .day-meta span {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 6px 12px; border: 1.5px solid var(--paper);
  border-radius: 20px; color: var(--paper);
}

/* Objective callout */
.objective {
  background: var(--white); border: 2px solid var(--ink); border-left: 8px solid var(--volt);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.objective .label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--volt-deep); margin-bottom: 6px;
}
.objective p { font-size: 16px; font-weight: 500; }

/* Block (timed segment) */
.block {
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.block-head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 2px dotted var(--paper-line);
}
.block-time {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em; background: var(--ink); color: var(--paper);
  padding: 5px 10px; border-radius: 6px; white-space: nowrap;
}
.block-title {
  font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.1;
}
.block-body p { margin-bottom: 12px; }
.block-body p:last-child { margin-bottom: 0; }
.block-body ul, .block-body ol { margin: 12px 0 12px 22px; }
.block-body li { margin-bottom: 8px; }
.block-body strong { font-weight: 600; }

/* Teacher script callout */
.script {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 10px;
  padding: 16px 18px; margin: 16px 0; position: relative;
}
.script::before {
  content: 'SAY'; position: absolute; top: -10px; left: 14px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  background: var(--plasma); color: var(--white); padding: 3px 8px; border-radius: 4px;
}
.script p { font-style: italic; margin-bottom: 8px; }
.script p:last-child { margin-bottom: 0; }

/* Teacher note / learning-with callout */
.note {
  background: #fff; border: 2px solid var(--beaker); border-radius: 10px;
  padding: 16px 18px; margin: 16px 0; position: relative;
}
.note::before {
  content: 'TEACHER NOTE'; position: absolute; top: -10px; left: 14px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  background: var(--beaker); color: var(--white); padding: 3px 8px; border-radius: 4px;
}
.note.new-to-chess::before { content: 'NEW TO CHESS?'; background: var(--volt-deep); }
.note.watch-for::before { content: 'WATCH FOR'; background: var(--amber); color: var(--ink); }

/* Rule box (piece movement etc) */
.rule-box {
  background: var(--white); border: 2px solid var(--ink); border-radius: 10px;
  padding: 18px 20px; margin: 16px 0; box-shadow: var(--shadow-sm);
}
.rule-box .rule-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--plasma-deep); margin-bottom: 10px;
}
.rule-box ul { list-style: none; margin-left: 0; }
.rule-box li { padding-left: 24px; position: relative; margin-bottom: 10px; }
.rule-box li::before {
  content: '\2192'; position: absolute; left: 0; color: var(--plasma);
  font-weight: 700; font-size: 16px;
}

/* Growth mindset callout */
.growth {
  background: linear-gradient(0deg, var(--white), var(--white)); border: 2px solid var(--ink);
  border-radius: 10px; padding: 18px 20px; margin: 16px 0; position: relative;
  box-shadow: 4px 4px 0 var(--volt);
}
.growth::before {
  content: 'GROWTH MINDSET'; position: absolute; top: -10px; left: 14px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  background: var(--volt); color: var(--ink); padding: 3px 8px; border-radius: 4px;
}

/* Activity callout */
.activity {
  background: #fff; border: 2px dashed var(--ink); border-radius: 10px;
  padding: 18px 20px; margin: 16px 0; position: relative;
}
.activity::before {
  content: 'ACTIVITY'; position: absolute; top: -10px; left: 14px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  background: var(--amber); color: var(--ink); padding: 3px 8px; border-radius: 4px;
}
.activity h4 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-bottom: 8px; }

/* ============ CHESSBOARD ============ */
.board-figure { margin: 24px 0; }
.board-mount {
  width: 100%; max-width: 400px; margin: 0 auto;
  border: 2px solid var(--ink); border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.board-figure figcaption {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em;
  text-align: center; margin-top: 12px; color: var(--muted);
}
.board-controls {
  display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap;
}
.board-btn {
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  padding: 8px 14px; border: 2px solid var(--ink); border-radius: 8px;
  background: var(--white); cursor: pointer; color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); transition: all .08s ease;
}
.board-btn:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.board-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.board-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.move-caption {
  font-family: var(--font-mono); font-size: 12px; text-align: center; margin-top: 12px;
  min-height: 18px; color: var(--ink);
}

/* ============ NAV FOOTER (prev/next day) ============ */
.day-nav {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 40px;
}
.day-nav a {
  flex: 1; text-decoration: none; color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow-sm); transition: all .1s ease;
}
.day-nav a:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.day-nav a.next { text-align: right; }
.day-nav .dir {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.day-nav .lbl { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.day-nav a.disabled { opacity: 0.35; pointer-events: none; }

/* ============ TABLES ============ */
.data-table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden;
}
.data-table th {
  background: var(--ink); color: var(--paper); font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 14px; text-align: left;
}
.data-table td { padding: 12px 14px; border-bottom: 1.5px solid var(--paper-line); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: rgba(16,19,26,0.02); }

/* Piece value chips */
.value-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.value-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--white); border: 2px solid var(--ink); border-radius: 10px;
  padding: 8px 14px; box-shadow: 3px 3px 0 var(--ink);
}
.value-chip .glyph { font-size: 24px; line-height: 1; }
.value-chip .val { font-family: var(--font-mono); font-weight: 500; font-size: 14px; }
.value-chip .nm { font-size: 12px; color: var(--muted); }

/* ============ CALLOUT LINK CARD ============ */
.link-card {
  position: relative;
  display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink);
  background: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 20px 24px; margin: 20px 0; box-shadow: var(--shadow); transition: all .1s ease;
}
.link-card > a[aria-label] { border-radius: var(--radius); }
.link-card:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.link-card .lc-body { flex: 1; }
.link-card .lc-eyebrow {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--volt); margin-bottom: 4px;
}
.link-card h4 { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--paper); margin-bottom: 4px; }
.link-card p { font-size: 13px; color: rgba(243,239,226,0.75); }
.link-card .lc-arrow { font-size: 24px; color: var(--volt); }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 2px solid var(--ink); background: var(--paper);
  padding: 32px 24px;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-inner .brand { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  padding: 8px 14px; border: 2px solid var(--ink); border-radius: 8px;
  background: var(--white); box-shadow: 3px 3px 0 var(--ink); transition: all .08s ease;
}
.footer-links a:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 var(--ink); }
.footer-copy { font-family: var(--font-mono); font-size: 11px; color: var(--muted); width: 100%; text-align: center; margin-top: 8px; }
.footer-copy a { color: var(--ink); }

/* ============ UTILITY ============ */
.pill {
  display: inline-block; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px;
  border: 1.5px solid var(--ink); border-radius: 20px;
}
.pill-plasma { background: var(--plasma); color: var(--white); border-color: var(--plasma-deep); }
.pill-volt { background: var(--volt); color: var(--ink); }
.pill-beaker { background: var(--beaker); color: var(--white); }
.pill-amber { background: var(--amber); color: var(--ink); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-lg { margin-bottom: 40px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .card-grid.cols-2, .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .setup-grid, .board-layout { grid-template-columns: 1fr !important; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; margin-top: 12px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border: 1.5px solid var(--paper-line); }
  .nav-toggle { display: block; }
  .nav-inner { flex-wrap: wrap; }
  .day-nav { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ============ PRINT ============ */
@media print {
  .site-header, .site-footer, .day-nav, .board-controls, .nav-toggle { display: none; }
  body { background: #fff; }
  .card, .block, .day-header { box-shadow: none; break-inside: avoid; }
  .day-header { background: #fff; color: #000; border: 2px solid #000; }
  .day-header h1, .day-header .eyebrow, .day-header .day-meta span { color: #000; }
}
