/* =========================================================
   World's Best Taekwondo — styles
   Editorial dojang theme. Bone-white pages, ink type,
   brick-red brand mark, gold dan stripe. No SaaS gradients.
   ========================================================= */

:root {
  /* Surfaces */
  --bone:    #f3ede2;   /* primary page (warm off-white, like a hanji scroll) */
  --bone-2:  #ebe3d3;   /* alt section / table stripes */
  --paper:   #ffffff;   /* card surface */
  --ink:     #111111;   /* primary text + dark sections */
  --ink-2:   #1a1a1a;
  --ink-3:   #2a2a2a;
  --slate:   #4b4b4b;   /* secondary text */
  --slate-2: #6b6760;   /* muted */
  --rule:    #d9d1bf;   /* hairline divider over bone */
  --rule-2:  #2e2e2e;   /* hairline divider over ink */

  /* Brand */
  --brick:        #a8231f;   /* primary accent — deep dojang red */
  --brick-dark:   #841a16;
  --brick-soft:   rgba(168, 35, 31, .12);
  --gold:         #b08a3e;   /* dan stripe */
  --gold-soft:    #d4b06a;

  /* Belt rank colors — used for the rank stripe + dividers */
  --belt-white:  #f4f0e6;
  --belt-yellow: #e8c845;
  --belt-green:  #4f7d3c;
  --belt-blue:   #2c4a78;
  --belt-red:    #a8231f;
  --belt-black:  #111111;

  --radius: 4px;          /* sharp corners; dojangs don't have rounded everything */
  --radius-lg: 6px;
  --shadow-1: 0 1px 0 rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.06);
  --shadow-2: 0 12px 32px rgba(0,0,0,.18);

  --font-display: "Big Shoulders Display", "Oswald", "Impact", "Helvetica Neue Condensed", sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-korean:  "Noto Serif KR", "Nanum Myeongjo", serif;

  --container: 1200px;
  --pad: clamp(1.1rem, 3vw, 2rem);
}

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brick); text-decoration: none; }
a:hover, a:focus-visible { color: var(--brick-dark); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--brick);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--ink); color: var(--bone); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bone);
  padding: .75rem 1rem; z-index: 1000;
  font-weight: 600; letter-spacing: .04em;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

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

/* ---------- Belt-rank stripe (decorative; used between sections) ---------- */

.rank-stripe {
  height: 6px;
  display: flex;
  width: 100%;
}
.rank-stripe span { flex: 1; }
.rank-stripe span:nth-child(1) { background: var(--belt-white); }
.rank-stripe span:nth-child(2) { background: var(--belt-yellow); }
.rank-stripe span:nth-child(3) { background: var(--belt-green); }
.rank-stripe span:nth-child(4) { background: var(--belt-blue); }
.rank-stripe span:nth-child(5) { background: var(--belt-red); }
.rank-stripe span:nth-child(6) { background: var(--belt-black); }

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .005em;
  line-height: .95;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 .5em;
}

h1 { font-size: clamp(3rem, 8vw, 6.5rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: .02em; }
h4 { font-size: 1rem; letter-spacing: .14em; }

h1 .accent, h2 .accent { color: var(--brick); }

p { margin: 0 0 1em; color: var(--slate); }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: var(--ink-3);
  max-width: 56ch;
  line-height: 1.55;
}

/* Section eyebrow — small ink label with thin rule + Korean accent slot */
.eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: var(--ink);
  margin: 0 0 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--brick);
}
.eyebrow .ko {
  font-family: var(--font-korean);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--slate-2);
  font-size: .9rem;
}

.section-head { margin: 0 0 3rem; max-width: 760px; }
.section-head .lede { margin-top: .5rem; }
.section-sub { color: var(--slate); max-width: 60ch; }

.footnote { color: var(--slate-2); font-size: .85rem; margin-top: 1rem; font-style: italic; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem 1.75rem;
  border-radius: 0;                      /* hard corners */
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
  text-decoration: none;
}
.btn-sm { padding: .65rem 1.05rem; font-size: .72rem; letter-spacing: .14em; }
.btn-block { width: 100%; }

.btn-accent {
  background: var(--brick);
  color: var(--bone);
  border-color: var(--brick);
}
.btn-accent:hover { background: var(--ink); border-color: var(--ink); color: var(--bone); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bone); text-decoration: none; }

/* On dark sections */
.on-dark .btn-ghost { color: var(--bone); border-color: var(--bone); }
.on-dark .btn-ghost:hover { background: var(--bone); color: var(--ink); }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 237, 226, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--rule);
  background: rgba(243, 237, 226, .98);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-logo {
  height: 70px;
  width: auto;
  display: inline-block;
  border-radius: 2px;
  flex-shrink: 0;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.15rem;
  letter-spacing: .04em;
  line-height: 1;
}
.brand-text .ko {
  display: block;
  font-family: var(--font-korean);
  font-weight: 500;
  font-size: .72rem;
  color: var(--slate-2);
  margin-top: .2rem;
  letter-spacing: .05em;
}

.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 1.9rem;
}
.primary-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  position: relative;
  padding: .35rem 0;
}
.primary-nav a:hover { color: var(--brick); text-decoration: none; }
.primary-nav a[aria-current="page"] { color: var(--brick); }
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brick);
}
.primary-nav a.btn-accent { color: var(--bone); }
.primary-nav a.btn-accent:hover { color: var(--bone); }
.primary-nav a.btn-accent::after { display: none; }

.nav-toggle {
  display: none;
  background: none; border: 0;
  width: 44px; height: 44px;
  position: relative; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 26px; height: 2px;
  background: var(--ink);
  margin: 5px auto;
  transition: transform .25s ease, opacity .2s ease;
}
.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); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
/* Faint brush-stroke ink mark in the corner */
.hero::after {
  content: "태권도";
  font-family: var(--font-korean);
  font-weight: 700;
  position: fixed;

  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  font-size: clamp(14rem, 28vw, 28rem);
  line-height: 0.8;
  color: var(--ink);
  opacity: 0.035;

  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;

  white-space: nowrap;
  z-index: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-copy h1 { margin: .1em 0 .6em; }
.hero-copy h1 .rule {
  display: block;
  width: 80px; height: 4px;
  background: var(--brick);
  margin: 1.25rem 0;
}

.hero-cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 2rem 0 2.25rem;
}

.hero-facts {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.hero-facts li {
  padding: 1.1rem 1rem 0 0;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column;
  text-align: center;
}
.hero-facts li:last-child { border-right: 0; padding-right: 0; }
.hero-facts strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: .35rem;
}
.hero-facts span {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--slate-2);
  font-weight: 600;
  text-align: center;
}

.hero-art {
  margin: 0;
  position: relative;
}
.hero-gallery {
  position: relative;
  display: grid;
  gap: 1rem;
}
.hero-gallery__viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bone-2);
  border: 1px solid rgba(17, 17, 17, .08);
  box-shadow: var(--shadow-2);
}
.hero-gallery__viewport img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: var(--bone-2);
  cursor: pointer;
  opacity: 1;
  transition: opacity .45s ease;
  will-change: opacity;
}
.hero-gallery:hover .hero-gallery__viewport img {
  opacity: 1;
}
.hero-gallery__viewport img.is-exiting,
.hero-gallery__viewport img.is-exiting-reverse,
.hero-gallery__viewport img.is-entering,
.hero-gallery__viewport img.is-entering-reverse {
  opacity: 0;
}
.hero-gallery__viewport img.is-visible {
  opacity: 1;
}
.hero-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(17, 17, 17, .8);
  color: var(--bone);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.hero-gallery__nav:hover,
.hero-gallery__nav:focus-visible {
  background: rgba(168, 35, 31, .95);
  transform: translateY(-50%) scale(1.03);
}
.hero-gallery__nav--prev { left: .75rem; }
.hero-gallery__nav--next { right: .75rem; }
.hero-gallery__dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
}
.hero-gallery__dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(17, 17, 17, .28);
  cursor: pointer;
}
.hero-gallery__dots button.is-active {
  background: var(--brick);
  transform: scale(1.1);
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: -14px -14px 14px 14px;
  border-top: 3px solid var(--ink);
  border-right: 3px solid var(--ink);
  z-index: -1;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 14px 14px -14px -14px;
  border-bottom: 3px solid var(--brick);
  border-left: 3px solid var(--brick);
  z-index: -1;
}
.hero-art figcaption {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--slate-2);
  margin-top: 1rem;
  font-weight: 600;
}

/* ---------- Section base ---------- */

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  position: relative;
}

/* Alt section (cards/programs) gets the slightly darker bone */
.section.alt { background: var(--bone-2); }

/* Dark inversion */
.section.on-dark {
  background: var(--ink);
  color: var(--bone);
}
.section.on-dark h1,
.section.on-dark h2,
.section.on-dark h3 { color: var(--bone); }
.section.on-dark p { color: #c9c4ba; }
.section.on-dark .eyebrow { color: var(--bone); }
.section.on-dark .eyebrow::before { background: var(--gold-soft); }
.section.on-dark .eyebrow .ko { color: var(--gold-soft); }
.section.on-dark a { color: var(--gold-soft); }
.section.on-dark a:hover { color: var(--bone); }

/* ---------- Values (editorial, NOT 3-icon cards) ---------- */

.values {
  background: var(--bone);
}
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.values-list {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--ink);
}
.values-list li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.values-list .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brick);
  line-height: 1;
}
.values-list h3 {
  margin: 0 0 .35rem;
  font-size: 1.5rem;
  letter-spacing: .04em;
}
.values-list p { margin: 0; color: var(--slate); }

/* ---------- About (tenets) ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.tenets {
  list-style: none; margin: 0; padding: 0;
  border-top: 2px solid var(--ink);
}
.tenets li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--rule);
}
.tenets li:last-child { border-bottom: 2px solid var(--ink); }
.tenets strong {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
}
.tenets .ko {
  font-family: var(--font-korean);
  font-size: 1rem;
  color: var(--brick);
  font-weight: 500;
}

/* ---------- Programs (cards) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--ink);
}

.card-media { position: relative; }
.card-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  filter: grayscale(.1) contrast(1.03);
}
.card-media::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--brick);
}

.card-body { padding: 1.5rem 1.5rem 1.75rem; }
.card-body p { color: var(--slate); margin-bottom: 0; }
.card-meta {
  font-size: .72rem;
  color: var(--slate-2);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 .8rem;
}
.card h3 { margin-bottom: .65rem; }

/* ---------- Instructors ---------- */

.instructor {
  text-align: left;
  padding: 0;
  background: transparent;
  border: 0;
}
.instructor img {
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  border-radius: 0;
  object-fit: cover;
  margin: 0 0 1.1rem;
  filter: grayscale(.4) contrast(1.05);
  transition: filter .3s ease;
}
.instructor:hover img { filter: grayscale(0) contrast(1.05); }
.instructor h3 { margin-bottom: .25rem; }
.instructor .role {
  font-size: .72rem;
  color: var(--brick);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 .75rem;
}
.instructor p { color: var(--slate); }

.instructor-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:2rem;
}

@media (max-width:768px){

    .instructor-grid{

        grid-template-columns:1fr;

    }

}

/* ---------- Schedule (printed-style table) ---------- */

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--paper);
}
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  min-width: 680px;
  color: var(--ink);
}
.schedule-table th,
.schedule-table td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.schedule-table thead th {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .14em;
  font-size: .82rem;
  text-transform: uppercase;
  border-bottom: 0;
}
.schedule-table tbody th {
  background: var(--bone-2);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 1rem;
  color: var(--ink);
  width: 110px;
  text-transform: uppercase;
}
.schedule-table tbody td { color: var(--ink-3); }
.schedule-table tbody tr:nth-child(even) td { background: rgba(0,0,0,.015); }
.schedule-table tr:last-child th,
.schedule-table tr:last-child td { border-bottom: 0; }

/* Tag-like cells */
.schedule-table td:not(:empty) { font-weight: 500; }
.schedule-table td:empty::before {
  content: "—";
  color: var(--slate-2);
}

/* ---------- Testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.quote {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  padding-top: 1.5rem;
  background: transparent;
  position: relative;
}
.quote::before {
  content: "“";
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: .7;
  color: var(--brick);
  position: absolute;
  top: 1rem; left: 0;
  opacity: .3;
  pointer-events: none;
}
.quote blockquote {
  margin: 0 0 1.25rem;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
}
.quote blockquote em { font-style: italic; color: var(--brick); }
.quote figcaption {
  color: var(--slate-2);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
}

/* ---------- Signup ---------- */

.signup {
  background: var(--ink);
  color: var(--bone);
  position: relative;
}
.signup::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg,
    var(--belt-white) 0 16.66%,
    var(--belt-yellow) 16.66% 33.33%,
    var(--belt-green) 33.33% 50%,
    var(--belt-blue) 50% 66.66%,
    var(--belt-red) 66.66% 83.33%,
    var(--belt-black) 83.33% 100%);
}
.signup h1,
.signup h2 { color: var(--bone); font-size: clamp(2.2rem, 5vw, 3.8rem); }
.signup p { color: #c9c4ba; }
.signup .eyebrow { color: var(--bone); }
.signup .eyebrow::before { background: var(--gold-soft); }
.signup .eyebrow .ko { color: var(--gold-soft); }

.signup-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.checklist li {
  position: relative;
  padding: .6rem 0 .6rem 2rem;
  color: #d6d1c6;
  border-bottom: 1px solid var(--rule-2);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.05rem;
  width: 12px; height: 2px;
  background: var(--gold-soft);
}

.signup-form {
  background: var(--bone);
  color: var(--ink);
  padding: 2rem;
  border: 0;
  border-radius: 0;
  box-shadow: var(--shadow-2);
}
.signup-form p { color: var(--slate); }

.field { display: block; margin-bottom: 1.25rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label, legend {
  display: block;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--ink);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
label small { font-weight: 500; color: var(--slate-2); letter-spacing: .04em; text-transform: none; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--slate-2); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brick);
  box-shadow: 0 0 0 3px var(--brick-soft);
}

textarea { resize: vertical; min-height: 96px; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--brick); }

.error {
  color: var(--brick);
  font-size: .82rem;
  margin: .4rem 0 0;
  font-weight: 600;
  min-height: 1.6em;
}

/* Keep the error line's space reserved while hidden: revealing it on blur
   otherwise shifts the submit button out from under an in-flight click. */
.error[hidden] {
  display: block;
  visibility: hidden;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .35rem;
}
.checks label {
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .08em;
  background: var(--bone-2);
  color: var(--ink);
  padding: .55rem .85rem;
  border-radius: 0;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  transition: border-color .15s ease, background .15s ease;
}
.checks label:hover { border-color: var(--ink); }
.checks input { accent-color: var(--brick); }

fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }

.form-status {
  margin: 1rem 0 0;
  font-size: .9rem;
  color: var(--slate);
  font-weight: 600;
}
.form-status.success { color: #2e6b3e; }
.form-status.error   { color: var(--brick); }

/* ---------- Contact ---------- */

.contact { background: var(--bone-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
}
.contact address {
  font-style: normal;
  margin: 0 0 1.25rem;
  color: var(--ink);
  line-height: 1.6;
  font-size: 1.05rem;
}
.contact address strong { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .03em; text-transform: uppercase; }
.contact address .brand-logo { float: left; margin: 0 .9rem .25rem 0; height: 56px; }
.contact .hours {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
}
.contact .hours strong {
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .9rem;
  color: var(--ink);
  margin-bottom: .4rem;
}
.contact a { color: var(--ink); border-bottom: 1px solid var(--brick); }
.contact a:hover { color: var(--brick); text-decoration: none; }

.map {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 420px;
  box-shadow: var(--shadow);
}

.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.modal{

position:fixed;
inset:0;

background:rgba(0,0,0,.65);

display:flex;
align-items:center;
justify-content:center;

z-index:9999;

opacity:0;
visibility:hidden;

transition:.35s;

}

.modal.show{

opacity:1;
visibility:visible;

}

.modal-card{

background:#f3ede2;

color:#111;

padding:50px;

border-radius:20px;

max-width:520px;
width:92%;

text-align:center;

box-shadow:0 25px 80px rgba(0,0,0,.3);

position:relative;

}

.close-modal{

position:absolute;
top:18px;
right:18px;

background:none;
border:none;

font-size:2rem;
cursor:pointer;

}

/* ---------- Page header (sub-pages) ---------- */

.page-header {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--rule);
}
.page-header h1 {
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  margin: 0;
}
.page-header .lede { margin-top: 1rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #b8b3a8;
  padding: 3rem 0 2rem;
  font-size: .88rem;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brick);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.site-footer .brand-logo { display: block; height: 48px; margin-bottom: 1rem; }
.site-footer p { color: #8a857c; }
.site-footer h4 {
  color: var(--bone);
  font-size: .8rem;
  letter-spacing: .18em;
  margin: 0 0 .9rem;
}
.site-footer nav ul,
.site-footer .socials {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: .5rem;
}
.site-footer .socials { gap: .5rem; }
.site-footer a {
  color: #c9c4ba;
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .04em;
}
.site-footer a:hover { color: var(--bone); text-decoration: none; }
.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-2);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .78rem;
  color: #8a857c;
}
.footer-legal .ko {
  font-family: var(--font-korean);
  letter-spacing: .04em;
}

/* ---------- Admin dashboard ---------- */

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}
.admin-toolbar .eyebrow { margin: 0; }

.admin-kpis {
  list-style: none;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.admin-kpis li {
  padding: 1.25rem 1.25rem 1.25rem 0;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}
.admin-kpis li:last-child { border-right: 0; padding-right: 0; }
.admin-kpis strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: .35rem;
}
.admin-kpis span {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--slate-2);
  font-weight: 600;
}

.admin-section { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.admin-section:last-child { margin-bottom: 0; }
.admin-section h3 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  letter-spacing: .04em;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  min-width: 720px;
  color: var(--ink);
  background: var(--paper);
}
.admin-table th,
.admin-table td {
  padding: .9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.admin-table thead th {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .14em;
  font-size: .78rem;
  text-transform: uppercase;
  border-bottom: 0;
}
.admin-table tbody td { color: var(--ink-3); }
.admin-table tbody tr:nth-child(even) td { background: rgba(0,0,0,.015); }
.admin-table tr:last-child td { border-bottom: 0; }

.admin-empty td {
  text-align: center;
  color: var(--slate-2);
  font-style: italic;
  padding: 2rem 1rem;
}

/* Login page — centered card on dark signup background */
.login-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bone);
  color: var(--ink);
  padding: 2.25rem;
  box-shadow: var(--shadow-2);
}
.login-card h2 {
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 .5rem;
}
.login-card p { color: var(--slate); }

@media (max-width: 720px) {
  .admin-kpis { grid-template-columns: 1fr; }
  .admin-kpis li {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 1rem 0;
  }
  .admin-kpis li:last-child { border-bottom: 0; }
}

/* ---------- Email campaign UI ---------- */

/* Status badges */
.campaign-badge {
  display: inline-block;
  padding: .25rem .65rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid currentColor;
}
.badge-draft   { color: var(--slate);      background: transparent; }
.badge-queued  { color: var(--gold);       background: rgba(176,138,62,.1); }
.badge-sending { color: var(--brick);      background: var(--brick-soft); }
.badge-sent    { color: var(--belt-green); background: rgba(79,125,60,.1); }
.badge-failed  { color: #c0392b;           background: rgba(192,57,43,.1); }

/* Campaign table row action links */
.campaign-row-actions { white-space: nowrap; }
.action-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: .85rem;
  color: var(--brick);
  cursor: pointer;
  margin-right: .75rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.action-link:last-child { margin-right: 0; }
.action-danger { color: #c0392b; }
.action-link:hover { opacity: .75; }

/* Campaign editor layout */
.campaign-editor { max-width: 860px; }

.campaign-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-1);
}
.campaign-card-title {
  font-size: 1.15rem;
  font-family: var(--font-display);
  letter-spacing: .06em;
  margin: 0 0 1.25rem;
  color: var(--ink);
  text-transform: uppercase;
}
.campaign-card-title small {
  font-family: var(--font-body);
  font-size: .75rem;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--slate-2);
  font-weight: 400;
}

/* Quill editor customisation */
.quill-editor-wrap { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.quill-editor-wrap .ql-toolbar { background: var(--bone-2); border: none; border-bottom: 1px solid var(--rule); }
.quill-editor-wrap .ql-container { border: none; font-family: var(--font-body); font-size: 16px; min-height: 260px; }
.quill-editor-wrap .ql-editor { min-height: 260px; }

/* Recipient selector */
.source-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}
.source-fieldset legend { font-weight: 600; font-size: .88rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; color: var(--slate); }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .5rem;
  font-size: .95rem;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--brick); flex-shrink: 0; }

/* Filters collapsible */
.filters-section { margin-bottom: 1.25rem; }
.filters-toggle {
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brick);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.filters-toggle::-webkit-details-marker { display: none; }
.filters-badge {
  background: var(--brick);
  color: var(--bone);
  border-radius: 99px;
  padding: .1rem .45rem;
  font-size: .65rem;
}
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding-top: 1rem;
}

/* Recipient count preview */
.recipient-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .85rem 1rem;
  background: var(--bone-2);
  border-radius: var(--radius);
  font-size: .9rem;
}
.recipient-count { color: var(--ink-3); font-weight: 500; }

/* Attachments */
.attachment-zone { display: flex; flex-direction: column; gap: .75rem; }
.attachment-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.attachment-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  background: var(--bone-2);
  border-radius: var(--radius);
  font-size: .88rem;
}
.attachment-name  { flex: 1; word-break: break-all; }
.attachment-size  { color: var(--slate-2); white-space: nowrap; }
.attachment-remove {
  background: none; border: none; cursor: pointer;
  color: var(--slate-2); font-size: 1.1rem; line-height: 1; padding: 0 .25rem;
  transition: color .15s;
}
.attachment-remove:hover { color: #c0392b; }

/* Campaign action bar */
.campaign-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: .5rem;
}
.campaign-actions-right { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Status bar */
.campaign-status-bar {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .9rem;
  font-weight: 500;
}
.status-info    { background: rgba(44,74,120,.1); color: var(--belt-blue); }
.status-success { background: rgba(79,125,60,.1); color: var(--belt-green); }
.status-error   { background: var(--brick-soft);  color: var(--brick-dark); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17,17,17,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  background: var(--bone);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  max-width: 440px; width: 100%;
  box-shadow: var(--shadow-2);
}
.modal-card h3 { margin: 0 0 .6rem; }
.modal-card p  { margin: 0 0 1.25rem; color: var(--slate); }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }

/* Danger button */
.btn-danger {
  background: #c0392b; color: #fff;
  border: 2px solid #c0392b;
  display: inline-flex; align-items: center; justify-content: center;
  padding: .9rem 1.6rem;
  font-family: var(--font-display); font-weight: 700;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; border-radius: var(--radius);
  transition: background .18s;
}
.btn-danger:hover { background: #a93226; border-color: #a93226; }
.btn-danger.btn-sm { padding: .65rem 1.05rem; font-size: .72rem; }

/* Dashboard table row actions — plain table cell like .campaign-row-actions;
   display:flex on a td breaks table-cell layout and misaligns the columns.
   Heading and buttons are centered within the column. */
.admin-table td.row-actions,
.admin-table th.row-actions-head { white-space: nowrap; text-align: center; }
.row-actions .btn + .btn { margin-left: .35rem; }
.admin-table .btn-sm,
.admin-table .btn-danger.btn-sm { padding: .35rem .65rem; font-size: .66rem; letter-spacing: .1em; }

/* Inline error text inside modals */
.modal-error { color: #c0392b; margin: 0 0 1rem; font-size: .9rem; }

/* Enrolled-students search + pager */
.table-toolbar {
  margin-bottom: .9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.table-search {
  width: 100%;
  max-width: 340px;
  padding: .65rem .9rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  font: inherit;
  font-size: .9rem;
  background: var(--paper);
  color: var(--ink);
}
.table-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .9rem;
  margin-top: .9rem;
}
.table-pager-info { font-size: .85rem; color: var(--slate); }

/* Campaign detail — meta grid */
.campaign-meta-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .5rem 1.5rem;
  font-size: .95rem;
}
.campaign-meta-grid dt { color: var(--slate-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.campaign-meta-grid dd { margin: 0; color: var(--ink); }

/* Email preview frame */
.email-preview-frame-wrap { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.email-preview-frame { width: 100%; height: 540px; border: none; background: #fff; }

/* Send progress bar */
.send-progress-bar-wrap {
  height: 8px; background: var(--rule); border-radius: 99px; overflow: hidden; margin-bottom: .5rem;
}
.send-progress-bar {
  height: 100%; background: var(--belt-green); border-radius: 99px;
  transition: width .4s ease;
  width: 0%;
}
.send-progress-label { font-size: .88rem; color: var(--slate); }

/* Unsubscribe page */
.unsub-card {
  max-width: 480px; margin: 0 auto;
  background: var(--paper); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 5vw, 3rem); box-shadow: var(--shadow-2);
  text-align: center;
}
.unsub-icon {
  font-size: 2.5rem; line-height: 1; margin-bottom: 1rem;
  color: var(--slate-2);
}
.unsub-icon--ok  { color: var(--belt-green); }
.unsub-icon--err { color: #c0392b; }
.unsub-note { font-size: .88rem; color: var(--slate-2); margin-bottom: 1.5rem; }

@media (max-width: 600px) {
  .campaign-actions { flex-direction: column; align-items: stretch; }
  .campaign-actions-right { justify-content: flex-end; }
  .filters-grid { grid-template-columns: 1fr; }
  .email-preview-frame { height: 360px; }
}

/* ---------- Reveal-on-scroll (subtle) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .values-grid,
  .signup-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-art { order: -1; max-width: 520px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .map img { min-height: 280px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-2);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .primary-nav.open { max-height: 520px; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 0;
  }
  .primary-nav li { padding: 0 var(--pad); }
  .primary-nav a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: .85rem;
  }
  .primary-nav li:last-child a { border-bottom: 0; }
  .primary-nav a.btn-accent {
    display: inline-flex;
    margin: .8rem 0;
  }
  .primary-nav a[aria-current="page"]::after { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts li {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 1.1rem 0;
  }
  .hero-facts li:last-child { border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

.hero-socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.hero-socials a {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Black & white default look */
  background: #c62828;
  border: 1px solid #c62828;
  color: #ffffff;

  border-radius: 50%;
  transition: all 0.25s ease;
}

.hero-socials a:hover {
  transform: translateY(-2px);

  /* Red & white hover */
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.hero-socials svg {
  width: 40px;
  height: 40px;
}

.qualifications {
  margin-top: 1rem;
  text-align: left;
}

.qualifications summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
  user-select: none;
}

.qualifications summary:hover {
  opacity: 0.8;
}

.qualifications ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.qualifications li {
  margin-bottom: 0.4rem;
}