@font-face {
  font-family: Inter;
  src: url("./inter-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Inter;
  src: url("./inter-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --background: #080b09;
  --text: #f5f7ed;
  --muted: #bbc8bb;
  --line: #29342c;
  --accent: #d6f58b;
  --accent-text: #202b14;
  font-family: Inter, system-ui, "Segoe UI", sans-serif;
  line-height: 1.55;
}

*, *::before, *::after { box-sizing: border-box; }
body.afterglow-home { margin: 0; background: var(--background); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.container { width: min(100% - 96px, 1160px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: #0a0e0b; }
.header-content, .footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.055em;
}
.header-nav, .footer-content nav {
  display: flex;
  align-items: center;
  gap: 32px;
  color: var(--muted);
  font-size: 14px;
}
.header-nav a:hover, .footer-content nav a:hover { color: var(--text); }
.header-action, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 650;
}
.header-action {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.header-action:hover, .home-secondary:hover { border-color: #77846a; }

.hero {
  --scene-hue: 0deg;
  --scene-color: #c6fa99;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 78% 42%, #1a3224 0%, #080b09 59%);
}
.hero[data-theme="void"] { --scene-color: #c8b5ff; }
.hero[data-theme="vesper"] { --scene-hue: -100deg; --scene-color: #e3a5af; }
.hero[data-theme="sova"] { --scene-hue: -46deg; --scene-color: #ffbf8a; }
.hero[data-theme="mika"] { --scene-hue: 201deg; --scene-color: #ffc7da; }
.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-sky::before {
  position: absolute;
  inset: 0;
  content: "";
  background: url("./eclipse.webp") right center / cover no-repeat;
  filter: hue-rotate(var(--scene-hue));
}
.hero-sky::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, #080b09 0%, #080b09f0 24%, #080b0966 52%, transparent 82%),
    linear-gradient(0deg, #080b09 0%, transparent 29%, transparent 79%, #080b0970 100%);
}
.corona {
  position: absolute;
  right: -120px;
  top: -155px;
  width: min(850px, 81vw);
  aspect-ratio: 1;
  background: radial-gradient(ellipse at 75% 35%, #a4fa7512, transparent 60%);
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-height: min(685px, calc(100svh - 78px));
  padding-block: 50px 66px;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1, .section h2 { line-height: 1.03; letter-spacing: -.065em; font-weight: 750; }
.hero h1 { font-size: clamp(3.65rem, 7vw, 6.3rem); font-weight: 800; line-height: .96; letter-spacing: -.078em; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 span { color: var(--text); }
.hero h1 em {
  padding-block: .035em .12em;
  margin-bottom: -.12em;
  color: var(--accent);
  font-style: normal;
  background: linear-gradient(95deg, #f4ffd9 0%, #dcf993 43%, #94dc7b 92%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-copy > p {
  max-width: 430px;
  margin-top: 28px;
  font-size: clamp(1rem, 1.55vw, 1.17rem);
  color: var(--muted);
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.button {
  min-height: 52px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
}
.home-primary { background: var(--accent); color: var(--accent-text); }
.home-primary:hover { background: #e8ffad; }
.hero .home-primary { box-shadow: 0 5px 26px #adf76a42, inset 0 1px #fff8; }
.home-secondary { border-color: #495749; background: #0a0f0bbc; }
.button span, .header-action span { font-size: 16px; line-height: 1; }
.hero-copy > .hero-note { margin-top: 14px; font-size: 12px; }

.hero-demo {
  position: relative;
  width: min(116%, 640px);
  height: clamp(415px, 41vw, 570px);
  min-width: 0;
  margin-inline-start: -2%;
}
.demo-depth {
  position: relative;
  height: 100%;
  pointer-events: none;
  transform-style: preserve-3d;
  transform: perspective(1150px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 240ms ease-out;
}
.demo-card { position: absolute; overflow: hidden; border-radius: clamp(10px, 1.5vw, 22px); }
.demo-back {
  width: 49%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid #6d8c74;
  box-shadow: 0 22px 50px #0009;
}
.demo-night { left: 3%; top: 24%; transform: rotate(-13deg) translateZ(-24px); }
.demo-ember { right: 1.5%; top: 6%; transform: rotate(13deg) translateZ(-18px); border-color: #b3bb83; }
.demo-front {
  width: 62%;
  left: 18%;
  top: 7%;
  border: 1px solid var(--scene-color);
  background: #102119;
  box-shadow: 0 22px 65px #000d, 0 0 35px #a5ff7736;
}
.preview-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  color: #d3dfce;
  font-size: 11px;
  font-weight: 550;
  border-bottom: 1px solid #ffffff17;
}
.preview-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--scene-color); }
.hero-profile { width: 100%; }
.theme-picker {
  position: relative;
  z-index: 2;
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 3px;
  margin: -46px auto 0;
  padding: 4px;
  border: 1px solid #425347;
  border-radius: 11px;
  background: #0b110ded;
}
.theme-picker button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 37px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: 600 12px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.theme-picker button:hover { color: var(--text); }
.theme-picker button[aria-pressed="true"] { color: var(--text); background: #243128; border-color: #485f4d; }
.theme-picker i { width: 8px; height: 8px; border-radius: 50%; background: #c8b5ff; }
.theme-picker [data-theme-button="vesper"] i { background: #e3a5af; }
.theme-picker [data-theme-button="sova"] i { background: #ffbf8a; }
.theme-picker [data-theme-button="mika"] i { background: #ffc7da; }

.section { padding-block: clamp(52px, 7vw, 91px); }
.section h2 { font-size: clamp(2.25rem, 4.4vw, 4rem); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 30px; }
.text-link { color: var(--accent); font-size: 14px; font-weight: 650; flex-shrink: 0; }
.text-link:hover { text-decoration: underline; }
.text-link span { margin-left: 4px; }

.how { border-top: 1px solid var(--line); display: grid; grid-template-columns: 2fr 3fr; gap: 40px; }
.how-title .button { margin-top: 25px; }
.steps { margin: 0; padding-left: 28px; }
.steps li { padding: 0 0 18px 10px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.steps li:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.steps li::marker { color: var(--accent); font-weight: 650; }
.steps h3 { font-size: 18px; line-height: 1.35; letter-spacing: -.025em; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 5px; }
.site-footer { border-top: 1px solid var(--line); }

@media (max-width: 920px) {
  .container { width: calc(100% - 64px); }
  .header-nav { gap: 19px; }
  .hero-layout { gap: 12px; }
  .hero-demo { margin-inline-start: 0; }
  .demo-front { width: 66%; left: 16%; }
}

@media (max-width: 740px) {
  .container { width: calc(100% - 40px); }
  .header-content, .footer-content { min-height: 65px; gap: 12px; }
  .header-nav { display: none; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); min-height: auto; gap: 16px; padding-block: 49px 23px; }
  .hero-sky::before { background-image: url("./eclipse-mobile.webp"); background-position: 71% bottom; background-size: auto 63%; }
  .hero-sky::after {
    background: linear-gradient(180deg, #080b09 0%, #080b09e6 42%, transparent 69%, #080b09 100%);
  }
  .corona { right: -55px; top: auto; bottom: 12px; width: min(500px, 98vw); }
  .hero h1 { font-size: clamp(3.25rem, 11vw, 5.5rem); }
  .hero-copy > p { margin-top: 17px; }
  .hero-actions { margin-top: 23px; }
  .hero-demo { width: min(100%, 500px); height: clamp(280px, 81vw, 453px); justify-self: center; overflow: clip; }
  .demo-depth { transform: none; }
  .demo-back { width: 40%; }
  .demo-night { left: 8%; transform: rotate(-6deg) translateZ(-12px); }
  .demo-ember { right: 8%; transform: rotate(6deg) translateZ(-9px); }
  .demo-front { width: 72%; left: 14%; top: 4%; }
  .theme-picker { margin-top: -23px; }
  .theme-picker button { min-height: 42px; }
  .how { grid-template-columns: minmax(0, 1fr); gap: 27px; }
}

@media (max-width: 440px) {
  .container { width: calc(100% - 32px); }
  .header-action { font-size: 12px; gap: 6px; padding-inline: 9px; min-height: 38px; }
  .hero-actions { display: flex; flex-wrap: nowrap; gap: 7px; }
  .hero-actions .button { padding-inline: 9px; gap: 6px; min-height: 45px; font-size: clamp(10.5px, 3.25vw, 13px); }
  .hero-actions .button span { font-size: 13px; }
  .hero-copy > .hero-note { font-size: 11px; }
  .preview-bar { padding: 7px 10px; font-size: 10px; gap: 6px; }
  .section-heading { align-items: start; flex-direction: column; margin-bottom: 18px; }
  .theme-picker button { padding-inline: 8px; gap: 5px; font-size: 11px; }
  .footer-content nav { gap: 13px; font-size: 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-sky::before { transition: filter 420ms ease-out; }
  .corona { animation: corona-light 4.7s ease-out both; }
  .demo-back { animation: reveal-card 740ms 100ms ease-out both; }
  @keyframes corona-light {
    from { opacity: .25; transform: scale(.96); }
    to { opacity: .9; transform: scale(1); }
  }
  @keyframes reveal-card {
    from { opacity: .4; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-depth { transform: none; transition: none; }
}

@media (forced-colors: active) {
  .hero h1 em { -webkit-text-fill-color: CanvasText; }
}
