:root {
  color-scheme: light;
  --canvas: #edf1ea;
  --canvas-deep: #e1e8df;
  --surface: #fefefc;
  --ink: #1d2a24;
  --green: #315c3c;
  --green-soft: #dce9dd;
  --line: #d3dcd2;
  --muted: #69736c;
  --shadow: 0 28px 80px rgba(38, 64, 46, .16), 0 2px 8px rgba(38, 64, 46, .08);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    radial-gradient(circle at 72% 16%, rgba(255,255,255,.85), transparent 34rem),
    linear-gradient(135deg, var(--canvas) 0%, #f6f8f3 52%, var(--canvas-deep) 100%);
  font-family: "Plus Jakarta Sans", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, iframe:focus-visible { outline: 3px solid #b98436; outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 100;
  left: 16px;
  top: 12px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 10px;
  color: white;
  background: var(--green);
  transition: transform .2s ease;
}
.skip-link:focus { transform: none; }

.demo-shell { min-height: 100dvh; display: grid; grid-template-columns: 304px minmax(0, 1fr); }
.screen-index {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 100dvh;
  overflow: auto;
  padding: 26px 18px 18px;
  background: rgba(250, 251, 247, .82);
  border-right: 1px solid rgba(82, 106, 89, .16);
  box-shadow: inset -1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(22px) saturate(1.1);
}
.index-header { display: grid; grid-template-columns: 42px 1fr 34px; gap: 11px; align-items: center; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px 14px 14px 6px;
  color: white;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(49,92,60,.2);
  font: 750 11px/1 Geist, ui-monospace, monospace;
  letter-spacing: -.02em;
}
.index-header strong { display: block; font-size: 16px; letter-spacing: -.025em; }
.index-header span { display: block; margin-top: 3px; color: var(--muted); font: 600 10px/1.2 ui-monospace, monospace; letter-spacing: .04em; }
.close-index { display: none; width: 44px; height: 34px; padding: 0; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 650; }
.index-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 24px 2px 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.index-summary span { color: var(--muted); font: 650 9px/1 ui-monospace, monospace; letter-spacing: .12em; }
.index-summary strong { color: var(--green); font: 650 12px/1 ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.screen-index nav { display: grid; gap: 3px; }
.screen-index a {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border-radius: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 560;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
.screen-index a:hover { background: rgba(70,106,79,.08); transform: translateX(2px); }
.screen-index a:active { transform: translateX(2px) scale(.985); }
.screen-index a span { color: var(--muted); font: 600 10px/1.2 ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.screen-index a[aria-current="page"] { color: #173c23; background: var(--green-soft); box-shadow: inset 3px 0 var(--green); }
.screen-index a[aria-current="page"] span { color: var(--green); }
.index-footer { margin: 18px 10px 0; color: var(--muted); font-size: 11px; }

.stage {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(340px, 540px) minmax(375px, 412px);
  justify-content: center;
  align-items: center;
  gap: clamp(44px, 6vw, 104px);
  padding: 28px clamp(28px, 4vw, 72px);
  overflow: hidden;
}
.presentation-copy { min-width: 0; max-width: 580px; }
.presentation-copy h1 {
  max-width: 36rem;
  margin: 0;
  font-family: Geist, "Plus Jakarta Sans", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: clamp(2.5rem, 4.6vw, 5.2rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.inline-course-image {
  display: inline-block;
  width: clamp(72px, 8vw, 126px);
  height: .62em;
  margin: 0 .08em;
  border-radius: 999px;
  vertical-align: .05em;
  background: url("media/stitch-02.jpg") center 64% / cover;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 10px 25px rgba(38,64,46,.18);
}
.presentation-copy > p { max-width: 34rem; margin: 28px 0 0; color: var(--muted); font-size: 16px; line-height: 1.75; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 13px;
  color: white;
  background: var(--green);
  box-shadow: 0 12px 28px rgba(49,92,60,.2);
  text-decoration: none;
  font-weight: 720;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease;
}
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(49,92,60,.26); }
.primary-action:active { transform: translateY(1px) scale(.98); }
.text-action { min-height: 44px; padding: 0; border: 0; color: var(--ink); background: transparent; font-weight: 650; cursor: pointer; border-bottom: 1px solid var(--muted); }
.ia-accordion { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: dense; gap: 5px; margin-top: 44px; transition: grid-template-columns .45s cubic-bezier(.2,.8,.2,1); }
.ia-accordion:has(a:nth-child(1):hover) { grid-template-columns: 1.45fr repeat(4, minmax(0, 1fr)); }
.ia-accordion:has(a:nth-child(2):hover) { grid-template-columns: 1fr 1.45fr repeat(3, minmax(0, 1fr)); }
.ia-accordion:has(a:nth-child(3):hover) { grid-template-columns: repeat(2, minmax(0, 1fr)) 1.45fr repeat(2, minmax(0, 1fr)); }
.ia-accordion:has(a:nth-child(4):hover) { grid-template-columns: repeat(3, minmax(0, 1fr)) 1.45fr 1fr; }
.ia-accordion:has(a:nth-child(5):hover) { grid-template-columns: repeat(4, minmax(0, 1fr)) 1.45fr; }
.ia-accordion a {
  min-width: 0;
  min-height: 104px;
  overflow: hidden;
  padding: 14px 12px;
  border: 1px solid rgba(70,106,79,.16);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(254,254,252,.58);
  text-decoration: none;
  transition: flex .45s cubic-bezier(.2,.8,.2,1), transform .3s ease, background-color .3s ease;
}
.ia-accordion a:hover { transform: translateY(-5px); background: rgba(254,254,252,.94); box-shadow: 0 18px 36px rgba(38,64,46,.1); }
.ia-accordion strong { display: block; font-size: 13px; letter-spacing: -.02em; }
.ia-accordion span { display: block; margin-top: 27px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.demo-bar {
  position: relative;
  z-index: 20;
  width: 100%;
  display: grid;
  grid-template-columns: 40px 1fr auto 40px;
  gap: 10px;
  align-items: center;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid rgba(92,113,97,.2);
  border-radius: 13px;
  color: var(--ink);
  background: rgba(254,254,252,.76);
  box-shadow: 0 5px 20px rgba(38,64,46,.08), inset 0 1px rgba(255,255,255,.9);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
  font-size: 11px;
  font-weight: 700;
}
.icon-button:hover { background: white; transform: translateY(-1px); }
.icon-button:active { transform: translateY(1px) scale(.97); }
.screen-caption { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.screen-caption span { flex: none; color: var(--green); font: 650 10px/1 ui-monospace, monospace; letter-spacing: .04em; }
.screen-caption strong { overflow: hidden; font-size: 14px; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; }
.device-switch { display: flex; padding: 3px; border: 1px solid rgba(92,113,97,.18); border-radius: 11px; background: rgba(254,254,252,.7); backdrop-filter: blur(14px); }
.device-switch button { min-width: 42px; height: 30px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font: 650 10px/1 ui-monospace, monospace; cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.device-switch button[aria-pressed="true"] { color: white; background: var(--green); }
.phone-wrap { display: grid; width: 100%; justify-items: center; gap: 10px; }
.phone-frame {
  position: relative;
  width: min(var(--device-width, 412px), 100%);
  height: min(892px, calc(100dvh - 94px));
  min-height: 620px;
  overflow: hidden;
  background: #f5f7f2;
  border: 1px solid rgba(73,96,80,.26);
  border-radius: 31px;
  box-shadow: var(--shadow), inset 0 0 0 5px rgba(255,255,255,.42);
  transition: width .26s cubic-bezier(.2,.8,.2,1);
}
iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; border-radius: inherit; background: #f5f7f2; transition: opacity .24s ease; }
.frame-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 34px 22px;
  border-radius: inherit;
  background: #f5f7f2;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.frame-loading span { display: block; height: 18px; border-radius: 7px; background: linear-gradient(90deg, #e4e9e1 20%, #f0f3ed 45%, #e4e9e1 70%); background-size: 220% 100%; animation: skeleton-shift 1.3s ease-in-out infinite; }
.frame-loading span:nth-child(1) { width: 34%; height: 12px; }
.frame-loading span:nth-child(2) { width: 72%; height: 30px; margin-top: 8px; }
.frame-loading span:nth-child(3) { width: 100%; height: 180px; margin-top: 12px; border-radius: 18px; }
.frame-loading span:nth-child(4) { width: 82%; }
.frame-loading b { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.phone-frame.is-loading .frame-loading { opacity: 1; visibility: visible; }
.phone-frame.is-loading iframe { opacity: .16; }
iframe.is-entering { animation: screen-enter .36s cubic-bezier(.2,.8,.2,1); }
@keyframes skeleton-shift { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes screen-enter { from { opacity: .18; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stage-note { margin: 0; color: var(--muted); font-size: 11px; }
.scrim { display: none; }

@media (max-width: 820px) {
  .demo-shell { display: block; }
  .stage { display: block; height: 100dvh; padding: 0; }
  .presentation-copy { display: none; }
  .phone-wrap { display: block; height: 100%; padding: 0; }
  .phone-frame { width: 100%; height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .stage-note, .device-switch, .screen-caption, #backButton { display: none; }
  .demo-bar { top: auto; right: max(12px, env(safe-area-inset-right)); bottom: calc(92px + env(safe-area-inset-bottom)); left: auto; width: auto; transform: none; display: block; }
  .menu-button { width: 42px; height: 42px; color: white; border-color: rgba(255,255,255,.2); background: rgba(49,92,60,.92); box-shadow: 0 8px 22px rgba(29,42,36,.24); }
  .screen-index { position: fixed; inset: 0 12% 0 0; height: 100dvh; transform: translateX(-105%); transition: transform .24s cubic-bezier(.2,.8,.2,1); box-shadow: 18px 0 48px rgba(29,42,36,.22); padding-top: max(24px, env(safe-area-inset-top)); }
  .screen-index.is-open { transform: none; }
  .close-index { display: grid; place-items: center; }
  .scrim { position: fixed; z-index: 25; inset: 0; border: 0; background: rgba(20,31,25,.42); backdrop-filter: blur(2px); }
  .scrim.is-open { display: block; }
}

@media (min-width: 821px) and (max-width: 1180px) {
  .stage { grid-template-columns: minmax(375px, 412px); }
  .presentation-copy { display: none; }
}

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