@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #f7f7f4;
  --bg-accent: rgba(17, 17, 17, 0.022);
  --fg: #101010;
  --fg-soft: rgba(16, 16, 16, 0.54);
  --surface-rgb: 255, 255, 255;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(16, 16, 16, 0.08);
  --line-strong: rgba(16, 16, 16, 0.17);
  --grid: rgba(16, 16, 16, 0.038);
  --spot: rgba(16, 16, 16, 0.075);
  --halo: rgba(16, 16, 16, 0.052);
  --shadow: 0 24px 60px rgba(16, 16, 16, 0.08);
  --button-active-bg: #111111;
  --button-active-fg: #ffffff;
  --button-idle-fg: rgba(16, 16, 16, 0.68);
  --pointer-x: 50%;
  --pointer-y: 20%;
  --orb-shift-x: 0px;
  --orb-shift-y: 0px;
}

html[data-theme="dark"] {
  --bg: #090909;
  --bg-accent: rgba(245, 245, 241, 0.018);
  --fg: #f5f5f1;
  --fg-soft: rgba(245, 245, 241, 0.66);
  --surface-rgb: 10, 10, 10;
  --surface: rgba(10, 10, 10, 0.7);
  --surface-strong: rgba(14, 14, 14, 0.84);
  --line: rgba(245, 245, 241, 0.12);
  --line-strong: rgba(245, 245, 241, 0.3);
  --grid: rgba(245, 245, 241, 0.045);
  --spot: rgba(245, 245, 241, 0.11);
  --halo: rgba(245, 245, 241, 0.058);
  --shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
  --button-active-bg: #f5f5f1;
  --button-active-fg: #090909;
  --button-idle-fg: rgba(245, 245, 241, 0.74);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(circle at top, var(--bg-accent), transparent 34%),
    var(--bg);
  color: var(--fg);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  inset: -10% -8% 8%;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), var(--spot), transparent 28%),
    radial-gradient(circle at 84% 16%, var(--bg-accent), transparent 26%);
  transform: translate3d(var(--orb-shift-x), var(--orb-shift-y), 0);
  animation: background-float 18s ease-in-out infinite alternate;
  will-change: transform;
}

body::after {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.62;
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.78), transparent 84%);
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.78), transparent 84%);
}

.topbar {
  position: fixed;
  top: 1rem;
  left: 0;
  z-index: 10;
  width: 100%;
  padding: 0 1rem;
}

.topbar-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 74rem);
  margin: 0 auto;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  background:
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.84), rgba(var(--surface-rgb), 0.7)),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(145%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--fg);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid currentColor;
  border-radius: 0.2rem;
  transform: rotate(45deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.22rem;
  background: currentColor;
  border-radius: 0.1rem;
}

.brand-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.24rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.72);
}

.theme-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--button-idle-fg);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.62rem 0.95rem;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.theme-button:hover {
  transform: translateY(-1px);
}

.theme-button.is-active {
  background: var(--button-active-bg);
  color: var(--button-active-fg);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.landing {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(6.8rem, 11vw, 8.6rem) 1.5rem 2.5rem;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 78rem);
  min-height: 22rem;
  contain: layout paint;
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 62rem);
  min-height: clamp(20rem, 54vh, 31rem);
  padding: clamp(2.5rem, 6vw, 4.5rem);
}

.hero-stage::before,
.hero-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2.25rem;
  pointer-events: none;
}

.hero-stage::before {
  background:
    radial-gradient(circle at 50% 42%, var(--halo), transparent 42%),
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.18), transparent 60%);
  filter: blur(2px);
}

.hero-stage::after {
  inset: 11% 6%;
  border: 1px solid var(--line);
  opacity: 0.52;
}

.hero-glow {
  position: absolute;
  inset: auto 12% 16%;
  height: clamp(5rem, 16vw, 8rem);
  border-radius: 999px;
  background: radial-gradient(circle, var(--halo), transparent 70%);
  filter: blur(22px);
  opacity: 0.9;
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  width: clamp(12rem, 20vw, 16rem);
  height: clamp(12rem, 20vw, 16rem);
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.58;
  pointer-events: none;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.8;
}

.hero-orbit-left {
  left: 3%;
  top: 12%;
  transform: rotate(-12deg);
}

.hero-orbit-right {
  right: 4%;
  bottom: 12%;
  transform: rotate(14deg);
}

.hero-copy {
  position: relative;
  display: inline-block;
  margin: 0;
  max-width: min(100%, 22ch);
  color: var(--fg);
  font-family: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.65rem, 5.4vw, 5.35rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.09em;
  text-align: center;
  text-wrap: balance;
  opacity: 0;
  transform: translate3d(0, 20px, 0) scale(0.97);
}

.hero-copy::before,
.hero-copy::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(2.5rem, 10vw, 6rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
  opacity: 0.8;
}

.hero-copy::before {
  right: calc(100% + clamp(0.8rem, 2vw, 1.5rem));
}

.hero-copy::after {
  left: calc(100% + clamp(0.8rem, 2vw, 1.5rem));
  transform: scaleX(-1);
}

.hero-copy.is-ready {
  animation: hero-enter 840ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.hero-copy-text {
  display: inline;
  min-height: 1em;
  will-change: transform;
}

.js .hero-copy-text {
  opacity: 0;
}

.js .hero-copy.is-ready .hero-copy-text {
  opacity: 1;
}

.hero-copy.is-floating .hero-copy-text {
  animation: text-breathe 6.8s ease-in-out infinite;
}

.hero-cursor {
  display: inline-block;
  width: 0.11em;
  height: 0.82em;
  margin-left: 0.08em;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  vertical-align: -0.08em;
}

.hero-copy.is-typing .hero-cursor,
.hero-copy.is-floating .hero-cursor {
  opacity: 1;
  animation: cursor-blink 1s steps(1, end) infinite;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 20px, 0) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes text-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.017);
  }
}

@keyframes cursor-blink {
  0%,
  48% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes background-float {
  0% {
    transform: translate3d(calc(var(--orb-shift-x) - 12px), calc(var(--orb-shift-y) - 8px), 0)
      scale(1);
  }

  100% {
    transform: translate3d(calc(var(--orb-shift-x) + 12px), calc(var(--orb-shift-y) + 8px), 0)
      scale(1.035);
  }
}

@media (max-width: 860px) {
  .hero-copy::before,
  .hero-copy::after,
  .hero-orbit {
    display: none;
  }

  .hero-stage {
    min-height: 20rem;
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 700px) {
  body {
    overflow: clip;
  }

  .topbar {
    top: 0.75rem;
    padding: 0 0.75rem;
  }

  .topbar-panel {
    padding: 0.75rem;
    border-radius: 1.15rem;
  }

  .brand-label {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
  }

  .theme-button {
    padding: 0.58rem 0.82rem;
  }

  .landing {
    padding-top: 6rem;
  }

  .hero {
    min-height: 18rem;
  }

  .hero-stage {
    width: min(100%, 30rem);
    min-height: 18rem;
    padding: 1.5rem 1rem;
  }

  .hero-stage::after {
    inset: 8% 4%;
  }

  .hero-copy {
    max-width: min(100%, 11ch);
    font-size: clamp(2.2rem, 10.4vw, 4rem);
    line-height: 0.97;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .hero-copy,
  .hero-copy-text,
  .hero-cursor {
    animation: none !important;
  }

  .hero-copy {
    opacity: 1;
    transform: none;
  }

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

  .hero-cursor {
    opacity: 0;
  }
}
