/* =========================================================
   KMC — Krav Maga Complete
   Shared design tokens & primitives
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Palette — dark base, warm paper, single orange accent */
  --ink: #0A0A0A;
  --ink-2: #141414;
  --ink-3: #1E1E1E;
  --line: #2A2A2A;
  --line-soft: rgba(255,255,255,0.08);
  --paper: #F4F1EC;
  --paper-2: #ECE7DE;
  --paper-line: rgba(10,10,10,0.10);
  --steel: #8A8A8A;
  --steel-2: #B8B8B8;
  --orange: #E87722;
  --orange-hot: #FF8A2E;
  --white: #FFFFFF;

  /* Typography */
  --display: 'Anton', 'Oswald', 'Bebas Neue', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing rail */
  --pad-x: clamp(20px, 4vw, 64px);
  --gutter: clamp(16px, 3vw, 40px);
  --section: clamp(80px, 12vw, 160px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Selection */
::selection { background: var(--orange); color: var(--ink); }

/* =========================================================
   Type scale
   ========================================================= */

.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.9;
  text-transform: uppercase;
}

.h1 { font-family: var(--display); font-weight: 400; line-height: 0.88; text-transform: uppercase; font-size: clamp(44px, 9vw, 144px); letter-spacing: -0.005em; }
.h2 { font-family: var(--display); font-weight: 400; line-height: 0.92; text-transform: uppercase; font-size: clamp(36px, 6vw, 96px); }
.h3 { font-family: var(--display); font-weight: 400; line-height: 0.95; text-transform: uppercase; font-size: clamp(24px, 3.6vw, 52px); }
.h4 { font-family: var(--display); font-weight: 400; line-height: 1.0; text-transform: uppercase; font-size: clamp(20px, 2.2vw, 30px); }

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-2);
}
.eyebrow .num { color: var(--orange); margin-right: 10px; }
.eyebrow .dot { color: var(--orange); }

.lede {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--steel-2);
  max-width: 56ch;
}

.body-lg { font-size: 17px; line-height: 1.6; color: var(--steel-2); }

.hebrew {
  font-family: 'Frank Ruhl Libre', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: 0;
  direction: rtl;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn .arr { display: inline-block; transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(4px); }

.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: var(--orange-hot); }

.btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.25); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.06); }

.btn-ghost-dark { color: var(--ink); border-color: rgba(10,10,10,0.20); }
.btn-ghost-dark:hover { border-color: var(--ink); background: rgba(10,10,10,0.04); }

.btn-sm { padding: 12px 18px; font-size: 11px; }

/* =========================================================
   Layout primitives
   ========================================================= */

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.container-tight {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section { padding: var(--section) 0; }
@media (max-width: 700px) {
  :root { --section: 64px; --pad-x: 20px; }
  .container, .container-tight { padding: 0 20px; }
}

.surface-paper { background: var(--paper); color: var(--ink); }
.surface-paper-2 { background: var(--paper-2); color: var(--ink); }
.surface-ink-2 { background: var(--ink-2); }

/* Hairlines */
.hr { height: 1px; background: var(--line-soft); border: 0; }
.hr-dark { height: 1px; background: var(--paper-line); border: 0; }
.hr-orange { height: 2px; width: 48px; background: var(--orange); border: 0; }

/* Section header pattern */
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
}

/* =========================================================
   NAV
   ========================================================= */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .25s ease, backdrop-filter .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled,
.nav.solid {
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.nav-logo img { height: 56px; width: auto; }
.nav-logo .nav-tag {
  display: block;
  font-family: var(--body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-2);
  border-left: 1px solid var(--line-soft);
  padding-left: 14px;
  line-height: 1.3;
  max-width: 140px;
}
@media (max-width: 600px) {
  .nav-logo .nav-tag { display: none; }
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-2);
  transition: color .15s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px; background: var(--orange);
}
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-burger span { display: block; width: 16px; height: 1.5px; background: var(--white); }

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-cta .btn:not(.cta-mobile) { display: none; }
}
@media (max-width: 480px) {
  .nav { padding: 12px 16px; gap: 12px; }
  .nav-logo img { height: 40px; }
  .nav-cta .btn { padding: 10px 12px; font-size: 10px; }
}

.nav-spacer { height: 80px; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink);
  padding: 24px var(--pad-x);
  transform: translateY(-105%);
  transition: transform .3s ease;
  display: flex; flex-direction: column;
  overflow-y: auto;
  visibility: hidden;
}
.mobile-drawer.open { transform: translateY(0); visibility: visible; }
.mobile-drawer .drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
  flex-shrink: 0;
}
.mobile-drawer .drawer-close {
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.mobile-drawer .drawer-links {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.mobile-drawer .drawer-links a {
  font-family: var(--display);
  font-size: clamp(28px, 7vw, 48px);
  line-height: 1;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-drawer .drawer-links a .num {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--orange);
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  background: var(--ink-2);
  color: var(--steel-2);
  padding: 80px var(--pad-x) 32px;
  border-top: 1px solid var(--line-soft);
}
.footer-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h5 {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 20px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--steel-2);
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--white); }
.footer-col p { margin: 0 0 6px; font-size: 14px; }
.footer-brand .display {
  font-size: 36px;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-brand .hebrew {
  color: var(--orange);
  font-size: 22px;
  margin-bottom: 20px;
}
.footer-bottom {
  max-width: 1600px;
  margin: 0 auto;
  padding-top: 32px;
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-size: 12px;
  color: var(--steel);
  letter-spacing: 0.06em;
}
.footer-disclaimer {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.footer-disclaimer .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(232,119,34,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,119,34,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(232,119,34,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,119,34,0); }
}

/* Built by Mensia footer credit */
.footer-credit {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--steel-2);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.footer-credit:hover { opacity: 1; }
.footer-credit img {
  height: 18px; width: auto; display: block;
}

/* Footer schedule recap */
.footer-schedule {
  max-width: 1600px;
  margin: 0 auto 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line-soft);
  padding-top: 56px;
}
@media (max-width: 900px) { .footer-schedule { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .footer-schedule { grid-template-columns: 1fr; } }
.footer-sched-card {
  border-left: 2px solid var(--orange);
  padding-left: 16px;
}
.footer-sched-card .day {
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 0.04em;
}
.footer-sched-card .venue {
  font-size: 12px;
  color: var(--steel-2);
  margin: 4px 0 12px;
}
.footer-sched-card .slots {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.footer-sched-card .slots span b { color: var(--white); font-weight: 600; }

/* =========================================================
   Vertical labels (issue/section numbering rail)
   ========================================================= */

.vrule {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line-soft);
}
.vrule-paper { background: var(--paper-line); }

.vlabel {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 600;
}

/* =========================================================
   Reveal animations (intersection observer driven)
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Image utilities
   ========================================================= */

.img-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-frame { position: relative; overflow: hidden; background: var(--ink-3); }
.img-frame .label {
  position: absolute;
  bottom: 12px; left: 12px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(6px);
  padding: 6px 10px;
  color: var(--white);
}

/* Duotone treatment for older mid-quality photos */
.duotone {
  filter: grayscale(0.4) contrast(1.05) brightness(0.92);
}
.duotone-deep {
  filter: grayscale(0.6) contrast(1.1) brightness(0.85);
}

/* =========================================================
   Page hero (non-home pages)
   ========================================================= */

.page-hero {
  padding: 200px var(--pad-x) 100px;
  position: relative;
  overflow: hidden;
}
.page-hero .crumb {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 24px;
  font-weight: 600;
}
.page-hero .crumb a { color: var(--steel-2); margin-right: 8px; }
.page-hero h1 { margin: 0; }
.page-hero .meta {
  margin-top: 32px;
  display: flex; gap: 32px; flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-2);
}
.page-hero .meta b { color: var(--white); font-weight: 600; }
