@font-face {
  font-family: Manrope;
  src: url("assets/manrope-medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #051824;
  --white: #f3faf7;
  --mint: #9fe6d3;
  --muted: #c0d5d8;
  --line: rgba(170, 222, 215, .23);
  --header-height: 78px;
  background: var(--background);
  color: var(--white);
  font: 500 16px/1.5 Manrope, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--mint); outline-offset: 5px; }
.shell { width: min(calc(100% - 112px), 1440px); margin-inline: auto; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  background: var(--background);
}
.header-content {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { display: block; width: clamp(156px, 17vw, 222px); height: auto; }
.header-contact { white-space: nowrap; font-size: 14px; padding-block: 12px; }
.header-contact span { color: var(--mint); margin-left: 6px; }
.header-contact:hover { color: var(--mint); }

.scene, .scene-shade { position: fixed; inset: 0; pointer-events: none; }
.scene { overflow: hidden; z-index: 0; }
.atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 73% 50%, #285e5c55 0, #17454f59 19%, transparent 58%),
    radial-gradient(ellipse at 89% 100%, #16546a58, transparent 61%),
    linear-gradient(115deg, #051824 22%, #082333 72%, #061523);
}
.scene-falcon {
  position: absolute;
  visibility: hidden;
  left: 72%;
  top: 51%;
  width: min(42vw, 660px);
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 27px #97fff143);
}
.static-scene .scene-falcon { visibility: visible; }
.scene canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.scene-shade {
  z-index: 1;
  background: linear-gradient(90deg, #051824f0 0%, #051824ef 20%, #051824d0 34%, #05182445 50%, transparent 66%);
}

.story { position: relative; z-index: 2; }
.chapter {
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: calc(var(--header-height) + 36px) 0 102px;
}
.chapter-content { max-width: 710px; }
h1, h2 { margin: 0; font-weight: 800; letter-spacing: -.055em; word-spacing: .065em; line-height: 1.005; }
h1 { font-size: clamp(58px, 6.35vw, 112px); }
h1 span { display: block; }
h2 { font-size: clamp(53px, 5.6vw, 98px); }
.accent { color: var(--mint); }
.chapter p {
  max-width: 450px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.28vw, 19px);
  line-height: 1.62;
}
.chapter .lead { margin-top: 28px; }
.contact {
  display: inline-flex;
  align-items: center;
  gap: 38px;
  min-height: 49px;
  margin-top: 27px;
  padding-inline: 16px;
  color: #062431;
  background: var(--mint);
  border-radius: 2px;
  font-size: 14px;
}
.contact:hover { background: #dcfff3; }

.scene-controls {
  display: flex;
  position: fixed;
  z-index: 4;
  inset: auto 0 25px;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.scene-controls > * { pointer-events: auto; }
.scroll-link { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.scroll-link:hover { color: var(--white); }
.scroll-arrow, .motion {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: var(--mint);
  background: #051824e6;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 500 16px/1 Arial, sans-serif;
}
.motion { cursor: pointer; }
.motion[hidden] { display: none; }
.motion:hover, .scroll-link:hover .scroll-arrow { border-color: var(--mint); }

@media (max-width: 1050px) {
  .shell { width: calc(100% - 76px); }
}

@media (max-width: 760px) {
  :root { --header-height: 61px; }
  .shell { width: calc(100% - 40px); }
  .header-contact { font-size: 12px; }
  .chapter { align-items: start; padding: calc(var(--header-height) + 42px) 0 min(46svh, 330px); }
  .chapter-content { max-width: 515px; text-shadow: 0 2px 12px #051824cc; }
  h1 { font-size: clamp(45px, 10.65vw, 72px); }
  h2 { font-size: clamp(39px, 9.5vw, 66px); }
  .chapter p { max-width: 380px; margin-top: 15px; line-height: 1.5; }
  .chapter .lead { margin-top: 20px; }
  .contact { margin-top: 18px; text-shadow: none; }
  .scene-falcon { left: 50%; top: 70%; width: min(84vw, 530px); }
  .atmosphere { background: radial-gradient(ellipse at 52% 69%, #174955 0%, #092735 36%, #051824 77%); }
  .scene-shade { background: linear-gradient(180deg, #051824 4%, #051824ed 23%, #051824b0 43%, #05182425 62%, transparent 79%); }
  .scene-controls { bottom: 15px; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .chapter { padding-top: calc(var(--header-height) + 27px); padding-bottom: 29svh; }
  h1 { font-size: clamp(40px, 8.8vw, 56px); }
  h2 { font-size: clamp(35px, 8.4vw, 49px); }
}
@media (max-width: 350px) {
  .shell { width: calc(100% - 30px); }
  .brand img { width: 141px; }
  h1 { font-size: clamp(39px, 12vw, 44px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-link { color: var(--white); }
}
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}
