/* ───────────────────────────────────────
   @font-face — GoshinGothic
   ─────────────────────────────────────── */
@font-face {
  font-family: 'GoshinGothic';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/GoshinGothic-Regular.woff2') format('woff2'),
    url('fonts/GoshinGothic-Regular.woff') format('woff');
}

@font-face {
  font-family: 'GoshinGothic';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('fonts/GoshinGothic-SemiBold.woff2') format('woff2'),
    url('fonts/GoshinGothic-SemiBold.woff') format('woff');
}

@font-face {
  font-family: 'GoshinGothic';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/GoshinGothic-Bold.woff2') format('woff2'),
    url('fonts/GoshinGothic-Bold.woff') format('woff');
}

@font-face {
  font-family: 'GoshinGothic';
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url('fonts/GoshinGothic-ExtraBold.woff2') format('woff2'),
    url('fonts/GoshinGothic-ExtraBold.woff') format('woff');
}

/* ───────────────────────────────────────
   Design Tokens
   ─────────────────────────────────────── 
   5 colors only:
     accent   #ff205c
     Pair A   bg #fff1f1  ink #2a000b
     Pair B   bg #fffafb  ink #1d1d1d
   ─────────────────────────────────────── */
:root {
  /* Accent — universal */
  --accent: #ff205c;

  /* Pair A */
  --a-bg: #fff1f1;
  --a-ink: #2a000b;

  /* Pair B */
  --b-bg: #fffafb;
  --b-ink: #1d1d1d;

  /* Derived opacities — Pair A */
  --a-ink-muted: rgba(42, 0, 11, 0.50);
  --a-ink-faint: rgba(42, 0, 11, 0.25);
  --a-border: rgba(42, 0, 11, 0.08);

  /* Derived opacities — Pair B */
  --b-ink-muted: rgba(29, 29, 29, 0.50);
  --b-ink-faint: rgba(29, 29, 29, 0.25);
  --b-border: rgba(29, 29, 29, 0.08);

  /* Accent derived */
  --accent-glow: rgba(255, 32, 92, 0.10);
  --accent-glow-strong: rgba(255, 32, 92, 0.18);

  /* Typography */
  --font-body: 'GoshinGothic', -apple-system,
    BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue",
    "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    "Malgun Gothic", sans-serif;
  --font-display: var(--font-body);

  /* Easings */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Spacing */
  --section-padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem);
}

/* ───────────────────────────────────────
   Reset & Base  (Pair B — default)
   ─────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--b-ink);
  background: var(--b-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--a-ink);
}

::selection {
  background: var(--accent);
  color: #fff1f1;
}

/* ───────────────────────────────────────
   Scroll reveal animation
   ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger>* {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
}

.reveal-stagger.visible>* {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.visible>*:nth-child(1) {
  transition-delay: 0s;
}

.reveal-stagger.visible>*:nth-child(2) {
  transition-delay: 0.08s;
}

.reveal-stagger.visible>*:nth-child(3) {
  transition-delay: 0.16s;
}

.reveal-stagger.visible>*:nth-child(4) {
  transition-delay: 0.24s;
}

.reveal-stagger.visible>*:nth-child(5) {
  transition-delay: 0.32s;
}



/* ───────────────────────────────────────
   Hero — Pair B
   ─────────────────────────────────────── */


@keyframes blobDrift1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(12vw, 8vh) scale(1.08);
  }

  50% {
    transform: translate(5vw, 18vh) scale(0.95);
  }

  75% {
    transform: translate(-6vw, 10vh) scale(1.05);
  }
}

@keyframes blobDrift2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(-10vw, -6vh) scale(1.1);
  }

  50% {
    transform: translate(-18vw, 4vh) scale(0.92);
  }

  75% {
    transform: translate(-8vw, -12vh) scale(1.04);
  }
}

@keyframes blobDrift3 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(14vw, -10vh) scale(1.06);
  }

  66% {
    transform: translate(-8vw, -16vh) scale(0.96);
  }
}

@keyframes blobDrift4 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  20% {
    transform: translate(-10vw, 10vh) scale(1.12);
  }

  40% {
    transform: translate(-5vw, 18vh) scale(0.94);
  }

  60% {
    transform: translate(8vw, 12vh) scale(1.08);
  }

  80% {
    transform: translate(12vw, -4vh) scale(0.98);
  }
}

@keyframes blobDrift5 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  30% {
    transform: translate(16vw, -8vh) scale(1.06);
  }

  60% {
    transform: translate(10vw, 10vh) scale(0.93);
  }
}

/* Noise overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

.hero-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--b-ink-muted);
  opacity: 0;
  transform: translateY(16px);
  animation: heroFadeIn 0.7s 0.1s var(--ease-out-expo) forwards;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--b-ink);
  position: relative;
  z-index: 2;
}

.highlight {
  position: relative;
  display: inline;
  color: #2a000b;
}

/* Typing cursor */
.hero-headline .highlight::before {
  content: "";
  position: absolute;
  right: -2px;
  top: 0.15em;
  bottom: 0.15em;
  width: 3px;
  background: var(--accent);
  border-radius: 0px;
  animation: cursorBlink 0.55s steps(2, start) infinite;
}

.hero-headline.typing-done .highlight::before {
  animation: cursorFadeOut 0.45s 0.6s ease forwards, cursorBlink 0.55s steps(2, start) infinite;
}

@keyframes cursorBlink {
  to {
    visibility: hidden;
  }
}

@keyframes cursorFadeOut {
  to {
    opacity: 0;
  }
}

/* Underline grows after typing */
.highlight::after {
  content: "";
  position: absolute;
  left: -0.15em;
  bottom: 0.02em;
  width: 0;
  height: 0.22em;
  background: var(--accent-glow-strong);
  z-index: -1;
  border-radius: 0px;
}

.hero-headline.typing-done .highlight::after {
  animation: underlineGrow 0.7s 0.15s var(--ease-out-expo) forwards;
}

@keyframes underlineGrow {
  to {
    width: calc(100% + 0.3em);
  }
}

#canvas-container {
  opacity: 50%;
}

@keyframes arrowBounce {

  0%,
  100% {
    opacity: 0.4;
    transform: rotate(45deg) translate(-2px, -2px);
  }

  50% {
    opacity: 1;
    transform: rotate(45deg) translate(2px, 2px);
  }
}


/* ───────────────────────────────────────
   Intro — Pair A
   ─────────────────────────────────────── */
.intro {
  background: var(--a-bg);
  padding: var(--section-padding);
  border-top: 1px solid var(--a-border);
}

.intro-inner {
  max-width: 680px;
  margin: 0 auto;
}

.intro .section-title {
  color: var(--accent);
}

.intro-body {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 2;
  color: var(--a-ink);
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--accent);
  text-align: justify;
}

.intro-body::before {
  position: absolute;
  top: -0.75rem;
  left: -0.25rem;
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
}

/* ───────────────────────────────────────
   Specimen — Pair B
   ─────────────────────────────────────── */
.specimen {
  padding: var(--section-padding);
  background: var(--b-bg);
}

.specimen-inner {
  max-width: 960px;
  margin: 0 auto;
}

.specimen-weights {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.weight-card {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--b-border);
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
}

.weight-card:first-child {
  border-top: 1px solid var(--b-border);
}
.feature-desc{
  margin-bottom: 1.25rem;
}
.feature-number{
  color: var(--accent);
  font-size: 2rem;
  font-size: 800;
  font-family: 'GoshinGothic';
}
.weight-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
  width: 90px;
}

.weight-sample {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--b-ink);
  line-height: 1.3;
}

/* ───────────────────────────────────────
   Features — Pair A
   ─────────────────────────────────────── */
.features {
  background: var(--a-bg);
  color: var(--a-ink);
  padding: var(--section-padding);
  border-top: 1px solid var(--a-border);
  border-bottom: 1px solid var(--a-border);
}

.features-inner {
  max-width: 960px;
  margin: 0 auto;
}

.features .section-title {
  color: var(--accent);
}

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  background: var(--a-bg);
  border: 1px solid var(--a-border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-img {
  display: block;
  width: 100%;
  margin-top: auto;
  border-radius: 10px;
  background: var(--a-bg);
  object-fit: contain;
}

/* ───────────────────────────────────────
   Glyphs — Pair B
   ─────────────────────────────────────── */
.glyphs {
  padding: var(--section-padding);
  background: var(--b-bg);
}

.glyphs-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* Weight toggle buttons */
.glyph-weight-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.glyph-weight-btn {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--b-border);
  border-radius: 100px;
  background: var(--b-bg);
  color: var(--b-ink-muted);
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}

.glyph-weight-btn:hover {
  color: var(--b-ink);
  border-color: var(--b-ink-faint);
  padding: 0.5rem 2.25rem;
}

.glyph-weight-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.glyph-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 1px;
  background: var(--b-border);
  border: 1px solid var(--b-border);
  border-radius: 14px;
  overflow: hidden;
}

.glyph-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: inherit;
  color: var(--b-ink);
  background: var(--b-bg);
  cursor: default;
  transition: transform 0.4s var(--ease-out-expo), opacity 0.4s var(--ease-out-expo);
}

.glyph-cell.ripple {
  animation: rippleOut 0.5s var(--ease-out-expo) forwards;
}

@keyframes rippleOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}



/* ───────────────────────────────────────
   Type Tester — Pair B
   ─────────────────────────────────────── */
.type-tester {
  padding: var(--section-padding);
  background: var(--b-bg);
  border-top: 1px solid var(--b-border);
}

.type-tester-inner {
  max-width: 960px;
  margin: 0 auto;
}

.type-tester-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--b-ink);
  margin-bottom: 0.5rem;
}

.type-tester-desc {
  font-size: 1rem;
  color: var(--b-ink-muted);
  margin-bottom: 2rem;
}

.type-tester-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.type-weight-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.type-weight-btn {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--b-border);
  border-radius: 100px;
  background: var(--b-bg);
  color: var(--b-ink-muted);
  cursor: pointer;
  transition: all 0.25s var(--ease-out-expo);
}

.type-weight-btn:hover {
  color: var(--b-ink);
  border-color: var(--b-ink-faint);
  padding: 0.5rem 2.25rem;
}

.type-weight-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.type-size-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--b-ink-muted);
  font-size: 0.875rem;
}

.type-size-control input[type="range"] {
  width: 120px;
  accent-color: var(--accent);
}

.type-size-value {
  font-weight: 600;
  color: var(--b-ink);
  min-width: 50px;
}

.type-tester-input {
  width: 100%;
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--b-ink);
  background: var(--b-bg);
  border: 1px solid var(--b-border);
  border-radius: 12px;
  resize: vertical;
  margin-bottom: 1.5rem;
}

.type-tester-input:focus {
  outline: none;
  border-color: var(--accent);
}

.type-tester-input::placeholder {
  color: var(--b-ink-faint);
}

.type-tester-output {
  font-family: var(--font-display);
  color: var(--b-ink);
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: break-word;
  min-height: 120px;
  padding: 1rem;
  background: var(--b-bg);
  border: 1px solid var(--b-border);
  border-radius: 12px;
}

/* ───────────────────────────────────────
   CTA — Pair A
   ─────────────────────────────────────── */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(6rem, 12vw, 10rem) 2rem;
  background: var(--a-bg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Soft accent orb */
.cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--a-ink);
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.cta-button {
  display: inline-block;
  padding: 1rem 3rem;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--a-bg);
  background: var(--accent);
  border: none;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  transition: 0.8s var(--ease-out-expo)
}
.cta-button:hover {
  font-size: 1rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.cta-button--outline {
  background: transparent;
  color: var(--a-ink);
  border: 2px solid var(--a-ink);
}

.cta-button--outline:hover {
  background: var(--a-ink);
  color: var(--a-bg);
}

/* ───────────────────────────────────────
   Footer — Pair B
   ─────────────────────────────────────── */
.footer {
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--b-ink-muted);
  background: var(--b-bg);
  border-top: 1px solid var(--b-border);
}

.footer p {
  opacity: 0.6;
}

 /* ───────────────────────────────────────
   Hero — Physics Canvas Version
   ─────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh; /* 화면 전체 높이 확보 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  overflow: hidden;
  background: var(--b-bg);
  z-index: 1;
}

#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; 
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: left;
  pointer-events: none;
  user-select: none;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--b-ink-faint);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: heroFadeIn 0.6s 1.8s var(--ease-out-expo) forwards;
}

.hero-scroll-line {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  animation: arrowBounce 2s ease-in-out infinite;
}

/* ───────────────────────────────────────
   Responsive (이 아래로는 미디어 쿼리 블록만 존재해야 합니다)
   ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-scroll {
    display: none;
  }
  .weight-card {
    flex-direction: column;
    gap: 0.5rem;
  }
  .weight-label {
    width: auto;
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
  .feature-item {
    flex-direction: column;
    gap: 0.75rem;
  }
  .glyph-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
  .footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .intro-body {
    border-left: none;
    padding-left: 0;
  }
  .intro-inner {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: clamp(2rem, 10vw, 3rem);
  }
  .glyph-grid {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  }
  .glyph-cell {
    font-size: 1.25rem;
  }
  .intro-body {
    border-left: none;
    padding-left: 0;
  }
  .intro-inner {
    display: flex;
    flex-direction: column;
  }
}
