/* ==========================================================================
   Home Public v7 — Editorial Scroll Scenes
   Hero(v6) + 4 pinned full-viewport scenes
   ========================================================================== */

:root {
  --v7-font-editorial: 'Instrument Serif', 'Noto Serif KR', 'Times New Roman', serif;
  --v7-font-display: 'Pretendard', 'Inter', 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  --v7-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --v7-ink: #0a0a0f;
  --v7-ink-2: #1a1a24;
  --v7-paper: #f5f3ef;
  --v7-paper-2: #ecebe6;
  --v7-accent: #ff2e63;
  --v7-accent-soft: #ffd0dd;
  --v7-violet: #4f46e5;
  --v7-violet-soft: #c7c4ff;
}

/* Scene shell ---------------------------------------------------------- */
.v7-scenes-root {
  position: relative;
  width: 100%;
  background: var(--v7-paper);
  color: var(--v7-ink);
  font-family: var(--v7-font-display);
  font-feature-settings: 'ss01' on, 'cv01' on;
  letter-spacing: -0.01em;
}

.v7-scene {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.v7-scene-inner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 8vh, 96px) clamp(20px, 5vw, 80px);
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.v7-eyebrow {
  font-family: var(--v7-font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.55;
}

/* Hero channel link --------------------------------------------------- */
.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-hero-channel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: min(100%, 310px);
  padding: 10px 14px;
  border: 1px solid rgba(10, 10, 15, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(10, 10, 15, 0.7);
  font-family: var(--v7-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-hero-channel-link:hover,
.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-hero-channel-link:focus-visible {
  border-color: rgba(255, 46, 99, 0.42);
  color: var(--v7-accent);
  transform: translateY(-1px);
}

.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-hero-channel-label {
  text-transform: uppercase;
}

.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-hero-channel-handle {
  overflow: hidden;
  max-width: min(42vw, 190px);
  text-overflow: ellipsis;
}

.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-hero-channel-link i {
  font-size: 10px;
  letter-spacing: 0;
  opacity: 0.68;
}

/* Scene 1 — Manifesto -------------------------------------------------- */
.v7-scene-manifesto {
  background:
    radial-gradient(120% 80% at 50% 0%, #faf8f3 0%, #ecebe6 60%, #e3e1db 100%);
}
.v7-scene-manifesto::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 22% 28%, rgba(79, 70, 229, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 78% 72%, rgba(255, 46, 99, 0.06) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.v7-manifesto-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.v7-manifesto-eyebrow {
  margin-bottom: clamp(24px, 4vh, 48px);
}

.v7-manifesto-headline {
  font-family: var(--v7-font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(44px, 8.4vw, 132px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--v7-ink);
  margin: 0;
  will-change: transform, opacity, letter-spacing;
}

.v7-manifesto-headline .v7-manifesto-line {
  display: block;
}

.v7-manifesto-headline .v7-manifesto-accent {
  font-style: italic;
  background: linear-gradient(120deg, var(--v7-violet) 0%, var(--v7-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.v7-manifesto-meta {
  position: absolute;
  left: clamp(20px, 5vw, 64px);
  bottom: clamp(24px, 5vh, 56px);
  z-index: 2;
  font-family: var(--v7-font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.45;
  display: grid;
  gap: 4px;
  text-align: left;
}

/* Scene 2 — Three Capabilities (dark) ---------------------------------- */
.v7-scene-capabilities {
  background: var(--v7-ink);
  color: #f5f3ef;
}

.v7-capabilities-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.v7-capabilities-heading {
  font-family: var(--v7-font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
}
.v7-capabilities-heading .v7-line-2 {
  display: block;
  color: #d6d5cf;
}

.v7-capabilities-eyebrow {
  margin-bottom: 24px;
  color: rgba(245, 243, 239, 0.65);
}

.v7-capabilities-list {
  display: grid;
  gap: clamp(20px, 2.4vw, 36px);
}

.v7-cap-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: baseline;
  padding: clamp(20px, 3vh, 36px) 0;
  border-top: 1px solid rgba(245, 243, 239, 0.12);
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}
.v7-cap-card:last-child {
  border-bottom: 1px solid rgba(245, 243, 239, 0.12);
}

.v7-cap-number {
  font-family: var(--v7-font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 96px);
  line-height: 0.9;
  background: linear-gradient(180deg, #ff2e63 0%, #ff8aa6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.03em;
}

.v7-cap-body {
  display: grid;
  gap: 10px;
}

.v7-cap-title {
  font-family: var(--v7-font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  color: #f5f3ef;
}

.v7-cap-summary {
  font-size: clamp(14px, 1.1vw, 16px);
  line-height: 1.6;
  color: rgba(245, 243, 239, 0.62);
  margin: 0;
  max-width: 56ch;
}

/* Scene 3 — Service Map (horizontal scroll) ---------------------------- */
.v7-scene-map {
  background: var(--v7-paper);
  color: var(--v7-ink);
}

.v7-map-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  gap: clamp(32px, 5vh, 64px);
}

.v7-map-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.v7-map-title {
  font-family: var(--v7-font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 12px 0 0;
}

.v7-map-summary {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.6;
  max-width: 32ch;
  opacity: 0.6;
  margin: 0;
}

.v7-map-track-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.v7-map-track {
  display: flex;
  gap: clamp(20px, 2.4vw, 32px);
  will-change: transform;
  padding-bottom: 8px;
}

.v7-map-card {
  flex: 0 0 clamp(280px, 32vw, 420px);
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(10, 10, 15, 0.06);
  padding: clamp(24px, 2.4vw, 36px);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
  box-shadow: 0 1px 0 rgba(10, 10, 15, 0.02), 0 30px 60px -40px rgba(10, 10, 15, 0.18);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease;
}
.v7-map-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1px 0 rgba(10, 10, 15, 0.02), 0 50px 90px -40px rgba(10, 10, 15, 0.25);
}

.v7-map-card-number {
  font-family: var(--v7-font-editorial);
  font-style: italic;
  font-size: 28px;
  color: var(--v7-accent);
  letter-spacing: -0.02em;
}

.v7-map-card-title {
  font-family: var(--v7-font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 1.8vw, 30px);
  line-height: 1.15;
  margin: 0;
  color: var(--v7-ink);
}

.v7-map-card-summary {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(10, 10, 15, 0.55);
  margin: 0;
}

.v7-map-card-items {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border-top: 1px solid rgba(10, 10, 15, 0.06);
  padding-top: 16px;
}

.v7-map-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--v7-ink);
  text-decoration: none;
  border-bottom: 1px dashed rgba(10, 10, 15, 0.08);
  transition: color 180ms ease;
}
.v7-map-card-item:last-child { border-bottom: none; }
.v7-map-card-item:hover { color: var(--v7-accent); }
.v7-map-card-item i {
  font-size: 11px;
  opacity: 0.45;
  transition: transform 180ms ease, opacity 180ms ease;
}
.v7-map-card-item:hover i {
  transform: translateX(4px);
  opacity: 1;
}

/* Scroll progress dot indicator */
.v7-map-progress {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  height: 2px;
  background: rgba(10, 10, 15, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.v7-map-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--v7-violet), var(--v7-accent));
  will-change: width;
}

/* Scene 4 — Portfolio + Login ----------------------------------------- */
.v7-scene-finale {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(79, 70, 229, 0.18) 0%, transparent 60%),
    radial-gradient(80% 60% at 0% 100%, rgba(255, 46, 99, 0.16) 0%, transparent 55%),
    linear-gradient(180deg, #f5f3ef 0%, #ecebe6 100%);
}

.v7-finale-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.v7-finale-copy { display: grid; gap: 24px; }

.v7-finale-headline {
  font-family: var(--v7-font-editorial);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(44px, 6.8vw, 104px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin: 0;
}
.v7-finale-headline .v7-finale-accent {
  background: linear-gradient(120deg, var(--v7-violet) 0%, var(--v7-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.v7-finale-summary {
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.65;
  color: rgba(10, 10, 15, 0.62);
  max-width: 42ch;
  margin: 0;
}

.v7-finale-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.v7-finale-chip {
  font-family: var(--v7-font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid rgba(10, 10, 15, 0.14);
  border-radius: 999px;
  color: rgba(10, 10, 15, 0.65);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
}

.v7-finale-channel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid rgba(10, 10, 15, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: rgba(10, 10, 15, 0.72);
  font-family: var(--v7-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.v7-finale-channel-link:hover,
.v7-finale-channel-link:focus-visible {
  border-color: rgba(255, 46, 99, 0.42);
  color: var(--v7-accent);
  transform: translateY(-1px);
}

.v7-finale-channel-label {
  text-transform: uppercase;
}

.v7-finale-channel-handle {
  overflow: hidden;
  max-width: min(42vw, 190px);
  text-overflow: ellipsis;
}

.v7-finale-channel-link i {
  font-size: 10px;
  letter-spacing: 0;
  opacity: 0.68;
}

.v7-finale-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.v7-finale-blob-shell {
  position: relative;
  width: clamp(220px, 22vw, 320px);
  height: clamp(220px, 22vw, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.v7-finale-blob {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff2e63 0%, #ff5e85 100%);
  border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
  filter: blur(0.5px);
  box-shadow: 0 30px 80px -20px rgba(255, 46, 99, 0.55);
  animation: v7-blob-morph 9s ease-in-out infinite;
}

@keyframes v7-blob-morph {
  0%,100% { border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; transform: rotate(0deg) scale(1); }
  33%     { border-radius: 45% 55% 40% 60% / 60% 45% 55% 40%; transform: rotate(8deg) scale(1.03); }
  66%     { border-radius: 55% 45% 60% 40% / 40% 55% 45% 60%; transform: rotate(-6deg) scale(0.97); }
}

.v7-finale-login {
  position: relative;
  z-index: 2;
  font-family: var(--v7-font-display);
  letter-spacing: 0.32em;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  padding: 16px 32px;
}

.v7-finale-secondary {
  font-family: var(--v7-font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(10, 10, 15, 0.7);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(10, 10, 15, 0.35);
  transition: color 180ms ease, border-color 180ms ease;
}
.v7-finale-secondary:hover { color: var(--v7-accent); border-color: var(--v7-accent); }

/* Scene transition indicator (top progress bar) ------------------------ */
.v7-progress-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}
.v7-progress-rail-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--v7-violet) 0%, var(--v7-accent) 100%);
  will-change: width;
}

/* Apple paint budget: keep scroll structure, reduce expensive WebKit paint. */
html[data-home-apple-motion="reduced-paint"] .v7-manifesto-headline {
  will-change: transform, opacity;
}

html[data-home-apple-motion="reduced-paint"] .v7-finale-chip {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: none;
}

html[data-home-apple-motion="reduced-paint"] .v7-finale-channel-link {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: none;
}

html[data-home-apple-motion="reduced-paint"] .home-public-v6-hero-channel-link {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: none;
}

html[data-home-apple-motion="reduced-paint"] .v7-finale-blob {
  filter: none;
  animation: none;
}

/* Mobile fallback ----------------------------------------------------- */
@media (min-width: 769px) {
  .home-public-v6-page[data-home-design-version="v7"] .v7-scene-manifesto .v7-scene-inner {
    align-items: flex-start;
    padding-top: clamp(80px, 10vh, 104px);
  }
}

@media (max-width: 768px) {
  .v7-scene { min-height: auto; }
  .v7-scene-inner {
    min-height: auto;
    padding: 80px 20px;
  }
  .home-public-v6-page[data-home-design-version="v7"] .v7-scene-manifesto .v7-scene-inner {
    flex-direction: column;
    gap: 22px;
    text-align: center;
  }
  .v7-capabilities-stage,
  .v7-finale-stage {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .v7-map-card {
    flex: 0 0 78vw;
  }
  .v7-map-track-wrap {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .v7-map-card { scroll-snap-align: start; }
  .v7-manifesto-meta {
    position: static;
    margin-top: 0;
    text-align: center;
    justify-content: center;
  }
  .home-public-v6-page[data-home-design-version="v7"] .home-public-v6-hero-channel-link {
    max-width: calc(100vw - 40px);
    letter-spacing: 0.1em;
  }
  .v7-finale-copy {
    justify-items: center;
    text-align: center;
  }
  .v7-finale-chips {
    justify-content: center;
  }
  .v7-finale-channel-link {
    max-width: calc(100vw - 40px);
    letter-spacing: 0.1em;
  }
  .v7-finale-blob-shell { margin: 0 auto; }
}

/* Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .v7-cap-card { opacity: 1; transform: none; }
  .v7-finale-blob { animation: none; }
  .v7-manifesto-headline { will-change: auto; }
}

/* Visual balance overrides ------------------------------------------- */
.home-public-v6-page[data-home-design-version="v7"]::before,
.home-public-v6-page[data-home-design-version="v7"]::after {
  opacity: 0.6;
}

.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-grid-layer {
  opacity: 0.018;
}

.home-public-v6-page[data-home-design-version="v7"] .home-public-v6-ambient-orb {
  opacity: 0.62;
}

.home-public-v6-page[data-home-design-version="v7"] .v7-scene-manifesto::before {
  opacity: 0.65;
}

.home-public-v6-page[data-home-design-version="v7"] .v7-cap-card {
  border-top-color: rgba(245, 243, 239, 0.1);
}

.home-public-v6-page[data-home-design-version="v7"] .v7-cap-card:last-child {
  border-bottom-color: rgba(245, 243, 239, 0.1);
}

.home-public-v6-page[data-home-design-version="v7"] .v7-cap-number {
  opacity: 0.88;
}

.home-public-v6-page[data-home-design-version="v7"] .v7-map-card {
  box-shadow: 0 1px 0 rgba(10, 10, 15, 0.02), 0 22px 46px -38px rgba(10, 10, 15, 0.16);
}

.home-public-v6-page[data-home-design-version="v7"] .v7-map-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 0 rgba(10, 10, 15, 0.02), 0 34px 68px -46px rgba(10, 10, 15, 0.2);
}

.home-public-v6-page[data-home-design-version="v7"] .v7-finale-blob {
  box-shadow: 0 28px 72px -28px rgba(255, 46, 99, 0.46);
}
