:root {
  --bg: #f4f0e7;
  --panel: #f7f3ed;
  --graphite: #24221f;
  --graphite-soft: rgba(36, 34, 31, 0.7);
  --sand: #d5c3a0;
  --oxide: #914d3b;
  --sage: #737f79;
  --line: rgba(36, 34, 31, 0.16);
  --shadow: rgba(36, 34, 31, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(213, 195, 160, 0.25), transparent 32%),
    linear-gradient(135deg, #f2efe9 0%, #f7f4ee 44%, #eeeadf 100%);
  color: var(--graphite);
  font-family: "Inter", "Segoe UI", sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

button,
a {
  font: inherit;
}

.page-shell {
  width: min(1320px, calc(100vw - 56px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.masthead,
.hero,
.footer {
  width: min(1216px, 100%);
  margin: 0 auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 22px;
  border-bottom: 1px solid var(--line);
  animation: arrive 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: var(--graphite);
}

.brand-mark {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid var(--graphite);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(36, 34, 31, 0.03);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid var(--graphite);
}

.brand-mark-core {
  position: absolute;
  inset: 7px;
  background: var(--graphite);
  border-radius: 2px;
  transform: rotate(45deg);
}

.brand-word {
  font-size: 0.73rem;
  letter-spacing: 0.34em;
}

.brand-meta {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--graphite-soft);
}

.hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: min(4vw, 72px);
  padding: clamp(32px, 5vw, 72px) 0 20px;
}

.content-block {
  position: relative;
  z-index: 2;
}

.content-block > * {
  animation: arrive 800ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.content-block > :nth-child(1) { animation-delay: 100ms; }
.content-block > :nth-child(2) { animation-delay: 220ms; }
.content-block > :nth-child(3) { animation-delay: 340ms; }
.content-block > :nth-child(4) { animation-delay: 460ms; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--graphite-soft);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(3.1rem, 4.8vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: -0.09em;
  font-weight: 700;
  color: var(--graphite);
}

.headline-accent {
  position: relative;
  display: inline-block;
}

.headline-accent::after {
  position: absolute;
  right: 0.04em;
  bottom: -0.06em;
  left: 0;
  height: 0.075em;
  content: "";
  background: var(--oxide);
  transform: scaleX(1);
  transform-origin: left;
  animation: underline-arrive 800ms cubic-bezier(0.2, 0.7, 0.2, 1) 650ms both;
}

.lede {
  max-width: 550px;
  margin: 24px 0 0;
  font-size: clamp(1.04rem, 1.5vw, 1.36rem);
  line-height: 1.6;
  color: rgba(36, 34, 31, 0.72);
  font-weight: 400;
}

.actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.primary-action {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.96rem 1.4rem;
  border: 1px solid var(--graphite);
  background: var(--graphite);
  color: var(--bg);
  text-decoration: none;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.primary-action::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 20%, rgba(244, 240, 231, 0.28) 48%, transparent 76%);
  transform: translateX(-130%);
  transition: transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: transparent;
  color: var(--graphite);
  box-shadow: 4px 4px 0 var(--sand);
}

.primary-action:hover::after,
.primary-action:focus-visible::after {
  transform: translateX(130%);
}

.primary-action:focus-visible {
  outline: 2px solid var(--oxide);
  outline-offset: 4px;
}

.micro-note {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--graphite-soft);
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.micro-note span {
  display: inline-block;
  position: relative;
}

.micro-note span + span::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--line);
  position: absolute;
  left: -17px;
  top: 50%;
  transform: translateY(-50%);
}

.visual-block {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-panel {
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  width: min(540px, 100%);
  aspect-ratio: 1.05;
  display: grid;
  place-items: center;
  border: 1px solid rgba(36, 34, 31, 0.12);
  background:
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(213, 195, 160, 0.32), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(213, 195, 160, 0.05));
  box-shadow: 0 18px 48px rgba(36, 34, 31, 0.08);
  overflow: hidden;
  animation: panel-arrive 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms both;
}

.nebula {
  position: absolute;
  inset: -18%;
  z-index: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(145, 77, 59, 0.12), transparent 34%),
    radial-gradient(ellipse at 70% 34%, rgba(115, 127, 121, 0.16), transparent 31%),
    radial-gradient(ellipse at 62% 76%, rgba(125, 120, 150, 0.12), transparent 35%);
  filter: blur(18px);
  animation: nebula-drift 18s ease-in-out infinite alternate;
}

.visual-panel::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(115deg, transparent 24%, rgba(255, 255, 255, 0.32) 47%, transparent 66%);
  transform: translateX(-120%);
  animation: panel-sheen 1400ms cubic-bezier(0.2, 0.7, 0.2, 1) 700ms both;
}

.starfield {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 0 8px 2px rgba(255, 253, 247, 0.76), 0 0 18px rgba(213, 195, 160, 0.75);
  animation: star-twinkle 3s ease-in-out infinite;
}

.star-one { top: 18%; left: 34%; animation-delay: 0.2s; }
.star-two { top: 28%; right: 17%; width: 2px; height: 2px; animation-delay: 1.1s; }
.star-three { bottom: 21%; left: 31%; width: 2px; height: 2px; animation-delay: 1.8s; }
.star-four { top: 68%; right: 24%; animation-delay: 0.8s; }
.star-five { top: 48%; left: 12%; width: 2px; height: 2px; animation-delay: 2.3s; }

.shooting-star {
  position: absolute;
  top: 18%;
  left: 78%;
  width: 68px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 253, 247, 0.95), transparent);
  filter: drop-shadow(0 0 4px rgba(255, 253, 247, 0.9));
  transform: rotate(35deg);
  transform-origin: right;
  animation: shooting-star 8s ease-in-out 2s infinite;
}

.constellation {
  position: absolute;
  z-index: 2;
  inset: 4%;
  width: 92%;
  height: 92%;
  overflow: visible;
  fill: #fffdf7;
  filter: drop-shadow(0 0 3px rgba(255, 253, 247, 0.95));
  pointer-events: none;
}

.constellation-path {
  fill: none;
  stroke: rgba(145, 77, 59, 0.52);
  stroke-width: 0.22;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: constellation-draw 3.2s ease-out 900ms forwards;
}

.constellation-path-secondary {
  stroke: rgba(115, 127, 121, 0.52);
  animation-delay: 1.35s;
}

.portrait-card {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: clamp(156px, 36%, 196px);
  margin: 0;
  padding: 8px;
  border: 1px solid var(--graphite);
  background: var(--bg);
  box-shadow: 8px 8px 0 rgba(213, 195, 160, 0.82);
  transform: translate(-50%, -46%) rotate(2deg);
  animation:
    card-arrive 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 380ms both,
    card-float 6s ease-in-out 1400ms infinite;
}

.portrait-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 43%;
  background: var(--sand);
}

.portrait-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 2px 2px;
  color: var(--graphite);
  font-family: "Courier New", monospace;
  font-size: 0.49rem;
  letter-spacing: 0.13em;
  line-height: 1.3;
}

.portrait-card figcaption span + span {
  color: #625b4f;
}

.moon-halo {
  position: absolute;
  z-index: 1;
  inset: 12% 14%;
  border-radius: 50%;
  border: 1px solid rgba(36, 34, 31, 0.12);
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2), rgba(213, 195, 160, 0.08) 64%, transparent 68%);
  animation: halo-breathe 5s ease-in-out infinite;
}

.moon-disc {
  position: absolute;
  z-index: 1;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, #f8f4ef 0%, #e5dfd4 100%);
  box-shadow: inset -14px -16px 30px rgba(36, 34, 31, 0.06), inset 10px 12px 24px rgba(255,255,255,0.9);
  transform: translate(-18%, 8%);
  animation: moon-shimmer 7s ease-in-out infinite;
}

.moon-outline {
  position: absolute;
  z-index: 1;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(36, 34, 31, 0.62);
  border-radius: 50%;
  transform: translate(12%, -14%);
  box-shadow: inset 0 0 0 16px rgba(36, 34, 31, 0.02);
  animation: orbit-turn 48s linear infinite;
}

.foundation-grid {
  position: absolute;
  inset: 0;
}

.grid-line {
  position: absolute;
  display: block;
  background: rgba(36, 34, 31, 0.12);
}

.line-a,
.line-b,
.line-c,
.line-d {
  width: 1px;
  height: 100%;
  left: 23%;
  top: 0;
}

.line-b { left: 52%; }
.line-c { left: 73%; }
.line-d { left: 28%; width: 100%; height: 1px; top: 42%; }

.line-a::before,
.line-b::before,
.line-c::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(36,34,31,0.18) 100%);
}

.structure-block {
  position: absolute;
  inset: 23% 15% 18% 18%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14%;
  align-items: end;
  transform: rotate(-4deg);
}

.block {
  display: block;
  position: relative;
  border: 1px solid rgba(36, 34, 31, 0.3);
  background: rgba(36, 34, 31, 0.025);
  box-shadow: inset 0 0 0 1px rgba(244, 240, 231, 0.5);
}

.block-1 {
  height: 42%;
  transform-origin: bottom;
  animation: build-block 850ms cubic-bezier(0.2, 0.7, 0.2, 1) 520ms both;
}

.block-2 {
  height: 68%;
  transform-origin: bottom;
  animation: build-block 850ms cubic-bezier(0.2, 0.7, 0.2, 1) 680ms both;
}

.block-3 {
  height: 54%;
  transform-origin: bottom;
  animation: build-block 850ms cubic-bezier(0.2, 0.7, 0.2, 1) 840ms both;
}

.adaptive-line {
  position: absolute;
  width: 54%;
  height: 1px;
  background: linear-gradient(90deg, rgba(36,34,31,0), rgba(36,34,31,0.65) 18%, rgba(36,34,31,0.65) 82%, rgba(36,34,31,0));
  left: 23%;
  top: 55%;
  transform: rotate(-26deg);
  box-shadow: 0 0 0 1px rgba(36,34,31,0.06);
  transform-origin: 50% 50%;
  animation: line-glint 5s ease-in-out 1.2s infinite;
}

.adaptive-line::after {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--oxide);
  box-shadow: 0 0 0 4px rgba(145, 77, 59, 0.12), 0 0 14px rgba(145, 77, 59, 0.45);
  animation: trace-pass 4.8s cubic-bezier(0.4, 0, 0.2, 1) 1.4s infinite;
}

.edge-glow {
  position: absolute;
  width: 58%;
  height: 58%;
  right: 10%;
  bottom: 8%;
  border: 1px solid rgba(145, 77, 59, 0.22);
  transform: rotate(-18deg);
  background: linear-gradient(135deg, rgba(145, 77, 59, 0.08), transparent 64%);
  animation: edge-breathe 6s ease-in-out infinite;
}

.orbit {
  position: absolute;
  z-index: 1;
  inset: 12%;
  border: 1px solid rgba(115, 127, 121, 0.25);
  border-radius: 50%;
  pointer-events: none;
  animation: orbit-turn 32s linear infinite;
}

.orbit-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  border: 1px solid var(--graphite);
  background: var(--bg);
  box-shadow: 0 0 0 4px rgba(213, 195, 160, 0.3);
  transform: rotate(45deg);
  animation: sparkle 2.8s ease-in-out infinite;
}

.orbit-spark-one {
  top: 12%;
  left: 16%;
  background: var(--oxide);
  animation-delay: 0.2s;
}

.orbit-spark-two {
  top: 62%;
  right: 8%;
  width: 7px;
  height: 7px;
  background: var(--sage);
  animation-delay: 1s;
}

.orbit-spark-three {
  bottom: 7%;
  left: 39%;
  width: 6px;
  height: 6px;
  animation-delay: 1.7s;
}

.trace-node {
  position: absolute;
  z-index: 1;
  width: 8px;
  height: 8px;
  border: 1px solid var(--sage);
  background: var(--bg);
  transform: rotate(45deg);
}

.trace-node-one {
  top: 24%;
  right: 18%;
  animation: node-pulse 3.6s ease-in-out 500ms infinite;
}

.trace-node-two {
  bottom: 18%;
  left: 20%;
  width: 6px;
  height: 6px;
  border-color: var(--oxide);
  animation: node-pulse 3.6s ease-in-out 1.6s infinite;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--graphite-soft);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.divider {
  width: 54px;
  height: 1px;
  background: rgba(36, 34, 31, 0.28);
}

@keyframes arrive {
  from {
    opacity: 0;
    translate: 0 18px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes panel-arrive {
  from {
    opacity: 0;
    scale: 0.94;
    rotate: -2deg;
  }
  to {
    opacity: 1;
    scale: 1;
    rotate: 0deg;
  }
}

@keyframes panel-sheen {
  to { transform: translateX(120%); }
}

@keyframes card-arrive {
  from {
    opacity: 0;
    scale: 0.82;
    rotate: -9deg;
  }
  to {
    opacity: 1;
    scale: 1;
    rotate: 0deg;
  }
}

@keyframes card-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@keyframes halo-breathe {
  0%, 100% { scale: 0.98; opacity: 0.72; }
  50% { scale: 1.03; opacity: 1; }
}

@keyframes orbit-turn {
  to { rotate: 360deg; }
}

@keyframes sparkle {
  0%, 100% { scale: 0.72; opacity: 0.55; }
  50% { scale: 1.2; opacity: 1; }
}

@keyframes line-glint {
  0%, 100% { opacity: 0.52; }
  50% { opacity: 1; }
}

@keyframes underline-arrive {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes moon-shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

@keyframes build-block {
  from {
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes trace-pass {
  0%, 12% { left: 0; opacity: 0; }
  18% { opacity: 1; }
  82% { opacity: 1; }
  94%, 100% { left: calc(100% - 7px); opacity: 0; }
}

@keyframes edge-breathe {
  0%, 100% { opacity: 0.58; }
  50% { opacity: 1; }
}

@keyframes node-pulse {
  0%, 100% { opacity: 0.5; scale: 0.75; }
  50% { opacity: 1; scale: 1.2; }
}

@keyframes nebula-drift {
  from { transform: translate(-2%, 1%) scale(0.96); }
  to { transform: translate(2%, -1%) scale(1.05); }
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.65); }
  50% { opacity: 1; transform: scale(1.35); }
}

@keyframes shooting-star {
  0%, 58% { opacity: 0; transform: translate(0, 0) rotate(35deg); }
  60% { opacity: 1; }
  68% { opacity: 0; transform: translate(-220px, 155px) rotate(35deg); }
  100% { opacity: 0; transform: translate(-220px, 155px) rotate(35deg); }
}

@keyframes constellation-draw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 960px) {
  .page-shell {
    width: min(100vw - 28px, 100%);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }

  .visual-panel {
    width: min(460px, 100%);
  }
}

@media (max-width: 620px) {
  .masthead {
    padding-bottom: 18px;
  }

  .brand-meta {
    display: none;
  }

  h1 {
    font-size: clamp(2.25rem, 11vw, 4.25rem);
    letter-spacing: -0.07em;
  }

  .lede {
    max-width: 100%;
    font-size: 1.02rem;
  }

  .actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .primary-action {
    width: 100%;
    text-align: center;
  }

  .micro-note {
    gap: 10px 14px;
    letter-spacing: 0.15em;
    font-size: 0.52rem;
  }

  .portrait-card {
    width: clamp(148px, 48%, 176px);
  }

  .footer {
    letter-spacing: 0.12em;
    gap: 0.8rem;
  }

  .divider {
    width: 26px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
