/* ============ Tokens ============ */
:root {
  --bg: #F3EEE5;          /* page + container share one tone */
  --paper: #FBF8F2;
  --sand: #E8E0D1;
  --line: #DCD2C0;
  --ink: #2B2A26;
  --ink-soft: #6B665C;
  --sage: #8BA38A;
  --sage-deep: #54705A;
  --terra: #C97A5C;
  --terra-soft: #F0D9CC;
  --gold: #B8975A;
  --sky: #CFDCE3;

  --serif-ko: "Gowun Batang", serif;
  --sans-ko: "IBM Plex Sans KR", system-ui, sans-serif;
  --serif-en: "Instrument Serif", "Gowun Batang", serif;

  --w: 480px;
  --gutter: 22px;
  --radius: 22px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans-ko);
  font-weight: 400;
  line-height: 1.65;
  word-break: keep-all;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

.page {
  max-width: var(--w);
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: 120px; /* room for fixed CTA */
  position: relative;
}

/* ============ Brand ============ */
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--terra-soft); color: var(--terra); font-size: 13px;
}
.brand-name { font-family: var(--serif-en); font-size: 22px; letter-spacing: .01em; }
.brand-name em { color: var(--sage-deep); }
.brand-tag {
  margin-left: auto; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); border: 1px solid var(--line); padding: 3px 10px; border-radius: 99px;
}

/* ============ Hero ============ */
.hero { padding: 22px var(--gutter) 0; position: relative; }

.hero-copy { margin-top: 34px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--sage-deep); font-weight: 500;
  background: var(--paper); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 99px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--sage);
  box-shadow: 0 0 0 0 rgba(139,163,138,.6); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(139,163,138,0); } 100% { box-shadow: 0 0 0 0 rgba(139,163,138,0); } }

.hero-title {
  font-family: var(--serif-ko); font-weight: 700;
  font-size: clamp(32px, 9vw, 42px); line-height: 1.28; letter-spacing: -.02em;
  margin-top: 16px;
}
.hero-title i {
  font-family: var(--serif-en); font-weight: 400; font-size: 1.18em;
  color: var(--terra); padding: 0 2px;
}
.hero-title .underline {
  background: linear-gradient(transparent 62%, rgba(139,163,138,.35) 62%, rgba(139,163,138,.35) 90%, transparent 90%);
  background-size: 0% 100%; background-repeat: no-repeat;
  animation: underline 1.2s .9s var(--ease) forwards;
}
@keyframes underline { to { background-size: 100% 100%; } }

/* Hero visual: arch + persiana (Mediterranean shutter) */
.hero-visual { position: relative; margin: 30px auto 0; width: 82%; }
.arch {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 999px 999px 26px 26px;
  background: linear-gradient(#8C7B66, #5E5042);   /* shade seen between slats */
  box-shadow: 0 30px 60px -30px rgba(84,72,50,.45);
  touch-action: pan-y;
}
.arch-base { width: 100%; height: 100%; object-fit: cover; }
.js .arch-base { visibility: hidden; }

.slats {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  perspective: 900px;
}
.slat {
  --t: 90;                                  /* tilt angle in deg, driven by JS */
  flex: 1; position: relative;
  background-image: url("../images/hero.jpg");
  background-size: 100% var(--full);
  background-position: 0 var(--pos);
  transform-origin: 50% 50%;
  transform: rotateX(calc(var(--t) * 1deg));
  backface-visibility: hidden;
  will-change: transform;
}
/* each slat darkens as it turns away from the light, with a thin lit top edge */
.slat::before, .slat::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.slat::before { background: #2B2218; opacity: calc(var(--t) / 120); }
.slat::after  {
  background: linear-gradient(rgba(255,248,232,.55), transparent 22%);
  opacity: calc(var(--t) / 60);
}

/* drifting dappled sunlight, like light through a louvered window */
.sunlight {
  position: absolute; inset: -20%; pointer-events: none;
  background: repeating-linear-gradient(118deg,
    rgba(255,244,220,0) 0 38px,
    rgba(255,244,220,.28) 38px 64px,
    rgba(255,244,220,0) 64px 110px);
  mix-blend-mode: soft-light;
  filter: blur(6px);
  animation: sunDrift 9s ease-in-out infinite alternate;
}
@keyframes sunDrift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }

.arch-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.arch-line path {
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 600; stroke-dashoffset: 600; opacity: .85;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.18));
  animation: draw 2.4s 1.3s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.arch-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  font-size: 11px; color: #fff; white-space: nowrap;
  background: rgba(43,42,38,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 5px 12px; border-radius: 99px; transition: opacity .4s;
}
.arch.touched .arch-hint { opacity: 0; }

.float-card {
  position: absolute; z-index: 2;
  background: rgba(251,248,242,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 14px 30px -14px rgba(84,72,50,.35);
  border-radius: 16px; padding: 10px 14px; font-size: 12px;
  opacity: 0; animation: floatIn .9s var(--ease) forwards, bob 5s ease-in-out infinite;
}
.card-a { left: -13%; top: 22%; display: flex; flex-direction: column; animation-delay: 1.4s, 2.3s; }
.fc-label { font-family: var(--serif-en); font-style: italic; font-size: 13px; color: var(--ink-soft); }
.fc-value { font-weight: 600; color: var(--sage-deep); }
.fc-value b { font-size: 16px; }
.card-b {
  right: -12%; bottom: 18%; display: flex; align-items: center; gap: 10px; line-height: 1.4;
  animation-delay: 1.7s, 2.6s;
}
.card-b i { color: var(--terra); font-size: 18px; }
.card-b b { color: var(--terra); }
@keyframes floatIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bob { 50% { translate: 0 -6px; } }

.seal {
  position: absolute; right: -6%; top: -4%; width: 84px; height: 84px; z-index: 3;
  display: grid; place-items: center;
  background: var(--terra); color: #fff; border-radius: 50%;
  box-shadow: 0 10px 24px -10px rgba(201,122,92,.8);
}
.seal svg { position: absolute; inset: 0; animation: spin 16s linear infinite; }
.seal text { fill: #fff; font-size: 9.2px; letter-spacing: 2.2px; font-family: var(--sans-ko); font-weight: 500; }
.seal > i { font-size: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-lead {
  margin-top: 30px; text-align: center; color: var(--ink-soft); font-size: 15px;
}

.ticker {
  margin: 30px calc(var(--gutter) * -1) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; background: var(--paper);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.ticker span {
  padding: 12px 18px; font-family: var(--serif-en); font-size: 17px; white-space: nowrap; color: var(--ink);
}
.ticker .fa-caret-up { color: var(--sage-deep); font-size: 13px; }
.ticker .fa-circle { color: var(--terra); font-size: 6px; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
.section { padding: 70px var(--gutter) 0; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sec-no { font-family: var(--serif-en); font-size: 15px; color: var(--terra); }
.sec-es {
  font-family: var(--serif-en); font-style: italic; font-size: 15px; color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px; flex: 1;
}
.sec-es::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-title {
  font-family: var(--serif-ko); font-weight: 700; font-size: 27px; line-height: 1.4; letter-spacing: -.02em;
}
.sec-title em { font-style: normal; color: var(--sage-deep); }

h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }

/* reveal */
.reveal > * { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in > * { opacity: 1; transform: none; }
.reveal.in > *:nth-child(2) { transition-delay: .08s; }
.reveal.in > *:nth-child(3) { transition-delay: .16s; }
.reveal.in > *:nth-child(4) { transition-delay: .24s; }

/* 01 Benefits */
.benefit-list { margin-top: 26px; display: grid; gap: 12px; }
.benefit {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.benefit:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -22px rgba(84,72,50,.5); }
.benefit:first-child { background: linear-gradient(135deg, var(--terra-soft), var(--paper) 70%); border-color: #EBCDBD; }
.b-icon {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--bg); color: var(--sage-deep); font-size: 17px;
}
.benefit:first-child .b-icon { background: #fff; color: var(--terra); }
.benefit p { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }
.benefit h3 { padding-right: 52px; }
.b-tag {
  position: absolute; right: 14px; top: 16px;
  font-family: var(--serif-en); font-style: italic; font-size: 13px; color: var(--terra);
}

/* 02 Curriculum */
.steps-figure {
  position: relative; margin-top: 26px; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3;
}
.steps-figure img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-100%); animation: shine 5s 1s ease-in-out infinite;
}
@keyframes shine { 40%, 100% { transform: translateX(100%); } }

.level-list { margin-top: 18px; position: relative; counter-reset: lv; }
.level-list::before {
  content: ""; position: absolute; left: 44px; top: 18px; bottom: 18px; width: 1px;
  background: linear-gradient(var(--sage), var(--terra), #9DB3C2);
}
.level { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; position: relative; }
.lv-badge {
  flex: none; width: 88px; text-align: center; position: relative; z-index: 1;
  font-family: var(--serif-en); font-style: italic; font-size: 15px;
  padding: 5px 0; border-radius: 99px; background: #E3EBE1; color: var(--sage-deep);
}
.level:nth-child(2) .lv-badge { background: var(--terra-soft); color: #A45A3F; }
.level:nth-child(3) .lv-badge { background: var(--sky); color: #4E6B7D; }
.level p { font-size: 13.5px; color: var(--ink-soft); margin-top: 3px; }

/* 03 Method — sliced image reveal */
.slice-figure {
  position: relative; margin-top: 26px; aspect-ratio: 3 / 2;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}
.slice-figure span {
  background: url("../images/study.jpg") no-repeat;
  background-size: 400% 100%;
  background-position: calc(var(--i) * 33.333%) 50%;
  border-radius: 14px;
  transform: translateY(40px); opacity: 0;
  transition: transform 1s var(--ease), opacity 1s var(--ease), border-radius .6s var(--ease);
  transition-delay: calc(var(--i) * .12s);
}
.slice-figure.in span { transform: translateY(calc((var(--i) - 1.5) * var(--wave, 0px))); opacity: 1; }
.slice-figure.joined { gap: 0; }
.slice-figure.joined span { border-radius: 0; transform: none; }
.slice-figure.joined span:first-child { border-radius: 18px 0 0 18px; }
.slice-figure.joined span:last-of-type { border-radius: 0 18px 18px 0; }
.slice-figure { transition: gap .6s var(--ease); }
.slice-figure figcaption {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--serif-en); font-style: italic; font-size: 14px;
  background: rgba(251,248,242,.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 5px 12px; border-radius: 99px;
}
.slice-figure figcaption i { color: var(--terra); font-size: 11px; margin-right: 4px; }

.method-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 16px;
  transition: background .4s, transform .4s var(--ease);
}
.m-item:hover { background: #fff; transform: translateY(-2px); }
.m-item i {
  font-size: 16px; color: var(--sage-deep);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #E3EBE1;
}
.m-item:nth-child(2) i, .m-item:nth-child(3) i { background: var(--terra-soft); color: var(--terra); }
.m-item h3 { margin-top: 12px; font-size: 15px; }
.m-item p { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

/* 04 Flow */
.flow-track {
  margin-top: 26px; display: flex; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 14px;
}
.flow-step { flex: none; width: 78px; text-align: center; position: relative; }
.flow-step > i {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto;
  background: var(--bg); color: var(--sage-deep); font-size: 18px;
}
.fs-num {
  position: absolute; top: -4px; left: 50%; margin-left: 12px;
  width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 600;
  display: grid; place-items: center; background: var(--terra); color: #fff;
}
.flow-step p { font-size: 12.5px; margin-top: 8px; font-weight: 500; }
.flow-line {
  flex: 1; height: 1px; margin-bottom: 26px;
  background-image: linear-gradient(90deg, var(--sage) 50%, transparent 50%);
  background-size: 8px 1px; animation: dash 1s linear infinite;
}
@keyframes dash { to { background-position: 8px 0; } }

.closing {
  margin-top: 16px; position: relative; overflow: hidden;
  border-radius: var(--radius); padding: 30px 24px;
  background: linear-gradient(150deg, #DDE6DA 0%, #EFE7DA 55%, var(--terra-soft) 100%);
}
.closing .fa-quote-left { color: var(--sage-deep); opacity: .5; font-size: 22px; }
.closing p { font-family: var(--serif-ko); font-size: 17px; line-height: 1.7; margin-top: 10px; }
.closing b { color: var(--terra); }
.closing-sign { display: block; margin-top: 14px; font-family: var(--serif-en); font-style: italic; color: var(--ink-soft); }

/* ============ Footer ============ */
.footer { padding: 60px var(--gutter) 0; text-align: center; }
.footer .brand { justify-content: center; }
.notice { margin-top: 14px; font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.legal { margin-top: 16px; display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 12.5px; color: var(--line); }
.legal button { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.legal button:hover { color: var(--terra); }
.copy { margin-top: 10px; font-size: 11px; color: #A39C8E; }

/* ============ Fixed CTA ============ */
.cta-dock {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: var(--w); z-index: 50;
  padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(243,238,229,0), var(--bg) 40%);
  pointer-events: none;
}
.cta-btn {
  pointer-events: auto; position: relative; overflow: hidden;
  width: 100%; height: 58px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--ink); color: #FBF8F2; font-size: 16px; font-weight: 600; letter-spacing: -.01em;
  box-shadow: 0 16px 30px -14px rgba(43,42,38,.6);
  transition: transform .25s var(--ease);
  animation: ctaBreath 2.6s ease-in-out infinite;
}
.cta-btn > .fa-door-open { color: var(--terra-soft); }
.cta-btn:active { transform: scale(.98); }
.cta-arrow {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--terra); font-size: 13px; margin-left: 4px;
  transition: transform .3s var(--ease);
}
.cta-btn:hover .cta-arrow { transform: translateX(4px); }
.cta-shine {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite;
}
@keyframes ctaBreath { 50% { box-shadow: 0 16px 34px -10px rgba(201,122,92,.55); } }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(43,42,38,.4); opacity: 0; transition: opacity .35s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: relative; width: 100%; max-width: var(--w); max-height: 78vh; overflow-y: auto;
  background: var(--paper); border-radius: 26px 26px 0 0; padding: 30px 24px calc(30px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .45s var(--ease);
}
.modal.open .modal-panel { transform: none; }
.modal-panel h3 { font-family: var(--serif-ko); font-size: 21px; font-weight: 700; margin-bottom: 14px; padding-right: 40px; }
.modal-body h4 { font-size: 14px; font-weight: 600; margin-top: 16px; color: var(--sage-deep); }
.modal-body p { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }
.modal-close {
  position: absolute; right: 18px; top: 22px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); color: var(--ink);
}
body.lock { overflow: hidden; }

@media (min-width: 481px) {
  .modal { align-items: center; }
  .modal-panel { border-radius: 26px; transform: translateY(30px); opacity: 0; transition: transform .45s var(--ease), opacity .35s; max-width: 440px; }
  .modal.open .modal-panel { opacity: 1; }
}

@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .card-a { left: -8%; }
  .card-b { right: -8%; }
  .seal { width: 70px; height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
