/* ================================================================
   1. Design tokens and reset
   ================================================================ */
:root {
  --color-ink: #10120f;
  --color-paper: #f2f2ec;
  --color-lime: #d8ff38;
  --color-blue: #2957ff;
  --color-line: rgb(16 18 15 / 17%);
  --font-display: "Archivo", sans-serif;
  --font-body: "Noto Sans KR", sans-serif;
  --container-width: 1440px;
}

* {
  box-sizing: border-box;

}
html {
  scroll-behavior: smooth;

}
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);

}
a {
  color: inherit;
  text-decoration: none;

}
button {
  font: inherit;

}

/* ================================================================
   2. Shared layout and typography
   ================================================================ */
.container {
  width: min(calc(100% - 48px), var(--container-width));
  margin-inline: auto;

}
section {
  padding-block: 130px;

}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-bottom: 75px;

}
.section-heading h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.065em;

}
.section-label {
  margin: 0;
  font: 600 12px var(--font-display);
  letter-spacing: 0.18em;

}

/* ================================================================
   3. Header and navigation
   ================================================================ */
.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  padding-block: 20px;
  transition: 0.35s;

}
.site-header.is-scrolled {
  border-bottom: 1px solid var(--color-line);
  background: rgb(242 242 236 / 88%);
  backdrop-filter: blur(14px);

}
.navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;

}
.logo {
  font: 800 24px/1 var(--font-display);
  letter-spacing: -1.5px;

}
.logo-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-left: 3px;
  border-radius: 50%;
  background: var(--color-lime);

}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  font: 600 13px var(--font-display);

}
.nav-links a {
  position: relative;

}
.nav-links a::after {
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transition: width 0.2s;

}
.nav-links a:hover::after {
  width: 100%;

}
.menu-button {
  display: none;
  border: 0;
  background: none;
  font-size: 24px;
  cursor: pointer;

}

/* ================================================================
   4. Hero and marquee
   ================================================================ */
.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  padding: 80px 0;

}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 600 12px var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;

}
.eyebrow::before {
  width: 30px;
  height: 2px;
  background: currentColor;
  content: "";

}
.hero h1 {
  margin: 32px 0 26px;
  max-width: 100%;
  font: 800 clamp(58px, 10.5vw, 160px)/0.79 var(--font-display);
  letter-spacing: -0.075em;
  text-transform: uppercase;

}
.hero h1 span {
  display: block;
  margin-left: min(12vw, 180px);
  color: var(--color-blue);
  white-space: nowrap;

}
.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;

}
.hero-copy {
  grid-column: 2;
  max-width: 690px;
  margin: 0;
  font-size: clamp(18px, 2vw, 29px);
  font-weight: 600;
  line-height: 1.45;

}
.scroll-note {
  position: absolute;
  right: 24px;
  bottom: 42px;
  margin: 0;
  font: 500 11px var(--font-display);
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;

}
.scroll-note::after {
  margin-top: 12px;
  font-size: 18px;
  content: "↓";

}

.marquee {
  overflow: hidden;
  padding-block: 17px;
  border-block: 0;
  background: var(--color-ink);
  color: white;
  white-space: nowrap;

}
.marquee-track {
  display: inline-block;
  font: 700 17px var(--font-display);
  letter-spacing: 0.1em;
  animation: marquee-move 20s linear infinite;

}
.marquee b {
  margin-inline: 26px;
  color: var(--color-lime);

}

/* ================================================================
   5. Team introduction
   ================================================================ */
.intro {
  background: var(--color-lime);

}
.intro-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;

}
.intro-visual {
  position: relative;
  display: flex;
  min-height: 580px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 220px 220px 20px 20px;
  background: #c6e92f;

}
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  aspect-ratio: 1;
  border: 1px solid rgb(16 18 15 / 35%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  animation: orbit-spin 14s linear infinite;

}
.orbit::before, .orbit::after {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-blue);
  content: "";

}
.orbit::before {
  left: 0;
  transform: translate(-50%, -50%);

}
.orbit::after {
  right: 0;
  transform: translate(50%, -50%);

}
.intro-wordmark {
  z-index: 1;
  text-align: center;
  font: 800 clamp(46px, 7vw, 100px)/0.8 var(--font-display);
  letter-spacing: -0.08em;

}
.intro-wordmark em {
  display: block;
  color: var(--color-blue);
  font-style: normal;

}
.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

}
.intro-copy > p {
  margin: 0;
  font-size: clamp(20px, 2.3vw, 34px);
  font-weight: 650;
  line-height: 1.5;

}
.intro-copy small {
  max-width: 520px;
  font-size: 15px;
  line-height: 1.8;

}

/* ================================================================
   6. Technology stack
   ================================================================ */
.build {
  background: var(--color-ink);
  color: white;

}
.build .section-heading {
  padding-bottom: 0;
  border-bottom: 0;

}
.layers {
  border-top: 1px solid #3c3d39;
  counter-reset: layer;

}
.layer {
  display: grid;
  grid-template-columns: 90px 1fr 1fr;
  align-items: center;
  gap: 28px;
  padding-block: 34px;
  border-bottom: 1px solid #3c3d39;
  counter-increment: layer;
  transition: 0.35s;

}
.layer::before {
  color: #8a8b85;
  font: 500 13px var(--font-display);
  content: "0" counter(layer);

}
.layer h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 60px);
  letter-spacing: -0.05em;
  transition: color 0.3s;

}
.layer p {
  max-width: 520px;
  color: #a9aaa5;
  line-height: 1.75;

}
.layer:hover {
  padding-left: 24px;
  background: linear-gradient(90deg, rgb(216 255 56 / 9%), transparent);

}
.layer:hover h3 {
  color: var(--color-lime);

}

/* ================================================================
   7. NCRC challenge
   ================================================================ */
.challenge {
  padding-bottom: 0;

}
.challenge-copy {
  padding-bottom: 110px;

}
.quote {
  max-width: 1250px;
  margin: 0;
  font-size: clamp(38px, 7vw, 104px);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.07em;

}
.quote span {
  color: var(--color-blue);

}
.challenge-visual {
  position: relative;
  height: min(78vw, 820px);
  min-height: 520px;
  overflow: hidden;
  background: #ccd3dd;

}
.challenge-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.03);
  transform: scale(1.01);

}
.challenge-visual::after {
  position: absolute;
  right: 3vw;
  bottom: -0.09em;
  color: var(--color-lime);
  font: 800 clamp(70px, 14vw, 210px)/1 var(--font-display);
  letter-spacing: -0.07em;
  content: "NCRC 2026";
  mix-blend-mode: hard-light;

}
.mission-card {
  position: absolute;
  z-index: 2;
  top: 5vw;
  left: 5vw;
  width: min(390px, 80vw);
  padding: 28px;
  background: var(--color-paper);

}
.mission-card span {
  font: 600 12px var(--font-display);
  letter-spacing: 0.14em;

}
.mission-card p {
  margin: 16px 0 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;

}

/* ================================================================
   8. Vision and footer
   ================================================================ */
.vision {
  background: var(--color-blue);
  color: white;

}
.vision-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;

}
.vision h2 {
  margin: 0;
  font: 800 clamp(54px, 9vw, 132px)/0.83 var(--font-display);
  letter-spacing: -0.075em;

}
.vision h2 span {
  color: var(--color-lime);

}
.vision-copy {
  align-self: end;

}
.vision-copy > p:not(.section-label) {
  font-size: 20px;
  line-height: 1.75;

}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;

}
.pills span {
  padding: 12px 18px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 50px;
  font: 600 12px var(--font-display);

}

.site-footer {
  padding: 80px 0 35px;
  border-top: 0;
  background: var(--color-ink);
  color: white;

}
.footer-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 90px;

}
.footer-heading h2 {
  margin: 0;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.07em;

}
.back-to-top {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-lime);
  color: var(--color-ink);
  font-size: 30px;
  transition: 0.3s;

}
.back-to-top:hover {
  transform: rotate(45deg) scale(1.08);

}
.footer-meta {
  display: flex;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid #3c3d39;
  color: #979993;
  font: 500 11px var(--font-display);
  letter-spacing: 0.1em;

}

/* ================================================================
   9. Motion
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.75s, transform 0.75s;

}
.reveal.is-visible {
  opacity: 1;
  transform: none;

}
@keyframes marquee-move {
  to {
  transform: translateX(-50%);

}
}
@keyframes orbit-spin {
  to {
  transform: translate(-50%, -50%) rotate(360deg);

}
}

/* ================================================================
   10. Mobile layout
   ================================================================ */
@media (max-width: 760px) {
  .container {
  width: min(calc(100% - 28px), var(--container-width));

}
  section {
  padding-block: 90px;

}
  .site-header {
  padding-block: 17px;

}
  .menu-button {
  display: block;

}
  .nav-links {
  position: absolute;
  top: 62px;
  right: 14px;
  left: 14px;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--color-line);
  background: var(--color-paper);

}
  .nav-links.is-open {
  display: flex;

}
  .hero {
  padding: 80px 0;

}
  .hero h1 {
  width: 100%;
  font-size: clamp(40px, 13vw, 72px);

}
  .hero h1 span {
  margin-left: 0;
  white-space: nowrap;

}
  .hero-bottom {
  grid-template-columns: 1fr;

}
  .hero-copy {
  grid-column: 1;

}
  .scroll-note {
  display: none;

}
  .section-heading, .intro-grid, .vision-grid {
  grid-template-columns: 1fr;

}
  .section-heading {
  margin-bottom: 48px;

}
  .intro-visual {
  min-height: 420px;

}
  .intro-copy {
  gap: 52px;

}
  .layer {
  grid-template-columns: 45px 1fr;

}
  .layer p {
  grid-column: 2;

}
  .challenge-visual {
  min-height: 580px;

}
  .footer-heading {
  align-items: flex-start;
  gap: 30px;

}
  .back-to-top {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;

}
  .footer-meta {
  gap: 20px;
  line-height: 1.6;

}
}

@media (prefers-reduced-motion: reduce) {
  * {
  scroll-behavior: auto !important;
  animation: none !important;

}
  .reveal {
  opacity: 1;
  transform: none;

}
}

/* Floating AI assistant launcher */
.ai-assistant {
  position: fixed;
  z-index: 100;
  right: 28px;
  bottom: 27px;
  color: #050505;
  font-family: "Noto Sans KR", sans-serif;
}
.ai-assistant button,
.ai-assistant textarea {
  font: inherit;
}
.ai-assistant button {
  border: 0;
  cursor: pointer;
}
.assistant-launcher {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #476df2, #1428a0);
  box-shadow: 0 8px 25px rgba(20, 40, 160, 0.35);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.assistant-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(20, 40, 160, 0.42);
}
.assistant-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  position: relative;
  background: #fff url("/image/mascot.png") center 30% / 170% auto no-repeat;
  box-shadow: 0 0 0 2px #fff;
}
.assistant-avatar:before,
.assistant-avatar:after {
  display: none;
}
.launcher-close {
  display: none;
  width: 27px;
  height: 27px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
}
.assistant-launcher.is-open .assistant-avatar {
  display: none;
}
.assistant-launcher.is-open .launcher-close {
  display: block;
}
.notification-dot {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  right: 1px;
  top: 2px;
  background: #ff3b4f;
  border: 2px solid #fff;
}
.assistant-launcher.is-open .notification-dot {
  display: none;
}

/* Assistant welcome tooltip */
.assistant-nudge {
  position: absolute;
  width: 250px;
  right: 78px;
  bottom: 4px;
  padding: 17px 38px 17px 19px;
  background: #fff;
  border: 1px solid #e7e9ef;
  border-radius: 17px;
  box-shadow: 0 9px 30px rgba(25, 33, 57, 0.16);
  animation: nudge-in 0.5s ease both;
}
.assistant-nudge:after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: 20px;
  width: 13px;
  height: 13px;
  background: white;
  border-top: 1px solid #e7e9ef;
  border-right: 1px solid #e7e9ef;
  transform: rotate(45deg);
}
.assistant-nudge strong,
.assistant-nudge span {
  display: block;
}
.assistant-nudge strong {
  font-size: 14px;
  margin-bottom: 5px;
}
.assistant-nudge span {
  font-size: 12px;
  line-height: 1.5;
  color: #6f737c;
}
.nudge-close {
  position: absolute;
  right: 9px;
  top: 8px;
  background: none;
  color: #8a8e97;
  font-size: 20px;
  line-height: 1;
}

/* Chat window */
.chat-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 380px;
  height: min(610px, calc(100vh - 118px));
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 16px 52px rgba(18, 25, 48, 0.25);
  overflow: hidden;
  flex-direction: column;
  transform-origin: bottom right;
  animation: panel-in 0.25s ease both;
  padding: 0;
}
.chat-panel:not([hidden]) {
  display: flex;
}
.chat-header {
  min-height: 82px;
  padding: 17px 17px 16px 20px;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  align-items: center;
  gap: 11px;
}
.assistant-avatar.small {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}
.chat-header div:nth-child(2) {
  flex: 1;
}
.chat-header h2 {
  font-size: 16px;
  margin: 0 0 3px;
}
.chat-header p {
  font-size: 11px;
  color: #777;
  margin: 0;
}
.chat-header i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #29b86b;
}
.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  padding: 7px;
}
.icon-button:hover {
  background: #f2f3f6;
}
.icon-button svg {
  width: 100%;
  fill: none;
  stroke: #25272b;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 19px 18px;
  background: #f7f8fa;
}
.message-row {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
}
.message-row.user {
  justify-content: flex-end;
}
.assistant-avatar.tiny {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}
.sender {
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 6px;
}
.message {
  max-width: 272px;
  padding: 12px 14px;
  border-radius: 5px 17px 17px 17px;
  background: #fff;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.user .message {
  background: #1428a0;
  color: #fff;
  border-radius: 17px 5px 17px 17px;
}
.message-row time {
  display: block;
  font-size: 9px;
  color: #999;
  margin-top: 5px;
}
.user time {
  text-align: right;
}
.suggestions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-left: 39px;
}
.suggestions button {
  text-align: left;
  padding: 11px 13px;
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  background: #fff;
  color: #222;
  font-size: 12px;
  font-weight: 500;
}
.suggestions button:hover {
  border-color: #1428a0;
  color: #1428a0;
}
.suggestions span {
  float: right;
  font-size: 18px;
  line-height: 14px;
}
.typing {
  display: flex;
  gap: 4px;
  padding: 14px 17px !important;
}
.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8d929b;
  animation: bounce 1s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}
.chat-input {
  padding: 13px 15px 10px;
  border-top: 1px solid #edf0f4;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 37px;
  align-items: end;
  gap: 7px;
}
.chat-input textarea {
  height: 42px;
  max-height: 85px;
  resize: none;
  border: 1px solid #dfe2e8;
  border-radius: 21px;
  outline: none;
  padding: 10px 15px;
  line-height: 20px;
  font-size: 13px;
}
.chat-input textarea:focus {
  border-color: #1428a0;
}
.send-button {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1428a0;
  margin-bottom: 2px;
}
.send-button:disabled {
  background: #d8dbe2;
  cursor: default;
}
.send-button svg {
  width: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chat-input > p {
  grid-column: 1/-1;
  text-align: center;
  margin: 0;
  font-size: 9px;
  color: #9a9da5;
}

/* Motion */
@keyframes panel-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes nudge-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bounce {
  0%,
  60%,
  100% {
    transform: none;
  }
  30% {
    transform: translateY(-4px);
  }
}

/* AI assistant accessibility helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .ai-assistant {
    right: 16px;
    bottom: 16px;
  }

  .assistant-launcher {
    width: 58px;
    height: 58px;
  }

  .assistant-nudge {
    right: 70px;
    width: 225px;
  }

  .chat-panel {
    position: fixed;
    inset: 12px 12px 86px;
    width: auto;
    height: auto;
    border-radius: 20px;
  }
}
