/* ============================================
   Chae Jeong-ho site: shared design system
   ============================================ */

:root {
  /* Neutral base */
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-alt: #f3efe7;
  --ink: #262420;
  --ink-soft: #55524c;
  --ink-faint: #8a867d;
  --border: #e7e2d9;
  --border-soft: #f0ece3;

  /* Spectrum module colors, sampled from the official brand artwork */
  --c-acceptance: #ed3538; /* 수용 */
  --c-change: #f58e34;     /* 변화 */
  --c-connect: #f4c022;    /* 연결 */
  --c-strength: #2b9250;   /* 강점 */
  --c-wisdom: #3188c8;     /* 지혜 */
  --c-soma: #374a9b;       /* 몸 */
  --c-spirit: #6c53a0;     /* 영성 */
  --brand-purple: #a43db4; /* SPECTRUM wordmark purple */

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(38, 36, 32, 0.04), 0 8px 24px rgba(38, 36, 32, 0.06);
  --shadow-hover: 0 2px 4px rgba(38, 36, 32, 0.06), 0 14px 32px rgba(38, 36, 32, 0.10);

  --max-width: 1080px;
  --font-body: "Noto Sans KR", "Pretendard", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: "Hahmlet", "Noto Serif KR", "Noto Sans KR", serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-purple);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

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

/* ---------- Spectrum thread motif ---------- */
.spectrum-thread {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--c-acceptance),
    var(--c-change),
    var(--c-connect),
    var(--c-strength),
    var(--c-wisdom),
    var(--c-soma),
    var(--c-spirit)
  );
}

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand__ko {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.brand__en {
  font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

.main-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.main-nav a:hover {
  background: var(--surface-alt);
  text-decoration: none;
  color: var(--ink);
}
.main-nav a.is-active {
  color: var(--brand-purple);
  font-weight: 700;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 24px 16px;
    gap: 2px;
  }
  .main-nav.is-open { display: flex; }
  .site-header { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero__portrait img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
}
@media (max-width: 760px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__portrait {
    order: -1;
    max-width: 320px;
    margin: 0 auto 8px;
  }
}
.hero__eyebrow {
  color: var(--brand-purple);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero__lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 640px;
}
.hero__actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--ink);
  color: #fff;
}
.btn--primary:hover { background: #3a3730; }
.btn--outline {
  background: transparent;
  border-color: var(--border);
  color: var(--ink);
}
.btn--outline:hover { background: var(--surface-alt); }

.btn--soon {
  background: var(--surface-alt);
  color: var(--ink-faint);
  border: 1px dashed var(--border);
  cursor: default;
}
.btn--soon:hover { text-decoration: none; background: var(--surface-alt); }
.btn--soon .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  display: inline-block;
}

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head__eyebrow {
  color: var(--ink-faint);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head p { color: var(--ink-soft); }

/* ---------- Credential list ---------- */
.credential-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 32px;
}
.credential-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-soft);
  font-size: 0.97rem;
}
@media (max-width: 640px) {
  .credential-list { grid-template-columns: 1fr; }
}

/* ---------- Cards grid (home initiatives) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card__bar {
  height: 5px;
  width: 44px;
  border-radius: 3px;
  margin-bottom: 6px;
}
.card h3 { margin-bottom: 4px; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--brand-purple); text-decoration: none; }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }
.card__tag {
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ---------- Chip row (home initiatives) ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 14px 18px;
  color: var(--ink);
}
.chip:hover { text-decoration: none; background: var(--surface-alt); }
.chip__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chip__label {
  font-size: 0.92rem;
  font-weight: 700;
}

/* ---------- Narrative bio blocks ---------- */
.bio-block { margin-bottom: 44px; }
.bio-block:last-child { margin-bottom: 0; }
.bio-block h2 { margin-bottom: 14px; }
.bio-block p { color: var(--ink-soft); }

.bio-intro p {
  font-size: 1.05rem;
  color: var(--ink);
}

/* ---------- Module cards (SPECTRUM) ---------- */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.module-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  box-shadow: var(--shadow);
}
.module-card__ko {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.module-card__en {
  font-size: 0.8rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.module-card p {
  font-size: 0.92rem;
  opacity: 0.95;
  margin: 0;
}

.m-acceptance { background: var(--c-acceptance); }
.m-change { background: var(--c-change); }
.m-connect { background: var(--c-connect); color: #2b2313; }
.m-connect .module-card__en { opacity: 0.7; }
.m-strength { background: var(--c-strength); }
.m-wisdom { background: var(--c-wisdom); }
.m-soma { background: var(--c-soma); }
.m-spirit { background: var(--c-spirit); }

/* ---------- Trait list (S.P.E.C.T.R.U.M.) ---------- */
.trait-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}
.trait-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.trait-item__letter {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand-purple);
}
.trait-item__body h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.trait-item__body p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Quote block ---------- */
.quote-block {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 32px 36px;
  margin: 40px 0;
}
.quote-block p {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0;
}
.quote-block cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Practice / feature list ---------- */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.feature-list li {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
}

/* ---------- Teaser page (BAMAUM / Optimist School / Optimist Club) ---------- */
.teaser-hero {
  text-align: center;
  padding: 90px 0 70px;
}
.teaser-hero__lede {
  max-width: 560px;
  margin: 0 auto 30px;
  color: var(--ink-soft);
  font-size: 1.08rem;
}
.teaser-hero .btn { margin-top: 4px; }
.teaser-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Logo image block ---------- */
.brand-mark {
  max-width: 340px;
  margin: 0 auto 24px;
}

.diagram-figure {
  max-width: 460px;
  margin: 8px auto 0;
  text-align: center;
}
.diagram-figure figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d8d5cd;
  padding: 48px 0 32px;
  margin-top: 40px;
}
.site-footer a { color: #f1efe9; }
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}
.footer-links a { color: #d8d5cd; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.82rem;
  color: #a29e93;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

/* ---------- Reservation ---------- */
.reserve-hero { padding: 56px 0 8px; text-align: center; }
.reserve-hero__logo { width: min(420px, 100%); height: auto; margin: 0 auto 28px; }
.reserve-hero p { color: var(--ink-soft); max-width: 560px; margin: 0 auto; }

.reserve-card {
  max-width: 640px;
  margin: 32px auto 72px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}
@media (max-width: 640px) { .reserve-card { padding: 24px 18px; } }

.field { margin-bottom: 22px; border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  padding: 0;
}
.field .req { color: var(--c-acceptance); margin-left: 2px; }
.field .hint { font-size: 0.85rem; color: var(--ink-faint); margin-top: 6px; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="date"],
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--brand-purple);
  outline-offset: 1px;
  border-color: transparent;
}

.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
}
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--brand-purple); outline-offset: 2px; }

.consent-box {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 12px;
}
.consent-box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.consent-box dt { font-weight: 500; color: var(--ink); }
.consent-box dd { margin: 0; }
.consent-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.consent-check input { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--brand-purple); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.reserve-submit { width: 100%; justify-content: center; text-align: center; font-size: 1.05rem; padding: 14px; border: 0; cursor: pointer; }
.reserve-submit:disabled { opacity: 0.6; cursor: wait; }

.form-error {
  display: none;
  background: #fdecec;
  color: #a12326;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.form-error.is-visible { display: block; }

.reserve-done { display: none; text-align: center; padding: 24px 0; }
.reserve-done h2 { margin-bottom: 12px; }
.reserve-done p { color: var(--ink-soft); }
.reserve-card.is-done form { display: none; }
.reserve-card.is-done .reserve-done { display: block; }

[hidden] { display: none !important; }

/* Korean text wraps between words, not mid-word. */
body { word-break: keep-all; overflow-wrap: break-word; }

/* ---------- Clinic site ---------- */
.clinic-home { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.clinic-home__main {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 56px; padding: 48px 24px 72px;
}
.clinic-home__logo { width: min(620px, 100%); height: auto; }
.clinic-home__cta { font-size: 1.15rem; padding: 18px 52px; letter-spacing: 0.02em; transition: background 0.2s ease; }
.clinic-home__cta:hover { background: var(--brand-purple); }
.btn:focus-visible { outline: 3px solid var(--brand-purple); outline-offset: 3px; }

/* One orchestrated moment: logo settles in, then the button. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.clinic-home__logo { animation: rise 0.8s ease both; }
.clinic-home__cta { animation: rise 0.8s 0.3s ease both; }
@media (prefers-reduced-motion: reduce) {
  .clinic-home__logo, .clinic-home__cta { animation: none; }
}

.clinic-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.clinic-header__inner { max-width: var(--max-width); margin: 0 auto; padding: 14px 24px; }
.clinic-header img { height: 56px; width: auto; }

.clinic-footer {
  display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 24px; font-size: 0.85rem; color: var(--ink-faint); border-top: 1px solid var(--border-soft);
}
.clinic-footer__admin { color: var(--ink-faint); opacity: 0.6; }
.clinic-footer__admin:hover { opacity: 1; }
