:root {
  --apple: #a8e645;
  --apple-bright: #c1ff5d;
  --apple-dark: #6f9a24;
  --ink: #10120e;
  --paper: #f5f3eb;
  --muted: #9ca092;
  --line: rgba(245, 243, 235, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

body {
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  color: var(--ink);
  background: var(--apple);
}

.page {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 560px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 47%, rgba(168, 230, 69, 0.08), transparent 34%),
    linear-gradient(112deg, #10120e 0%, #10120e 41%, #131610 100%);
}

.page::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 18, 14, 0.98) 0%, rgba(16, 18, 14, 0.91) 27%, rgba(16, 18, 14, 0.2) 64%, rgba(16, 18, 14, 0) 100%),
    linear-gradient(0deg, rgba(16, 18, 14, 0.62), transparent 28%);
  content: "";
  pointer-events: none;
}

#scene {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
  touch-action: none;
}

.ambient-glow {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 20%;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(168, 230, 69, 0.08);
  filter: blur(80px);
  transform: translate(50%, -50%);
  pointer-events: none;
}

.grain {
  position: absolute;
  z-index: 9;
  inset: -50%;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
  animation: grain-shift 0.18s steps(2) infinite;
  pointer-events: none;
}

.cursor {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border: 1px solid var(--apple);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 180ms ease, height 180ms ease, opacity 180ms ease, background 180ms ease;
  pointer-events: none;
}

.cursor.is-visible {
  opacity: 0.8;
}

.cursor.is-active {
  width: 42px;
  height: 42px;
  background: rgba(168, 230, 69, 0.14);
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(22px, 3vw, 44px) clamp(24px, 4.5vw, 72px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.055em;
}

.brand-mark {
  display: flex;
  width: 27px;
  height: 19px;
  align-items: end;
  gap: 2px;
}

.brand-mark span {
  display: block;
  width: 6px;
  border-radius: 3px 3px 5px 5px;
  background: var(--apple);
  transform: skewX(-9deg);
}

.brand-mark span:nth-child(1) { height: 17px; }
.brand-mark span:nth-child(2) { height: 10px; }
.brand-mark span:nth-child(3) { height: 18px; }
.brand-mark span:nth-child(4) { height: 12px; }

.classification {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #b2b6a8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple);
  box-shadow: 0 0 0 5px rgba(168, 230, 69, 0.08), 0 0 18px rgba(168, 230, 69, 0.7);
  animation: blink 2.3s ease-in-out infinite;
}

.slash {
  color: #555a4e;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 18px;
  border-bottom: 1px solid rgba(245, 243, 235, 0.5);
  padding: 7px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: color 180ms ease, border-color 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: var(--apple);
  border-color: var(--apple);
}

.contact-arrow {
  font-size: 15px;
  transition: transform 180ms ease;
}

.contact-link:hover .contact-arrow {
  transform: translate(3px, -3px);
}

.hero {
  position: relative;
  z-index: 4;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  padding: 92px clamp(24px, 4.5vw, 72px) 106px;
  pointer-events: none;
}

.hero-copy {
  width: min(52vw, 780px);
  animation: copy-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.eyebrow {
  margin: 0 0 clamp(20px, 3vh, 35px);
  color: #aeb2a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow span {
  margin: 0 8px;
  color: var(--apple);
}

h1 {
  margin: 0;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(74px, 9.6vw, 164px);
  font-weight: 400;
  letter-spacing: -0.078em;
  line-height: 0.72;
}

.accent-line {
  display: block;
  margin-left: 0.4em;
  color: var(--apple);
  font-style: italic;
  white-space: nowrap;
  text-shadow: 0 0 60px rgba(168, 230, 69, 0.1);
}

.descriptor {
  max-width: 560px;
  margin: clamp(35px, 5vh, 64px) 0 0 0.5em;
  color: var(--paper);
  font-size: clamp(17px, 1.55vw, 24px);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.supporting-copy {
  max-width: 440px;
  margin: 14px 0 0 0.72em;
  color: #92968a;
  font-size: 12px;
  line-height: 1.55;
}

.scene-caption {
  position: absolute;
  right: clamp(24px, 4.5vw, 72px);
  bottom: 114px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #777c70;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.55;
  text-transform: uppercase;
}

.caption-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #5b604f;
  border-radius: 50%;
  color: var(--apple);
  font-family: Georgia, serif;
  font-size: 17px;
}

.site-footer {
  position: absolute;
  z-index: 10;
  right: clamp(24px, 4.5vw, 72px);
  bottom: clamp(22px, 3vw, 42px);
  left: clamp(24px, 4.5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.principles {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 54px);
  color: #8f9387;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.principles span {
  white-space: nowrap;
}

.principles b {
  margin-right: 8px;
  color: var(--apple);
  font-weight: 700;
}

.copyright {
  margin: 0;
  color: #686d61;
  font-size: 9px;
  white-space: nowrap;
}

.loader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr minmax(100px, 220px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(24px, 4.5vw, 72px);
  color: var(--paper);
  background: var(--ink);
  transition: opacity 700ms cubic-bezier(0.65, 0, 0.35, 1), visibility 700ms;
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader-word {
  font-family: Georgia, serif;
  font-size: clamp(28px, 4vw, 64px);
  letter-spacing: -0.06em;
}

.loader-line {
  height: 1px;
  overflow: hidden;
  background: #35392f;
}

.loader-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--apple);
  transform: translateX(-100%);
  animation: load-line 1.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loader-status {
  justify-self: end;
  color: #85897e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.noscript-message {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--ink);
  background: var(--apple);
  font-family: Georgia, serif;
  font-size: clamp(28px, 6vw, 70px);
  text-align: center;
}

.no-webgl .ambient-glow {
  right: 3%;
  width: min(70vw, 820px);
  border: 1px solid rgba(168, 230, 69, 0.45);
  background:
    radial-gradient(circle at 36% 34%, var(--apple-bright), var(--apple) 31%, #436511 72%, transparent 73%);
  filter: none;
  animation: fallback-float 8s ease-in-out infinite;
}

@keyframes copy-enter {
  from { opacity: 0; transform: translateY(35px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes load-line {
  to { transform: translateX(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.72); }
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(2%, -3%); }
  50% { transform: translate(-3%, 2%); }
  75% { transform: translate(3%, 4%); }
  100% { transform: translate(-2%, -2%); }
}

@keyframes fallback-float {
  0%, 100% { transform: translate(50%, -50%) scale(0.94) rotate(-4deg); }
  50% { transform: translate(50%, -53%) scale(1.03) rotate(5deg); }
}

@media (max-width: 900px) {
  .page::before {
    background:
      linear-gradient(0deg, rgba(16, 18, 14, 0.96) 0%, rgba(16, 18, 14, 0.77) 47%, rgba(16, 18, 14, 0.1) 100%),
      linear-gradient(90deg, rgba(16, 18, 14, 0.5), transparent);
  }

  .site-header {
    grid-template-columns: 1fr 1fr;
  }

  .classification {
    display: none;
  }

  .hero {
    align-items: end;
    padding-bottom: 142px;
  }

  .hero-copy {
    width: min(88vw, 700px);
  }

  h1 {
    font-size: clamp(68px, 16vw, 125px);
  }

  .descriptor {
    max-width: 480px;
    margin-top: 32px;
  }

  .scene-caption {
    top: 105px;
    right: 24px;
    bottom: auto;
  }

  .principles span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 600px) {
  .page {
    min-height: 500px;
  }

  .site-header {
    padding-top: max(22px, env(safe-area-inset-top));
  }

  .contact-link span:first-child {
    display: none;
  }

  .contact-link {
    width: 38px;
    height: 38px;
    justify-content: center;
    border: 1px solid #5e6357;
    border-radius: 50%;
    padding: 0;
  }

  .hero {
    padding-bottom: 128px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.14em;
  }

  h1 {
    font-size: clamp(61px, 20.5vw, 92px);
    line-height: 0.77;
  }

  .accent-line {
    margin-left: 0.18em;
  }

  .descriptor {
    max-width: 330px;
    margin-top: 27px;
    font-size: 16px;
  }

  .supporting-copy {
    max-width: 300px;
    font-size: 10px;
  }

  .scene-caption {
    display: none;
  }

  .principles {
    gap: 16px;
    font-size: 7px;
    letter-spacing: 0.08em;
  }

  .principles span:nth-child(3) {
    display: none;
  }

  .loader {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .loader-line {
    width: 100%;
  }

  .loader-status {
    justify-self: start;
  }
}

@media (max-height: 700px) and (min-width: 700px) {
  .hero {
    padding-top: 80px;
    padding-bottom: 88px;
  }

  h1 {
    font-size: clamp(68px, 9.2vw, 120px);
  }

  .descriptor {
    margin-top: 30px;
  }

  .site-footer {
    bottom: 22px;
  }

  .scene-caption {
    bottom: 86px;
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor {
    display: none;
  }

  #scene {
    cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
