/* ==========================================================================
   Trilogy Martial Arts - main stylesheet
   ========================================================================== */

@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-var.woff2') format('woff2-variations');
  font-weight: 200 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow-400.woff2') format('woff2');
  font-weight: 400; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow-500.woff2') format('woff2');
  font-weight: 500; font-display: swap; font-style: normal;
}
@font-face {
  font-family: 'Barlow';
  src: url('../fonts/barlow-600.woff2') format('woff2');
  font-weight: 600; font-display: swap; font-style: normal;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600;
  line-height: var(--lh-tight); letter-spacing: var(--tr-display); text-transform: uppercase; }
p { margin: 0 0 var(--s-4); }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: var(--s-3) var(--s-5);
  font-weight: 600;
}
.skip:focus { left: var(--s-4); top: var(--s-4); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }
.section--alt { background: var(--ink-2); }
.prose { max-width: var(--maxw-prose); }

.eyebrow {
  font-family: var(--font-display); font-size: var(--fs-eyebrow); font-weight: 500;
  letter-spacing: var(--tr-eyebrow); text-transform: uppercase;
  color: var(--muted); margin: 0 0 var(--s-4); display: flex; align-items: center; gap: var(--s-3);
}
.eyebrow::before {
  content: ''; width: 26px; height: 2px; background: var(--accent); flex: none;
}

.lead { font-size: var(--fs-lead); color: var(--bone-dim); max-width: 54ch; }

/* ---------- the belt bar: signature divider ---------- */
.beltbar {
  height: 4px; width: 100%; border: 0; margin: 0; display: block;
  background: linear-gradient(90deg,
    var(--belt-white)  0%,  var(--belt-white)  20%,
    var(--belt-blue)   20%, var(--belt-blue)   40%,
    var(--belt-purple) 40%, var(--belt-purple) 60%,
    var(--belt-brown)  60%, var(--belt-brown)  80%,
    var(--belt-black)  80%, var(--belt-black)  95%,
    var(--accent)      95%, var(--accent)      100%);
}
.beltbar--thin { height: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 2rem; border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hi); }
.btn--ghost { background: transparent; color: var(--bone); border-color: var(--line-hi); }
.btn--ghost:hover { border-color: var(--bone); background: rgba(242,240,235,0.06); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-4); }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 90;
  background: rgba(10,10,11,0.90); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr__in { display: flex; align-items: center; gap: var(--s-5); min-height: 74px; }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; margin-right: auto; }
.brand img { width: 42px; height: auto; }
.brand__txt { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.brand__sub {
  font-size: 0.625rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-top: 3px;
}
.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a {
  text-decoration: none; font-family: var(--font-display); font-size: 0.9rem;
  font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bone-dim); padding: var(--s-2) 0; position: relative;
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right var(--dur) var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--bone); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.hdr .btn { padding: 0.72rem 1.35rem; font-size: 0.875rem; }

.burger {
  display: none; background: none; border: 1px solid var(--line-hi); border-radius: var(--radius);
  width: 44px; height: 44px; cursor: pointer; position: relative;
}
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--bone);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding-block: clamp(3.5rem, 8vw, 7rem);
}
.hero__title {
  font-size: var(--fs-hero); font-weight: 700; margin-bottom: var(--s-5);
}
.hero__title em { font-style: normal; color: var(--accent); display: block; }
.hero__lead { font-size: var(--fs-lead); color: var(--bone-dim); max-width: 46ch; margin-bottom: var(--s-6); }
.hero__media { position: relative; }
.hero__media img { border-radius: var(--radius-lg); width: 100%; object-fit: cover; aspect-ratio: 3 / 4; }
.hero__badge {
  position: absolute; left: calc(-1 * var(--s-5)); bottom: var(--s-6);
  background: var(--ink); border: 1px solid var(--line-hi); border-left: 3px solid var(--accent);
  padding: var(--s-4) var(--s-5); box-shadow: var(--shadow); max-width: 240px;
}
.hero__badge strong { display: block; font-family: var(--font-display); font-size: 1.5rem;
  letter-spacing: 0.02em; }
.hero__badge span { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.06em;
  text-transform: uppercase; }
.stars { color: var(--accent); letter-spacing: 2px; font-size: 0.95rem; }

/* ---------- trust strip ---------- */
.trust { background: var(--ink-2); border-block: 1px solid var(--line); }
.trust ul {
  list-style: none; display: grid; grid-template-columns: repeat(5, 1fr);
  gap: var(--s-4); padding-block: var(--s-5); text-align: center;
}
.trust li { font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--bone-dim); }
.trust li span { display: block; color: var(--accent); font-size: 1.35rem; margin-bottom: 2px; }

/* ---------- offer block ---------- */
.offer { background: var(--accent); color: #fff; }
.offer__in { display: grid; grid-template-columns: 1.4fr auto; gap: var(--s-7); align-items: center;
  padding-block: clamp(2.75rem, 5vw, 4rem); }
.offer h2 { font-size: var(--fs-h2); color: #fff; margin-bottom: var(--s-3); }
.offer p { margin: 0; color: rgba(255,255,255,0.9); max-width: 52ch; }
.offer .btn { background: var(--ink); color: var(--bone); }
.offer .btn:hover { background: #000; }

/* ---------- cards ---------- */
.grid { display: grid; gap: var(--s-5); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
a.card:hover { border-color: var(--line-hi); transform: translateY(-4px); }
.card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
a.card:hover .card__img img { transform: scale(1.045); }
.card__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.card__body h3 { font-size: var(--fs-h3); }
.card__body p { color: var(--bone-dim); font-size: var(--fs-sm); margin: 0; }
.card__meta { margin-top: auto; padding-top: var(--s-3); font-family: var(--font-display);
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; }
.feature--flip .feature__media { order: 2; }
.feature__media img { border-radius: var(--radius-lg); width: 100%; }

/* ---------- panorama band ---------- */
.band { position: relative; overflow: hidden; border-block: 1px solid var(--line); }
.band img { width: 100%; height: clamp(260px, 34vw, 460px); object-fit: cover; }
.band__cap {
  position: absolute; inset: auto 0 0 0; padding: var(--gutter);
  background: linear-gradient(to top, rgba(10,10,11,0.92), transparent);
}
.band__cap p { margin: 0; font-family: var(--font-display); letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.85rem; color: var(--bone-dim); }

/* ---------- instructors ---------- */
.person { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; }
.person__img { aspect-ratio: 4 / 5; background: var(--ink-3); overflow: hidden; position: relative; }
.person__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.person__ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #232326, var(--ink-3));
}
.person__ph span { font-family: var(--font-display); font-size: 3.5rem; color: var(--line-hi);
  letter-spacing: 0.05em; }
.person__body { padding: var(--s-5); flex: 1; display: flex; flex-direction: column; }
.person__body h3 { font-size: 1.35rem; margin-bottom: var(--s-1); }
.person__rank { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-3); }
.person__body p { font-size: var(--fs-sm); color: var(--bone-dim); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.chip { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--bone-dim); border: 1px solid var(--line-hi);
  border-radius: 100px; padding: 0.28rem 0.7rem; }
details.bio { margin-top: var(--s-4); }
details.bio summary { cursor: pointer; font-family: var(--font-display); font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
details.bio p { margin-top: var(--s-3); font-size: var(--fs-sm); }

/* ---------- reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.review { background: var(--ink-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.review p { margin: 0; color: var(--bone-dim); font-size: var(--fs-sm); }
.review footer { margin-top: auto; font-family: var(--font-display); font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* ---------- schedule ---------- */
.sched { width: 100%; border-collapse: collapse; }
.sched caption { text-align: left; color: var(--muted); font-size: var(--fs-sm); padding-bottom: var(--s-4); }
.sched th, .sched td { padding: var(--s-4); border-bottom: 1px solid var(--line); text-align: left; }
.sched th { font-family: var(--font-display); font-size: 0.82rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); font-weight: 500; }
.sched td:first-child { font-family: var(--font-display); letter-spacing: 0.06em;
  text-transform: uppercase; }
.sched tr:hover td { background: var(--ink-2); }

/* ---------- video strip ---------- */
.clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.clips video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--ink-3); }

/* ---------- form ---------- */
.formcard {
  background: var(--ink-2); border: 1px solid var(--line-hi); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.75rem); box-shadow: var(--shadow);
}
.formcard h2 { font-size: var(--fs-h2); margin-bottom: var(--s-3); }
.steps { display: flex; gap: var(--s-3); margin-bottom: var(--s-5); }
.steps span {
  flex: 1; height: 3px; background: var(--line); border-radius: 2px; position: relative;
}
.steps span.on { background: var(--accent); }
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-family: var(--font-display); font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone-dim); margin-bottom: var(--s-2); }
.field .opt { color: var(--muted); letter-spacing: 0.06em; }
.field input, .field select {
  width: 100%; background: var(--ink-3); border: 1px solid var(--line-hi); border-radius: var(--radius);
  padding: 0.9rem 1rem; transition: border-color var(--dur) var(--ease);
}
.field input:focus, .field select:focus { border-color: var(--accent); outline: none; }
.field input[aria-invalid="true"] { border-color: var(--accent-hi); }
.err { display: block; color: #FF6B7E; font-size: var(--fs-xs); margin-top: var(--s-2); min-height: 1em; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.formnote { font-size: var(--fs-xs); color: var(--muted); margin: var(--s-4) 0 0; }
.formstep[hidden] { display: none; }
.formmsg { padding: var(--s-4); border-radius: var(--radius); margin-bottom: var(--s-4); font-size: var(--fs-sm); }
.formmsg--err { background: rgba(200,16,46,0.14); border: 1px solid rgba(200,16,46,0.4); }

.spin { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff; border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: var(--s-4) 0; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-size: 1.1rem;
  letter-spacing: 0.02em; text-transform: uppercase; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: var(--s-4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.5rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: var(--s-3) 0 0; color: var(--bone-dim); max-width: var(--maxw-prose); }

/* ---------- location ---------- */
.loc { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.loc dl { margin: 0; display: grid; gap: var(--s-4); }
.loc dt { font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); }
.loc dd { margin: var(--s-1) 0 0; font-size: 1.05rem; }
.loc dd a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--line-hi); }
.loc dd a:hover { border-color: var(--accent); }
.mapbox { position: relative; aspect-ratio: 4 / 3; background: var(--ink-3);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.mapbox iframe { width: 100%; height: 100%; border: 0; }
.mapbox__ph { position: absolute; inset: 0; display: grid; place-items: center; gap: var(--s-4);
  cursor: pointer; background: var(--ink-3); }

/* ---------- footer ---------- */
.ftr { background: var(--ink-2); border-top: 1px solid var(--line); padding-block: var(--s-8) var(--s-6); }
.ftr__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-6); }
.ftr h4 { font-size: 0.8rem; letter-spacing: 0.16em; color: var(--muted); margin-bottom: var(--s-4);
  font-weight: 500; }
.ftr ul { list-style: none; display: grid; gap: var(--s-3); }
.ftr a { text-decoration: none; color: var(--bone-dim); font-size: var(--fs-sm); }
.ftr a:hover { color: var(--bone); }
.ftr__bot { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--muted); }

/* ---------- sticky mobile CTA ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: none;
  gap: 1px; background: var(--line); border-top: 1px solid var(--line-hi);
}
.sticky a {
  flex: 1; text-align: center; padding: 1rem 0.5rem; text-decoration: none;
  font-family: var(--font-display); font-size: 0.9rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.sticky a:first-child { background: var(--ink-2); color: var(--bone); }
.sticky a:last-child { background: var(--accent); color: #fff; }

/* ---------- page header ---------- */
.phead { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line); background: var(--ink-2); }
.phead h1 { font-size: var(--fs-h1); margin-bottom: var(--s-4); }
.crumbs { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--s-5); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--bone); }

.notice { background: rgba(200,16,46,0.10); border: 1px solid rgba(200,16,46,0.35);
  border-radius: var(--radius); padding: var(--s-4) var(--s-5); font-size: var(--fs-sm); }
.notice p:last-child { margin: 0; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(14px); transition: opacity 480ms var(--ease), transform 480ms var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 520px; }
  .hero__badge { left: auto; right: var(--s-5); }
  .grid--3, .reviews { grid-template-columns: repeat(2, 1fr); }
  .trust ul { grid-template-columns: repeat(3, 1fr); }
  .clips { grid-template-columns: repeat(2, 1fr); }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
  .offer__in { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--ink); border-bottom: 1px solid var(--line);
    padding: var(--s-4) var(--gutter) var(--s-6); transform: translateY(-120%);
    transition: transform 340ms var(--ease); max-height: calc(100vh - 74px); overflow-y: auto;
  }
  .nav.open { transform: none; }
  .nav a { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a::after { display: none; }
  .burger { display: block; }
  .hdr .btn--primary { display: none; }
  .sticky { display: flex; }
  body { padding-bottom: 56px; }
  .feature, .loc { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
  .grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .grid--3, .grid--2, .reviews { grid-template-columns: 1fr; }
  .trust ul { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .ftr__grid { grid-template-columns: 1fr; }
  .hero__badge { position: static; margin-top: var(--s-4); max-width: none; }
  .clips { grid-template-columns: 1fr 1fr; }
}

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

@media print {
  .hdr, .sticky, .offer, .formcard { display: none; }
  body { background: #fff; color: #000; }
}
