/* ══════════════════════════════════════════════════════════════
   Tencent Cloud 멀티모델 쇼케이스 — SRL AI Creative Unit
   다크 프리미엄 · Noto Serif KR / IBM Plex Sans KR / IBM Plex Mono
   ══════════════════════════════════════════════════════════════ */

:root {
  /* ── surfaces ── */
  --bg: #0a0b0e;
  --bg-soft: #0d0f14;
  --surface: #14171d;
  --surface-2: #1b1f27;
  --border: rgba(244, 239, 230, 0.10);
  --border-strong: rgba(244, 239, 230, 0.20);

  /* ── ink ── */
  --ink: #f4efe6;
  --ink-soft: #cdc8bc;
  --ink-mute: #8c8878;

  /* ── accent : electric blue (single restrained accent) ── */
  --accent: #4c82ff;
  --accent-soft: #93b4ff;
  --accent-06: rgba(76, 130, 255, 0.06);
  --accent-12: rgba(76, 130, 255, 0.12);
  --accent-24: rgba(76, 130, 255, 0.24);
  --accent-40: rgba(76, 130, 255, 0.40);

  /* ── type ── */
  --font-display: "Noto Serif KR", "Nanum Myeongjo", serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "IBM Plex Mono", "D2Coding", "Consolas", monospace;

  /* ── layout ── */
  --container: 1180px;
  --pad-inline: clamp(20px, 6vw, 72px);
  --section-pad: clamp(64px, 11vw, 148px);
  --gap-grid: clamp(10px, 2vw, 20px);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  /* ── elevation ── */
  --shadow-frame: 0 26px 64px -24px rgba(0, 0, 0, 0.68), 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 20px 50px -20px rgba(76, 130, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.5);

  --ease: cubic-bezier(0.16, 0.8, 0.24, 1);
}

/* ══════════ RESET / BASE ══════════ */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; }

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

h1, h2, h3, p, ul, ol, figure { margin: 0; }

::selection {
  background: var(--accent-40);
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}

/* subtle film-grain — keeps the dark surfaces from feeling flat/plastic */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ══════════ SHARED SECTION RHYTHM ══════════ */

main > section {
  position: relative;
  padding: var(--section-pad) var(--pad-inline);
  border-top: 1px solid var(--border);
}

main > section:nth-of-type(even) { background: var(--bg-soft); }

.gallery, .tokenhub, .mps, .poc {
  max-width: var(--container);
  margin-inline: auto;
}

.sec-head {
  display: flex;
  align-items: flex-start;
  gap: clamp(16px, 3.4vw, 34px);
  margin-bottom: clamp(28px, 4vw, 44px);
}

.sec-no {
  flex: 0 0 auto;
  color: var(--accent-40);
  -webkit-text-stroke: 1px var(--accent-40);
  font-family: var(--font-mono);
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 500;
  line-height: 0.85;
  letter-spacing: -0.02em;
}

.sec-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5em 0.7em;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.3;
}

.model-name {
  display: inline-block;
  padding: 0.32em 0.72em;
  border: 1px solid var(--accent-24);
  border-radius: var(--radius-pill);
  background: var(--accent-06);
  color: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.42em;
  font-weight: 500;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.sec-lede {
  margin-top: 0.6em;
  max-width: 62ch;
  color: var(--ink-mute);
  font-size: clamp(0.98rem, 1.3vw, 1.12rem);
  font-weight: 300;
  line-height: 1.75;
}

.sec-lede strong {
  color: var(--accent-soft);
  font-weight: 500;
}

/* ══════════ HERO ══════════ */

.hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: brightness(0.52) saturate(0.82) contrast(1.08);
  animation: hero-drift 22s var(--ease) forwards;
}

@keyframes hero-drift {
  from { transform: scale(1.07); }
  to { transform: scale(1); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 55% at 50% 8%, var(--accent-12), transparent 60%),
    linear-gradient(180deg,
      rgba(10, 11, 14, 0.42) 0%,
      rgba(10, 11, 14, 0.5) 30%,
      rgba(10, 11, 14, 0.72) 56%,
      rgba(10, 11, 14, 0.92) 80%,
      var(--bg) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  padding: clamp(96px, 16vh, 168px) var(--pad-inline) clamp(52px, 8vh, 88px);
}

.hero-badge {
  margin-bottom: clamp(18px, 3vh, 28px);
  color: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 18ch;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.4vw, 5.6rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.hero h1 em {
  color: var(--accent-soft);
  font-style: italic;
  font-weight: 700;
}

.hero-sub {
  margin-top: clamp(18px, 2.6vh, 26px);
  max-width: 42ch;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  font-weight: 400;
  line-height: 1.6;
}

.hero-note {
  margin-top: 0.9em;
  max-width: 46ch;
  color: var(--ink-mute);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.65;
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  margin-top: clamp(32px, 5vh, 48px);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.25s var(--ease);
}

.hero-scroll:hover { color: var(--accent-soft); }

/* ══════════ HERO ENTRANCE (auto, on load) ══════════ */

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  animation: reveal-up 1s var(--ease) forwards;
  animation-delay: 0.1s;
}

.reveal.d1 { animation-delay: 0.28s; }
.reveal.d2 { animation-delay: 0.46s; }
.reveal.d3 { animation-delay: 0.62s; }

.hero-scroll.reveal.d4 {
  animation:
    reveal-up 1s var(--ease) forwards 0.78s,
    hero-bounce 2.2s ease-in-out infinite 2s;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ══════════ CHIPS ══════════ */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: clamp(28px, 3.6vw, 40px);
}

.chip {
  padding: 0.5em 1em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.chip-hl {
  border-color: var(--accent-40);
  background: var(--accent-12);
  color: var(--accent-soft);
  font-weight: 500;
}

/* ══════════ FRAMES / GALLERY MEDIA ══════════ */

.frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-frame);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.frame:hover {
  transform: translateY(-3px);
  border-color: var(--accent-24);
  box-shadow: var(--shadow-lift);
}

.frame img,
.frame video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
}

.frame + .frame,
.frame-wide + .frame,
section .frame ~ .frame { margin-top: var(--gap-grid); }

.frame figcaption {
  padding: 14px 20px 16px;
  border-top: 1px solid var(--border);
  color: var(--ink-mute);
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.6;
}

.frame-wide { margin-block: var(--gap-grid); }
.frame-wide:first-child { margin-top: 0; }

.grid-2x2,
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: var(--gap-grid);
  margin-block: var(--gap-grid);
}

.grid-2x2 .frame,
.grid-2 .frame { margin: 0; }

/* ══════════ BUTTONS ══════════ */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(24px, 3vw, 32px);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85em 1.5em;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #061024;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--accent-soft);
  box-shadow: 0 14px 32px -14px var(--accent-40);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-06);
  color: var(--accent-soft);
  box-shadow: none;
}

/* ══════════ TOKENHUB ══════════ */

.tokenhub { position: relative; }

.hub-diagram {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  margin-bottom: clamp(36px, 5vw, 56px);
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 60% 100% at 0% 50%, var(--accent-06), transparent 70%),
    var(--surface);
}

.hub-source {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  width: clamp(168px, 20vw, 228px);
  padding: 18px 20px;
  border: 1px solid var(--accent-40);
  border-radius: var(--radius-md);
  background: var(--accent-06);
}

.hub-source::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-40);
  animation: pulse-dot 2.4s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 var(--accent-40); }
  70% { box-shadow: 0 0 0 8px rgba(76, 130, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(76, 130, 255, 0); }
}

.hub-source-label {
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hub-source-sub {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.hub-lines {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 9px;
  min-width: 48px;
}

.hub-lines span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-40) 20%, var(--accent) 50%, var(--accent-40) 80%, transparent);
  background-size: 220% 100%;
  animation: hub-flow 3.2s linear infinite;
}

.hub-lines span:nth-child(1) { width: 100%; animation-delay: 0s; }
.hub-lines span:nth-child(2) { width: 82%; animation-delay: -1.1s; opacity: 0.75; }
.hub-lines span:nth-child(3) { width: 62%; animation-delay: -2.1s; opacity: 0.5; }

@keyframes hub-flow {
  from { background-position: 220% 0; }
  to   { background-position: -20% 0; }
}

.hub-models {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 9px;
}

.hub-chip {
  padding: 0.55em 1.1em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 400;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.hub-chip:hover { transform: translateY(-2px); border-color: var(--accent-40); color: var(--ink); }

.hub-chip:first-child {
  border-color: var(--accent-40);
  background: var(--accent-06);
  color: var(--accent-soft);
  font-weight: 500;
}

.hub-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
  list-style: none;
  padding: 0;
}

.hub-points li {
  padding-top: 16px;
  border-top: 2px solid var(--accent-40);
  color: var(--ink-mute);
  font-size: 0.96rem;
  line-height: 1.7;
}

.hub-points strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
}

/* ══════════ MPS ══════════ */

.mps-copy {
  max-width: 68ch;
  margin-bottom: clamp(36px, 5vw, 56px);
  color: var(--ink-soft);
  font-size: clamp(1.1rem, 1.9vw, 1.4rem);
  font-weight: 300;
  line-height: 1.75;
}

.mps-copy em {
  color: var(--accent-soft);
  font-style: italic;
  font-weight: 400;
}

.br-desk { display: none; }

.mps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--gap-grid);
}

.mps-card {
  padding: clamp(20px, 2.4vw, 26px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.mps-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-24);
  background: var(--surface-2);
}

.mps-icn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  background: var(--accent-12);
  color: var(--accent-soft);
  font-size: 1.15rem;
}

.mps-card h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.mps-card p {
  color: var(--ink-mute);
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.6;
}

/* ══════════ POC ══════════ */

.poc-list {
  position: relative;
  list-style: none;
  padding: 0;
  counter-reset: none;
}

.poc-list li {
  position: relative;
  display: flex;
  gap: clamp(18px, 3vw, 30px);
  padding: clamp(22px, 3vw, 32px) 0;
  border-top: 1px solid var(--border);
}

.poc-list li:last-child { padding-bottom: 0; }

.poc-num {
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 500;
  line-height: 1.4;
}

.poc-list h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.7vw, 1.35rem);
  font-weight: 700;
}

.poc-list p {
  max-width: 64ch;
  color: var(--ink-mute);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.7;
}

/* ══════════ FOOTER ══════════ */

.foot {
  padding: clamp(48px, 8vw, 84px) var(--pad-inline) clamp(36px, 6vw, 56px);
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  text-align: center;
}

.foot-note {
  max-width: 62ch;
  margin: 0 auto clamp(24px, 3vw, 32px);
  color: var(--ink-mute);
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 1.75;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: clamp(24px, 3vw, 32px);
}

.foot-links a {
  color: var(--ink-mute);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  transition: color 0.25s var(--ease);
}

.foot-links a:hover { color: var(--accent-soft); }

.foot-brand {
  color: var(--ink-mute);
  opacity: 0.6;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ══════════ SCROLL REVEAL (in-view, via JS toggling .in) ══════════ */

.will-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}

.will-reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* staggered cascade inside grids */
.grid-2x2 .frame:nth-child(1), .grid-2 .frame:nth-child(1), .mps-card:nth-child(1) { transition-delay: 0s; }
.grid-2x2 .frame:nth-child(2), .grid-2 .frame:nth-child(2), .mps-card:nth-child(2) { transition-delay: .08s; }
.grid-2x2 .frame:nth-child(3), .mps-card:nth-child(3) { transition-delay: .16s; }
.grid-2x2 .frame:nth-child(4), .mps-card:nth-child(4) { transition-delay: .24s; }
.mps-card:nth-child(5) { transition-delay: .3s; }
.mps-card:nth-child(6) { transition-delay: .36s; }
.mps-card:nth-child(7) { transition-delay: .42s; }
.mps-card:nth-child(8) { transition-delay: .48s; }
.mps-card:nth-child(9) { transition-delay: .54s; }
.mps-card:nth-child(10) { transition-delay: .6s; }
.poc-list li:nth-child(1) { transition-delay: 0s; }
.poc-list li:nth-child(2) { transition-delay: .1s; }
.poc-list li:nth-child(3) { transition-delay: .2s; }

/* ══════════ RESPONSIVE ══════════ */

@media (max-width: 1024px) {
  .hub-diagram { flex-direction: column; align-items: stretch; }
  .hub-source { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .hub-lines { flex-direction: row; align-items: center; height: 34px; }
  .hub-lines span { width: 2px !important; height: 100%; opacity: 1 !important; }
  .hub-lines span:nth-child(2) { display: none; }
  .hub-lines span:nth-child(3) { display: none; }
  .hub-lines { justify-content: center; }
  .hub-points { grid-template-columns: 1fr; }
  .hub-points li { border-top: 0; border-left: 2px solid var(--accent-40); padding: 0 0 0 16px; }
}

@media (max-width: 640px) {
  :root { --section-pad: clamp(52px, 14vw, 88px); }

  .hero h1 { max-width: 100%; }
  .hero-sub, .hero-note { max-width: 100%; }

  .sec-head { gap: 14px; }
  .sec-no { font-size: 1.8rem; }

  .grid-2x2, .grid-2 { grid-template-columns: 1fr; }

  .hub-diagram { padding: 20px; }
  .hub-models { gap: 7px; }

  .mps-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

  .poc-list li { gap: 14px; }

  .btn-row { flex-direction: column; align-items: stretch; }
  .btn, .btn-ghost { justify-content: center; text-align: center; }
}

@media (min-width: 641px) {
  .br-desk { display: inline; }
}

/* ══════════ MOTION SAFETY ══════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .will-reveal { opacity: 1; transform: none; }
  .hero-bg img { transform: none; }
}
