:root {
  --ink: #000d25;
  --deep: #081f47;
  --navy-2: #0b2a63;
  --blue: #0263e0;
  --blue-bright: #1866ee;
  --electric: #4d9fff;
  --ice: #d6e6ff;
  --mist: #9bb8e3;
  --paper: #f3f6fb;
  --white: #ffffff;
  --line: rgba(77, 159, 255, 0.16);
  --text: #edf3ff;
  --muted: #9bb8e3;
  --bg: #030814;
  --card: rgba(8, 31, 71, 0.55);
  --btn-text: #ffffff;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --display: "Syne", "Gill Sans", sans-serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-atmosphere="harbor"] {
  --ink: #071833;
  --deep: #0c3a6e;
  --bg: #061427;
  --electric: #6eb0ff;
  --mist: #b7d2f5;
}

[data-atmosphere="paper"] {
  --ink: #000d25;
  --deep: #e8eef8;
  --navy-2: #d5e3f7;
  --bg: #f4f7fb;
  --text: #000d25;
  --muted: #4a5d80;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(2, 99, 224, 0.18);
  --ice: #0263e0;
  --mist: #3d5a80;
  --btn-text: #ffffff;
  --paper: #ffffff;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: background 0.8s var(--ease), color 0.8s var(--ease);
}

body {
  overflow-x: hidden;
}

#aurora,
.glow,
.grain,
.grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  transform: translateZ(0);
}

#aurora {
  width: 100%;
  height: 100%;
  z-index: 0;
  contain: strict;
}

.glow {
  inset: auto;
  width: 42vw;
  height: 42vw;
  max-width: 640px;
  max-height: 640px;
  border-radius: 50%;
  z-index: 1;
  background: radial-gradient(circle, rgba(24, 102, 238, 0.22), transparent 68%);
  left: 0;
  top: 0;
  will-change: transform;
}

[data-atmosphere="paper"] .glow {
  background: radial-gradient(circle, rgba(2, 99, 224, 0.14), transparent 68%);
}

.grain,
.grid {
  z-index: 2;
}

.grain {
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

[data-atmosphere="paper"] .grain {
  opacity: 0.025;
  mix-blend-mode: multiply;
}

.grid {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 78%);
  opacity: 0.5;
}

.nav,
main,
footer {
  position: relative;
  z-index: 3;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 6vw;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  font-size: 1.05rem;
}

.mark {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--electric) 40%, var(--blue) 78%);
  box-shadow: 0 0 18px rgba(77, 159, 255, 0.7);
}

.nav nav {
  margin-left: auto;
  display: flex;
  gap: 1.6rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.3s var(--ease);
}

.nav a:hover,
.nav-cta {
  color: var(--text);
}

.nav-cta {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.atm-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 500 0.78rem var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.atm-btn:hover {
  color: var(--text);
  border-color: var(--electric);
}

.hero {
  padding: 11vh 6vw 8vh;
  max-width: 1180px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  color: var(--electric);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue-bright);
  display: inline-block;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 8.4vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 1.1rem 0 1.6rem;
}

h1 em,
.cycle {
  font-style: italic;
  background: linear-gradient(120deg, var(--ice), var(--electric) 45%, var(--blue-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  min-width: 4.2ch;
  transition: filter 0.8s var(--ease), opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.cycle.is-leaving {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(0.12em);
}

.lede {
  max-width: 38rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.4;
  color: var(--text);
  font-weight: 400;
}

.slogan {
  max-width: 26ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.95rem 1.45rem;
  font-weight: 500;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

.btn.primary {
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  color: var(--btn-text);
  box-shadow: 0 12px 40px rgba(2, 99, 224, 0.35);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(24, 102, 238, 0.45);
}

.btn.ghost {
  color: var(--text);
  border-color: var(--line);
  background: color-mix(in srgb, var(--card) 80%, transparent);
}

.btn.large {
  padding: 1.15rem 1.8rem;
  font-size: 1.15rem;
}

.hint {
  margin-top: 3.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

kbd {
  font-family: var(--sans);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.05rem 0.4rem;
  color: var(--text);
}

.uplift,
.studio,
.contact {
  padding: 10vh 6vw;
}

.uplift-copy {
  max-width: 40rem;
  margin-bottom: 2.4rem;
}

.index {
  color: var(--electric);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0.8rem 0 1.1rem;
}

.studio-frame,
.chain {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.6rem 1.5rem 1.4rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.studio p,
.uplift-copy p,
.contact p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  font-weight: 300;
}

.uplift {
  max-width: 1100px;
}

.chains {
  display: grid;
  gap: 1rem;
  max-width: 52rem;
}

.chain {
  padding: 1.5rem 1.6rem;
}

.chain.faded {
  opacity: 0.7;
}

.chain-label {
  margin: 0 0 0.55rem;
  color: var(--electric);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.chain-flow {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: var(--muted);
}

.chain-flow span {
  color: var(--mist);
  font-weight: 500;
  padding: 0 0.35rem;
}

.chain-flow.accent {
  color: var(--text);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
}

.studio-frame {
  max-width: 640px;
  padding: 2.6rem 2.2rem;
}

.contact h2 {
  max-width: 18ch;
}

.phone {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin-top: 0.4rem;
  text-decoration: none;
  color: inherit;
  outline: none;
}

.phone-kicker {
  color: var(--electric);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

.phone-board {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.phone-group {
  display: flex;
  gap: 0.4rem;
}

.digit {
  display: grid;
  place-items: center;
  min-width: 3.15rem;
  height: 4.4rem;
  padding: 0;
  margin: 0;
  font-style: normal;
  font-weight: 400;
  border-radius: 14px;
  border: 1px solid rgba(77, 159, 255, 0.28);
  background: rgba(8, 31, 71, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 36px rgba(0, 13, 37, 0.22);
  font-family: "Instrument Serif", "Times New Roman", serif;
  font-size: 2.7rem;
  line-height: 1;
  color: #edf3ff;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.5s ease;
}

[data-atmosphere="paper"] .digit {
  background: #ffffff;
  color: #000d25;
  border-color: rgba(2, 99, 224, 0.22);
}

.phone-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #4d9fff;
  opacity: 0.7;
  flex: 0 0 auto;
}

.phone:hover .digit,
.phone:focus-visible .digit {
  border-color: #4d9fff;
  transform: translateY(-3px);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 6vw 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s var(--ease) forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.08s;
}
.reveal:nth-child(3) {
  animation-delay: 0.16s;
}

.chain.reveal {
  animation: none;
  opacity: 0;
  transform: translateY(22px);
}

.chain.reveal.in {
  animation: rise 1.2s var(--ease) forwards;
}

.chain.faded.reveal.in {
  animation: rise-soft 1.2s var(--ease) forwards;
}

.studio-frame.reveal.in,
.contact .reveal.in,
.uplift-copy.reveal.in {
  animation: rise 1.2s var(--ease) forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-soft {
  to {
    opacity: 0.7;
    transform: none;
  }
}

@media (max-width: 900px) {
  .nav nav {
    display: none;
  }

  .hero {
    padding-top: 8vh;
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .phone-board {
    flex-wrap: wrap;
    row-gap: 0.7rem;
  }

  .digit {
    min-width: 2.55rem;
    height: 3.5rem;
    font-size: 2.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .cycle {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
