/* ==========================================================================
   Simple Studio — Cinematic One-Pager
   ========================================================================== */

:root {
  --bg-page: #f5f5f7;
  --bg-card: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ls-tight: -0.03em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
  background: #e8e8ed;
}

body.loaded {
  background: var(--bg-page);
  transition: background 0.5s ease;
}

/* --- Cursor Glow --- */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.015) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.loaded .cursor-glow {
  opacity: 1;
}

/* ==========================================================================
   STAGE — The single viewport
   ========================================================================== */
.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1;
}

/* ==========================================================================
   LOGO — Clip-path reveal animation
   ========================================================================== */
.hero-logo-wrapper {
  display: inline-block;
  transform: scale(1.4);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-logo-svg {
  width: clamp(300px, 70vw, 480px);
  height: auto;
  transform: translateX(25%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-studio .hero-logo-svg {
  transform: translateX(0);
}

/* Initial state: Simple letters and Studio hidden via clip-path */
.hero-logo-svg .logo-simple {
  clip-path: inset(0 100% 0 0);
}

/* Studio stroke path — hidden initially, drawn by JS */
.hero-logo-svg .logo-studio {
  fill: none;
  stroke: #1A1A1A;
  stroke-width: 1;
  opacity: 0;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.hero-logo-svg .logo-mark {
  opacity: 0;
}

/* Phase: Draw — reveal Simple letters with stagger */
.phase-draw .logo-simple {
  clip-path: inset(0 0% 0 0);
  transition: clip-path 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.phase-draw .logo-simple-1 { transition-delay: 0.05s; }
.phase-draw .logo-simple-2 { transition-delay: 0.15s; }
.phase-draw .logo-simple-3 { transition-delay: 0.25s; }
.phase-draw .logo-simple-4 { transition-delay: 0.4s; }
.phase-draw .logo-simple-5 { transition-delay: 0.52s; }
.phase-draw .logo-simple-6 { transition-delay: 0.62s; }

/* Phase: Studio — stroke-dashoffset animated by JS */

.phase-studio .logo-mark {
  opacity: 1;
  transition: opacity 0.6s ease 0.5s;
}

/* Phase: Settle — logo shrinks to final size */
.phase-settle .hero-logo-wrapper {
  transform: scale(1);
}

/* ==========================================================================
   COPY — Reveals after logo settles
   ========================================================================== */
.hero-copy {
  max-width: 520px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #000000;
  margin-top: 16px;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-copy .hero-copy {
  opacity: 1;
}

/* ==========================================================================
   BY REFERRAL ONLY — Elusive reveal
   ========================================================================== */
.hero-referral {
  font-size: 0.8125rem;
  font-style: italic;
  letter-spacing: -0.03em;
  color: #000000;
  margin-top: 24px;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-copy .hero-referral {
  opacity: 0.8;
  transition-delay: 0.6s;
}

/* ==========================================================================
   CONTACT BUTTON — Flat, reveals last
   ========================================================================== */
.contact-button {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #F4F4F6;
  background: #1A1A1A;
  padding: 12px 26px;
  border-radius: 12px;
  margin-top: 32px;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-button .contact-button {
  opacity: 1;
}

/* ==========================================================================
   HOVER (desktop)
   ========================================================================== */
@media (hover: hover) {
  .contact-button:hover {
    background: #333;
    transition: background 0.2s ease,
                transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateY(-2px);
  }

  .contact-button:active {
    background: #111;
    transform: translateY(1px);
    transition-duration: 0.06s;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .hero-logo-wrapper {
    transform: scale(1.2);
  }

  .phase-settle .hero-logo-wrapper {
    transform: scale(1);
  }

  .contact-button {
    padding: 10px 22px;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-logo-svg {
    transform: none !important;
  }

  .hero-logo-svg .logo-simple {
    clip-path: none !important;
  }

  .hero-logo-svg .logo-studio {
    stroke-dashoffset: 0 !important;
    stroke-dasharray: none !important;
  }

  .hero-logo-svg .logo-mark {
    opacity: 1;
  }

  .hero-logo-wrapper {
    transform: scale(1) !important;
  }

  .hero-copy {
    opacity: 1;
  }

  .hero-referral {
    opacity: 1;
  }

  .contact-button {
    opacity: 1;
  }
}
