@import url("/tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.55; -webkit-font-smoothing: antialiased; }
body, button, input, textarea, select { font-family: var(--font); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
img { max-width: 100%; }
::selection { color: #fff; background: var(--red); }

.site-header, header { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1240px) / 2)); background: rgba(247, 247, 245, .78); border-bottom: 1px solid rgba(17, 17, 19, .07); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 750; letter-spacing: -.02em; }
.brand img, header > a img { display: block; width: 96px; height: 27px; object-fit: contain; object-position: left center; }
.site-header nav, header nav { display: flex; align-items: center; gap: 26px; }
.site-header nav a, header nav a { font-size: 13px; color: var(--ink-2); transition: color .2s ease, opacity .2s ease; }
.site-header nav a:hover, header nav a:hover { color: var(--red); }
.nav-cta { padding: 8px 15px; color: #fff !important; background: var(--ink); border-radius: 999px; }
.nav-cta:hover { background: var(--red); }

.eyebrow { margin: 0 0 18px; color: var(--red); font-size: 13px; line-height: 1; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.display { margin: 0; font-size: clamp(54px, 9.4vw, 132px); line-height: .93; letter-spacing: -.072em; font-weight: 780; }
.section-title { margin: 0; max-width: 900px; font-size: clamp(39px, 6.4vw, 86px); line-height: 1.02; letter-spacing: -.055em; font-weight: 760; word-break: keep-all; }
.lede { margin: 28px 0 0; max-width: 620px; color: var(--muted); font-size: clamp(18px, 2vw, 24px); line-height: 1.55; letter-spacing: -.025em; word-break: keep-all; }
.button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border: 0; border-radius: 999px; color: #fff; background: var(--red); font-weight: 720; font-size: 15px; cursor: pointer; transition: transform .25s var(--ease), background .25s ease, box-shadow .25s ease; }
.button::after, .btn::after { content: "↗"; font-size: 14px; }
.button:hover, .btn:hover { transform: translateY(-2px); background: var(--red-deep); box-shadow: 0 12px 32px rgba(166, 25, 46, .22); }
.button:focus-visible, .kakao-btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(166, 25, 46, .28); outline-offset: 3px; }

/* Landing */
.home-main { overflow-x: clip; }
.hero { position: relative; width: var(--page); min-height: 100svh; margin: 0 auto; padding: clamp(72px,9svh,104px) 0 clamp(28px,5svh,52px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(6px,1.6svh,16px); }
.hero-copy { position: relative; z-index: 2; }
.hero .display { font-size: clamp(42px, 6.2vw, 88px); line-height: .95; margin-top: clamp(2px,1svh,10px); }
.hero-lede { margin-top: clamp(10px,1.8svh,20px); max-width: 34em; color: var(--muted); font-size: clamp(14px,1.6vw,17px); line-height: 1.6; word-break: keep-all; }
.hero .lede { max-width: 570px; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: clamp(14px,2svh,26px); }
.hero-note { color: var(--muted); font-size: 13px; margin-top: 16px; }
.hero-stage { position: relative; width: min(760px, 92vw); height: clamp(180px, 30svh, 300px); margin: 0 auto; perspective: 900px; isolation: isolate; }
.scroll-cue { position: absolute; bottom: 30px; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font: 10px/1 var(--mono); letter-spacing: .12em; transform: translateX(-50%); }
.scroll-cue::after { content: ""; width: 1px; height: 28px; background: var(--line); animation: breathe 1.8s ease-in-out infinite; }

.manifesto { position: relative; height: 280vh; color: #fff; background: var(--black); }
.manifesto-inner { position: sticky; top: 0; min-height: 100svh; width: var(--page); margin: 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.manifesto .eyebrow { color: #d75a6e; }
.manifesto-copy { margin: 0 auto; max-width: 1080px; font-size: clamp(40px, 7vw, 96px); line-height: 1.04; letter-spacing: -.058em; font-weight: 720; word-break: keep-all; }
.manifesto-copy .thought { display: inline-block; transform-origin: center; will-change: transform, opacity; }
.manifesto-copy .thought-alone { opacity: var(--a1, 1); transform: scale(var(--s1, 1)); filter: blur(var(--b1, 0px)); }
.manifesto-copy .thought-together { opacity: var(--a2, .5); transform: scale(var(--s2, .98)); }

.story { width: var(--page); margin: 0 auto; padding: 160px 0; }
.story-head { display: flex; justify-content: space-between; align-items: end; gap: 48px; margin-bottom: 90px; }
.story-head .lede { margin: 0 0 8px; max-width: 390px; }
.activity-list { border-top: 1px solid var(--line); }
.activity { display: grid; grid-template-columns: 110px minmax(200px, .65fr) minmax(260px, 1fr); gap: 34px; padding: 48px 0; border-bottom: 1px solid var(--line); align-items: start; }
.activity-num { color: var(--red); font: 12px/1 var(--mono); }
.activity h3 { margin: -7px 0 0; font-size: clamp(28px, 3.3vw, 44px); line-height: 1.1; letter-spacing: -.045em; }
.activity p { margin: 0; max-width: 520px; color: var(--muted); font-size: 18px; word-break: keep-all; }

.server-stage { position: relative; width: var(--page); min-height: 680px; margin: 0 auto 160px; padding: clamp(44px, 8vw, 96px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border-radius: var(--radius-l); color: #fff; background: var(--red); }
.server-stage::after { content: "KNET"; position: absolute; right: -3%; bottom: -18%; color: rgba(255,255,255,.09); font-size: clamp(150px, 29vw, 410px); font-weight: 800; letter-spacing: -.09em; line-height: 1; }
.server-stage .eyebrow { color: #f6bec8; }
.server-stage .section-title { position: relative; z-index: 2; max-width: 800px; }
.terminal { position: relative; z-index: 2; align-self: end; width: min(520px, 100%); margin-top: 120px; padding: 22px 24px; border: 1px solid rgba(255,255,255,.24); border-radius: 20px; background: rgba(59, 0, 11, .34); box-shadow: 0 28px 70px rgba(70,0,12,.24); backdrop-filter: blur(18px); font: 12px/1.85 var(--mono); color: #ffdce2; }
.terminal b { color: #fff; font-weight: 500; }
.terminal-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px #fff; }

.server-note { margin-top: 26px; max-width: 34em; font-size: 15px; line-height: 1.7; color: #6e6e73; }

.process { width: var(--page); margin: 0 auto; padding: 20px 0 170px; }
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 78px; border-top: 1px solid var(--line); }
.process-step { position: relative; padding: 32px 32px 0 0; }
.process-step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.process-step small { color: var(--red); font: 12px var(--mono); }
.process-step h3 { margin: 18px 0 8px; font-size: 24px; letter-spacing: -.035em; }
.process-step p { margin: 0; color: var(--muted); font-size: 15px; }

.closing { width: var(--page); min-height: 74svh; margin: 0 auto 24px; padding: 100px 40px; display: grid; place-items: center; text-align: center; border-radius: var(--radius-l); background: #fff; }
.closing .section-title { max-width: 900px; }
.closing .button { margin-top: 38px; }
footer { width: var(--page); margin: 0 auto; padding: 38px 0 44px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.footer-contact { display: flex; gap: 14px; align-items: baseline; }
.footer-contact a { color: inherit; }
.footer-contact a:hover { color: var(--accent, #a6192e); }

/* Application */
.apply-page { min-height: 100vh; background: #fff; }
.apply-shell { width: var(--page); max-width: 1120px; margin: 0 auto; padding: 132px 0 100px; display: grid; grid-template-columns: 330px minmax(0, 640px); justify-content: space-between; gap: 80px; }
.apply-intro { position: sticky; top: 116px; align-self: start; }
.apply-intro h1 { margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1.02; letter-spacing: -.055em; }
.apply-intro > p { margin: 22px 0 0; color: var(--muted); font-size: 16px; word-break: keep-all; }
.apply-meta { margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--line); }
.apply-meta div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.apply-meta span { color: var(--muted); }
.progress { height: 2px; margin-top: 34px; overflow: hidden; background: #e9e9e7; }
.progress-bar { width: 0; height: 100%; background: var(--red); transition: width .35s var(--ease); }
.apply-form { margin: 0; }
.form-section { padding: 0 0 72px; margin: 0 0 72px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { margin-bottom: 36px; }
.form-kicker { color: var(--red); font: 12px/1 var(--mono); }
.form-section h2 { margin: 12px 0 36px; font-size: clamp(27px, 3vw, 36px); letter-spacing: -.04em; }
.field { margin: 0 0 28px; }
.field > label { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.req { color: var(--red); }
.field input[type="text"], .field input[type="tel"], .field textarea { width: 100%; padding: 17px 0; border: 0; border-bottom: 1px solid #cfcfcb; border-radius: 0; color: var(--ink); background: transparent; font-size: 17px; outline: 0; transition: border-color .2s ease; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--red); box-shadow: none; }
.field input::placeholder, .field textarea::placeholder { color: #aaa9a6; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label { display: inline-flex; align-items: center; min-height: 43px; margin: 0; padding: 0 17px; border: 1px solid #d7d7d3; border-radius: 999px; color: var(--ink-2); background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: color .2s ease, background .2s ease, border .2s ease, transform .2s var(--ease); }
.choices label:hover { transform: translateY(-1px); border-color: #999; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label:has(input:checked) { color: #fff; border-color: var(--red); background: var(--red); }
.consent { display: flex !important; align-items: flex-start; gap: 10px; font-weight: 500 !important; }
.consent input { margin-top: 4px; accent-color: var(--red); }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.form-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.form-submit p { margin: 0; max-width: 340px; color: var(--muted); font-size: 12px; }
.submit-error { min-height: 21px; margin: 14px 0 0; color: var(--red); font-size: 13px; }
.button:disabled, .btn:disabled { opacity: .5; cursor: wait; transform: none; }

/* Utility/status pages */
.center-box { width: min(560px, calc(100% - 32px)); min-height: 100svh; margin: 0 auto; padding: 150px 0 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.center-box .mark { width: 88px; margin-bottom: 34px; border-radius: 23px; box-shadow: 0 20px 46px rgba(166,25,46,.18); }
.center-box .mark-tall { width: auto; height: clamp(120px, 22svh, 180px); margin-bottom: 30px; }
.center-box h2 { margin: 0; font-size: clamp(34px, 6vw, 52px) !important; line-height: 1.05; letter-spacing: -.05em; }
.center-box > p { color: var(--muted) !important; word-break: keep-all; }
.kakao-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; margin-top: 28px; padding: 0 24px; border: 0; border-radius: 999px; color: #191919; background: var(--kakao); font-size: 15px; font-weight: 700; transition: transform .2s var(--ease); }
.kakao-btn:hover { transform: translateY(-2px); }
.timeline { width: 100%; margin: 42px 0 0; text-align: left; }
.step { position: relative; display: flex; gap: 16px; min-height: 62px; color: #b1b1ae; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 18px; bottom: 0; left: 5px; width: 1px; background: #ddd; }
.step .dot { z-index: 1; flex: 0 0 11px; width: 11px; height: 11px; margin-top: 6px; border-radius: 50%; background: #d6d6d3; }
.step.done { color: var(--ink); }
.step.done .dot, .step.now .dot { background: var(--red); }
.step.now { color: var(--red); font-weight: 750; }

/* Admin */
body > section { width: var(--page); margin: 0 auto; padding-top: 120px; }
body > section > h2 { margin: 0; font-size: 42px; letter-spacing: -.045em; }
table { width: 100%; margin-top: 24px; border-collapse: collapse; background: #fff; font-size: 12px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 64px; z-index: 2; background: #f2f2ef; }
select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

.reveal { opacity: 1; transform: none; animation: reveal-up .85s var(--ease) both; }

@keyframes breathe { 0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .35; } 50% { transform: scaleY(1); opacity: 1; } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .site-header nav a:not(.nav-cta), header nav a:not(:last-child) { display: none; }
  .hero { min-height: auto; padding-top: 104px; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stage { width: min(86vw, 460px); }
  .scroll-cue { display: none; }
  .story-head { display: block; }
  .story-head .lede { margin-top: 28px; }
  .activity { grid-template-columns: 50px 1fr; gap: 20px; }
  .activity p { grid-column: 2; }
  .process-grid { grid-template-columns: 1fr; border-top: 0; }
  .process-step { padding: 28px 0; border-top: 1px solid var(--line); }
  .apply-shell { grid-template-columns: 1fr; gap: 72px; }
  .apply-intro { position: static; }
}

@media (max-width: 560px) {
  .site-header, header { height: 58px; padding: 0 16px; }
  .display { font-size: clamp(48px, 16vw, 74px); }
  .hero { padding-top: 108px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .brand img, header > a img { width: 82px; height: 23px; }
  .manifesto-inner, .story { padding-top: 110px; padding-bottom: 110px; }
  .activity { padding: 34px 0; }
  .server-stage { min-height: 590px; margin-bottom: 110px; border-radius: 28px; }
  .terminal { margin-top: 90px; }
  .process { padding-bottom: 110px; }
  .closing { min-height: 620px; padding: 76px 22px; border-radius: 28px; }
  footer { flex-direction: column; }
  .apply-shell { padding-top: 108px; }
  .form-section { padding-bottom: 54px; margin-bottom: 54px; }
  .form-submit { align-items: stretch; flex-direction: column; }
  .form-submit .button { width: 100%; }
}

/* 히어로 네트워크 캔버스 */
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-logo { position: absolute; top: 50%; left: 50%; width: 74%; height: auto; z-index: 2;
  transform: translate(-50%, -50%); transform-style: preserve-3d; will-change: transform;
  filter: drop-shadow(0 18px 40px rgba(166, 25, 46, .22));
  clip-path: inset(0 0 0 0);
  animation: hero-wipe .7s var(--ease) both; }
.hero-logo .row { transition: none; }
@keyframes hero-wipe {
  0% { clip-path: polygon(0 0, 0 0, -40% 100%, -40% 100%); }
  100% { clip-path: polygon(0 0, 140% 0, 100% 100%, 0 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-logo { animation: none; clip-path: none; }
}
.hero-object { animation: none; }

/* 플로팅 문의 위젯 */
.ask-fab { position: fixed; right: 24px; bottom: 24px; z-index: 300;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff; border: none; cursor: pointer;
  border-radius: 999px; padding: 13px 20px 13px 16px; font-size: 15px; font-weight: 700;
  box-shadow: 0 10px 28px rgba(166, 25, 46, .38); transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.ask-fab svg { display: block; }
.ask-fab:hover { background: var(--red-deep); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(166, 25, 46, .46); }
.ask-panel { position: fixed; right: 24px; bottom: 84px; z-index: 300; width: min(360px, calc(100vw - 32px));
  background: var(--white); border-radius: 18px; box-shadow: 0 22px 60px rgba(0,0,0,.22); border: 1px solid var(--line);
  padding: 20px; animation: ask-pop .2s var(--ease); }
@keyframes ask-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.ask-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ask-head b { font-size: 16px; letter-spacing: -0.01em; }
.ask-close { background: none; border: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px; }
.ask-panel .ask-lead { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.ask-panel input, .ask-panel textarea { width: 100%; margin-bottom: 10px; padding: 12px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-s); font-size: 15px; font-family: inherit; background: #fff; }
.ask-panel textarea { min-height: 96px; resize: vertical; }
.ask-panel input:focus, .ask-panel textarea:focus { outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(166, 25, 46, .16); }
.ask-send { width: 100%; background: var(--red); color: #fff; border: none; border-radius: var(--radius-s);
  padding: 12px; font-size: 15px; font-weight: 700; cursor: pointer; }
.ask-send:hover { background: var(--red-deep); }
.ask-send:disabled { opacity: .6; cursor: default; }
.ask-msg { font-size: 13px; color: var(--red); margin-top: 8px; min-height: 1em; }
.ask-note { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.ask-note svg { flex: none; }

/* 매니페스토 다음 섹션의 우아한 등장 */
.story .reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.story .reveal:not(.in) { transform: translateY(48px) scale(.985); }

.closing-note { margin-top: 16px; font-size: 13px; color: var(--muted); }

.closing-lockup { display: flex; align-items: baseline; justify-content: center; gap: 3px; margin: 0 0 10px; }
.closing-lockup .closing-logo { height: clamp(30px, 4.6vw, 48px); width: auto; display: block; }
.closing-lockup span { font-size: clamp(26px, 4vw, 42px); font-weight: 720; letter-spacing: -.03em; color: var(--ink); }

@media (max-height: 860px) { .scroll-cue { display: none; } }

/* 소개 섹션 */
.intro { width: var(--page); max-width: 980px; margin: 0 auto; padding: clamp(90px, 14svh, 150px) 0; text-align: center; }
.intro .eyebrow { color: var(--red); }
.intro-copy { margin: 14px auto 0; font-size: clamp(22px, 3.2vw, 40px); line-height: 1.45; letter-spacing: -.03em; font-weight: 680; word-break: keep-all; color: var(--ink); }
.intro-tail { margin: 26px auto 0; font-size: clamp(15px, 1.8vw, 18px); color: var(--muted); word-break: keep-all; }
