/* ═══════════════════════════════════════════════════════════
   SHAOLIN KUNG FU ACADEMY — SHARED DESIGN SYSTEM
   Source of truth: the design language of index.html
   (colors, Deviantly Brush + Jost, nav, footer, components)
   Used by all subpages: school, apply, success, cancellation,
   privacy-policy, refund-policy, admin.
   ═══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Deviantly Brush';
  src: url('../fonts/deviantly-brush.woff2') format('woff2'),
       url('../fonts/deviantly-brush.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --orange-deep: #C04D27;
  --orange: #E06840;
  --orange-light: #F4825C;
  --black: #000000;
  --ink: #14110F;
  --ink-soft: #3A3530;
  --white: #FFFFFF;
  --paper: #FBF8F5;
  --paper-warm: #F7F0E9;
  --hairline: rgba(192, 77, 39, 0.35);
  --hairline-soft: rgba(20, 17, 15, 0.14);
  --brush: 'Deviantly Brush', cursive;
  --sans: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --hanzi: 'Kaiti SC', 'KaiTi', 'STKaiti', 'Noto Serif SC', serif;
  --shadow-card: 0 18px 50px rgba(20, 17, 15, .18);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--orange); color: var(--white); }

.wrap { width: min(1180px, 92vw); margin: 0 auto; }
.wrap--narrow { width: min(820px, 92vw); margin: 0 auto; }
.brush { font-family: var(--brush); font-weight: normal; line-height: 1.1; }

/* ── Section titles ── */
.sec-title {
  position: relative;
  text-align: center;
  font-size: clamp(38px, 5.2vw, 64px);
  color: var(--orange-deep);
  margin-bottom: 18px;
}
.sec-title .hanzi {
  position: absolute;
  left: 50%; top: 58%;
  transform: translateX(-50%);
  font-family: var(--hanzi);
  font-size: .82em;
  letter-spacing: .25em;
  color: var(--orange-light);
  opacity: .28;
  white-space: nowrap;
  pointer-events: none;
}
.sec-lead {
  text-align: center;
  color: var(--orange);
  font-size: 15px;
  letter-spacing: .04em;
  max-width: 480px;
  margin: 26px auto 0;
}

/* ── CTA links & buttons ── */
.cta-line {
  display: inline-block;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding-bottom: 5px;
  border-bottom: 1.5px solid currentColor;
  transition: color .25s, border-color .25s, transform .25s;
}
.cta-line:hover { color: var(--orange-deep); transform: translateY(-2px); }
.cta-line .arr { display: inline-block; transition: transform .25s; }
.cta-line:hover .arr { transform: translateX(5px); }

.btn-solid {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 16px 38px;
  border: none;
  cursor: pointer;
  transition: background .25s, transform .25s, box-shadow .25s;
  box-shadow: 0 10px 30px rgba(192, 77, 39, .3);
}
.btn-solid:hover { background: var(--orange-deep); transform: translateY(-2px); }
.btn-solid:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }
.reveal.d3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ═══════════ NAV ═══════════ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease;
}
/* NOTE: no backdrop-filter — it creates a containing block that breaks
   the position:fixed mobile menu overlay when the page is scrolled. */
.nav.solid {
  background: rgba(0, 0, 0, .96);
  padding-top: 10px; padding-bottom: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.nav-logo img { height: 52px; width: auto; transition: height .35s; }
.nav.solid .nav-logo img { height: 42px; }
/* Light nav: show the inverse (dark) logo while the bar is transparent */
.nav-logo .logo-dark { display: none; }
.nav--light:not(.solid) .logo-dark { display: block; }
.nav--light:not(.solid) .logo-light { display: none; }
.nav-links {
  display: flex;
  gap: clamp(18px, 2.6vw, 38px);
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--orange);
  transition: width .3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-contact {
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.7);
  padding: 9px 20px;
  transition: background .3s, border-color .3s;
}
.nav-contact:hover { background: var(--orange); border-color: var(--orange); }
.nav-ico { display: inline-flex; color: var(--white); opacity: .85; transition: opacity .25s, color .25s; }
.nav-ico:hover { opacity: 1; color: var(--orange-light); }
.nav-ico svg { width: 18px; height: 18px; }

.burger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 40px; height: 36px;
  position: relative; z-index: 110;
}
.burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  margin: 6px auto;
  transition: transform .3s, opacity .3s;
}
/* Light variant — subpages with a light header area: ink-colored nav while
   the bar is transparent (not scrolled). Turns into the usual black bar on scroll. */
.nav--light:not(.solid) .nav-links a { color: var(--ink); }
.nav--light:not(.solid) .nav-links a::after { background: var(--orange-deep); }
.nav--light:not(.solid) .nav-contact { color: var(--ink); border-color: rgba(20,17,15,.55); }
.nav--light:not(.solid) .nav-contact:hover { color: var(--white); }
.nav--light:not(.solid) .nav-ico { color: var(--ink); }
.nav--light:not(.solid) .burger span { background: var(--ink); }

.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 920px) {
  .burger { display: block; }
  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 104;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateZ(0);
    transition: opacity .35s ease, visibility .35s ease;
  }
  .nav-menu.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-links { flex-direction: column; gap: 26px; }
  .nav-links a { font-size: 17px; color: var(--white) !important; }
  .nav-menu .nav-contact { color: var(--white) !important; border-color: rgba(255,255,255,.7) !important; }
  .nav-menu .nav-ico { color: var(--white) !important; }
  .nav-right { margin-top: 36px; }
}
@media (min-width: 921px) {
  .nav-menu { display: contents; }
}

/* Mobile: smaller nav logo */
@media (max-width: 600px) {
  .nav-logo img { height: 36px; }
  .nav.solid .nav-logo img { height: 31px; }
}

/* ═══════════ PAGE HERO (subpages) ═══════════
   Same background as the page body — no dark band. */
.page-hero {
  background: transparent;
  color: var(--ink);
  text-align: center;
  padding: clamp(120px, 15vw, 170px) 20px clamp(36px, 5vw, 60px);
  position: relative;
  overflow: hidden;
}
.page-hero .brush {
  font-size: clamp(40px, 6vw, 76px);
  color: var(--orange);
  position: relative;
}
.page-hero .hanzi {
  position: absolute;
  left: 50%; top: 62%;
  transform: translateX(-50%);
  font-family: var(--hanzi);
  font-size: .75em;
  letter-spacing: .25em;
  color: var(--orange-light);
  opacity: .22;
  white-space: nowrap;
  pointer-events: none;
}
.page-hero p {
  margin: 18px auto 0;
  max-width: 560px;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 400;
  color: var(--ink-soft);
}

/* ═══════════ FORMS ═══════════ */
.field { margin-bottom: 26px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}
.field .hint { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hairline-soft);
  border-radius: 0;
  padding: 13px 14px;
  transition: border-color .25s, box-shadow .25s;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23C04D27' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(224, 104, 64, .15);
}
.field input.invalid, .field select.invalid { border-color: #B3261E; }
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.check input[type="checkbox"] {
  width: 19px; height: 19px;
  margin-top: 2px;
  accent-color: var(--orange);
  flex: 0 0 auto;
}
.form-error {
  background: #FBEDEA;
  border: 1px solid rgba(179, 38, 30, .4);
  color: #8C1D17;
  font-size: 14.5px;
  padding: 13px 16px;
  margin: 18px 0;
}
.form-note {
  background: var(--paper-warm);
  border: 1px solid var(--hairline);
  font-size: 14.5px;
  color: var(--ink-soft);
  padding: 14px 16px;
  margin: 18px 0;
}

/* ═══════════ TABLES ═══════════ */
.table-wrap { overflow-x: auto; }
table.sys {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.sys th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--orange-deep);
  border-bottom: 1.5px solid var(--hairline);
  padding: 10px 14px;
}
table.sys td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline-soft);
  color: var(--ink-soft);
}
table.sys tr:last-child td { border-bottom: none; }
table.sys td:last-child { color: var(--ink); font-weight: 500; }

/* ═══════════ CONTENT / LEGAL PROSE ═══════════ */
.prose { color: var(--ink-soft); font-size: 16px; }
.prose h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  margin: 44px 0 14px;
}
.prose h3 {
  color: var(--ink);
  font-size: 17.5px;
  font-weight: 700;
  margin: 30px 0 10px;
}
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--orange-deep); border-bottom: 1px solid var(--hairline); transition: color .2s; }
.prose a:hover { color: var(--orange); }
.prose strong { color: var(--ink); }
.prose .muted { font-size: 14px; color: rgba(58, 53, 48, .75); }

/* ═══════════ FOOTER ═══════════ */
.footer {
  background: var(--black);
  color: rgba(255,255,255,.78);
  border-top: 1px solid rgba(224,104,64,.4);
  padding: clamp(60px, 8vw, 90px) 0 0;
  font-size: 14.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(34px, 5vw, 60px);
  padding-bottom: clamp(44px, 6vw, 70px);
}
.footer-brand img { height: 64px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 280px; font-size: 14px; }
.footer h4 {
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 11px; }
.footer a { transition: color .25s; }
.footer a:hover { color: var(--orange-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.14);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
/* Mobile: footer stacks into one column, fully centered */
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-brand img { margin-left: auto; margin-right: auto; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ═══════════ GENERIC PAGE SECTIONS ═══════════ */
.page-section { padding: clamp(60px, 8vw, 100px) 0; }
.page-section--paper { background: var(--paper); }
.page-section--warm { background: var(--paper-warm); }

.frame {
  border: 1px solid var(--hairline);
  padding: clamp(34px, 5vw, 60px) clamp(22px, 4vw, 56px);
}

.kicker {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin-bottom: 10px;
}
