/* Concept A — The Observatory (approved direction) */

:root {
  --obsidian: #070B11;
  --charcoal: #101823;
  --moon: #F3F2F0;
  --slate: #B8C0C9;
  --copper: #D8A474;
  --teal: #75DFDF;
  --deep: #16344C;
  --line: rgba(243, 242, 240, .14);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", system-ui, sans-serif;

  /* chat panel tokens */
  --mc-surface: #0B111A;
  --mc-text: var(--moon);
  --mc-muted: var(--slate);
  --mc-line: rgba(243, 242, 240, .12);
  --mc-accent: var(--copper);
  --mc-accent-2: var(--teal);
  --mc-field: rgba(255, 255, 255, .03);
  --mc-user-bg: rgba(117, 223, 223, .1);
  --mc-send-bg: var(--teal);
  --mc-font-display: var(--serif);
  --mc-font-ui: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--moon);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1400px; margin-inline: auto; padding-inline: clamp(20px, 5.5vw, 88px); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  padding: 10px 16px; border-radius: 8px; background: var(--moon); color: var(--obsidian);
  text-decoration: none; font-weight: 500;
}
.skip:focus { top: 16px; }

/* ---------- Masthead ---------- */

.mast { position: absolute; inset: 0 0 auto; z-index: 20; }
.mast__row { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.wordmark {
  font-family: var(--serif); font-size: 34px; letter-spacing: -.01em; line-height: 1;
  text-decoration: none; color: var(--moon);
}
.wordmark span { color: var(--slate); }
.mast__nav { display: flex; gap: clamp(28px, 3.6vw, 52px); }
.mast__nav a {
  font-size: 15.5px; font-weight: 400; letter-spacing: .01em; text-decoration: none;
  padding: 8px 0; position: relative; color: rgba(243, 242, 240, .88);
}
.mast__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.mast__nav a:hover { color: var(--moon); }
.mast__nav a:hover::after { transform: scaleX(1); }
.mast__menu { display: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate;
  min-height: max(740px, 88svh);
  display: flex; align-items: center;
  padding: 130px 0 90px;
  overflow: hidden;
}
.hero__stage { position: absolute; inset: 0; z-index: -1; }
/* pointer + scroll parallax arrive as --px / --py from ambient.js */
.hero__stage picture {
  position: absolute; inset: -3%; display: block;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  will-change: transform;
}
.hero__art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% 50%;
  animation: drift 38s ease-in-out infinite alternate;
  transform-origin: 75% 55%;
}
@keyframes drift {
  from { transform: scale(1.03); }
  50% { transform: scale(1.09) translate(-1.2%, .4%); }
  to { transform: scale(1.14) translate(-2.4%, -.6%); }
}

/* the sun on the horizon breathes */
.hero__glow {
  position: absolute; left: 50%; right: -10%; top: 30%; height: 50%;
  background: radial-gradient(40% 38% at 62% 52%, rgba(255, 196, 130, .38), rgba(216, 164, 116, .12) 45%, transparent 72%);
  mix-blend-mode: screen;
  transform: translate3d(calc(var(--px, 0px) * 1.6), calc(var(--py, 0px) * 1.6), 0);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .45; } }

/* moving ripples on the reflection */
.hero__shimmer {
  position: absolute; left: 30%; right: 0; top: 54%; bottom: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 214, 160, .0) 0 6px, rgba(255, 214, 160, .7) 7px, rgba(255, 214, 160, 0) 8px 14px);
  mix-blend-mode: soft-light; opacity: .46;
  -webkit-mask-image: radial-gradient(62% 72% at 70% 10%, #000 0%, transparent 72%);
          mask-image: radial-gradient(62% 72% at 70% 10%, #000 0%, transparent 72%);
  animation: ripple 5s linear infinite, sway 11s ease-in-out infinite alternate;
}
@keyframes ripple { to { background-position: 0 56px; } }
@keyframes sway { to { transform: skewX(-4deg) translateX(-1.5%); } }

/* the copy lifts and fades as you scroll away (--hp: 0 → 1) */
.hero__inner {
  transform: translate3d(0, calc(var(--hp, 0) * -70px), 0);
  opacity: calc(1 - var(--hp, 0) * .7);
}
.hero__motes { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 11, 17, .78) 0%, rgba(7, 11, 17, .45) 32%, rgba(7, 11, 17, 0) 58%),
    linear-gradient(180deg, rgba(7, 11, 17, .55) 0%, rgba(7, 11, 17, 0) 18%, rgba(7, 11, 17, 0) 72%, var(--obsidian) 100%);
}

.hero__inner { position: relative; }
.hero__title {
  margin: 0 0 26px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 6.6vw, 112px);
  line-height: .96; letter-spacing: -.022em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .45);
}
.hero__title span { display: block; }

/* intro: the headline arrives line by line, then the composer */
.hero__title span, .hero__lede, .ask, .hero__inner > .textlink {
  animation: arrive 1.3s cubic-bezier(.2, .7, .2, 1) both;
}
.hero__title span:nth-child(2) { animation-delay: .12s; }
.hero__title span:nth-child(3) { animation-delay: .24s; }
.hero__lede { animation-delay: .45s; }
.ask { animation-delay: .6s; }
.hero__inner > .textlink { animation-delay: .8s; }
@keyframes arrive { from { opacity: 0; transform: translateY(28px); filter: blur(6px); } }
.hero__title em {
  font-style: italic; color: var(--copper);
  background: linear-gradient(100deg, #F0C79A 0%, var(--copper) 45%, #C98A57 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-right: .06em;
}
.hero__lede {
  margin: 0 0 38px; max-width: 36ch;
  font-size: clamp(18px, 1.45vw, 22px); line-height: 1.5; color: rgba(243, 242, 240, .9);
}

/* Composer */
.ask { width: min(760px, 100%); }
.composer {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 82px; padding: 12px 14px 12px 30px;
  border: 1px solid transparent; border-radius: 26px;
  background:
    linear-gradient(rgba(12, 19, 28, .72), rgba(12, 19, 28, .72)) padding-box,
    conic-gradient(from var(--sweep), rgba(240, 199, 154, .85), rgba(216, 164, 116, .25) 25%, rgba(117, 223, 223, .7) 50%, rgba(216, 164, 116, .25) 75%, rgba(240, 199, 154, .85)) border-box;
  animation: sweep 12s linear infinite;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  transition: box-shadow .35s ease, transform .35s ease;
}
/* a slow light travelling around the composer border */
@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 100deg; }
@keyframes sweep { to { --sweep: 460deg; } }
.composer::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 36px rgba(216, 164, 116, .16); opacity: .7; transition: opacity .35s ease, box-shadow .35s ease;
}
.composer:focus-within::before { opacity: 1; box-shadow: 0 0 44px rgba(117, 223, 223, .2), 0 0 18px rgba(216, 164, 116, .18); }
.composer.is-nudge { animation: nudge .35s ease, sweep 12s linear infinite; }
@keyframes nudge { 30% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }
.composer textarea {
  flex: 1; resize: none; border: 0; outline: 0; background: transparent;
  color: var(--moon); font: inherit; font-size: 19px; font-weight: 300; line-height: 1.45;
  padding: 10px 0; max-height: 160px;
}
.composer textarea::placeholder { color: rgba(243, 242, 240, .62); }
.composer button {
  flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #08161A;
  background: radial-gradient(circle at 35% 30%, #B8F6F4, var(--teal) 55%, #4FC6C9);
  box-shadow: 0 0 0 1px rgba(117, 223, 223, .4), 0 0 26px rgba(117, 223, 223, .45);
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  opacity: .9;
}
.composer.has-text button { opacity: 1; box-shadow: 0 0 0 1px rgba(117, 223, 223, .6), 0 0 34px rgba(117, 223, 223, .7); }
.composer button:hover { transform: scale(1.05); }
.composer button:disabled { cursor: progress; opacity: .5; }
.composer.is-busy button svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer.is-offline { filter: saturate(.3); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; padding: 0; }
.chips button {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 15.5px; font-weight: 400; color: var(--moon);
  background: rgba(10, 15, 22, .45);
  border: 1px solid rgba(216, 164, 116, .55);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.chips li:nth-child(3) button { border-color: rgba(184, 192, 201, .45); }
.chips button i { font-style: normal; transition: transform .25s ease; }
.chips button:hover { border-color: var(--copper); background: rgba(216, 164, 116, .1); }
.chips button:hover i { transform: translateX(3px); }

.disclosure { margin: 18px 0 0; font-size: 14px; color: rgba(184, 192, 201, .92); letter-spacing: .01em; }

.textlink {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 30px;
  padding-bottom: 8px; border-bottom: 1px solid rgba(243, 242, 240, .7);
  font-size: 16.5px; font-weight: 400; text-decoration: none;
  transition: border-color .3s ease, gap .3s ease;
}
.textlink i { font-style: normal; }
.textlink:hover { border-color: var(--copper); gap: 24px; }

/* ---------- Exhibits ---------- */

.exhibits {
  position: relative; margin-top: -40px;
  display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center;
  padding: 0 0 120px;
}
.exhibits__rule { align-self: stretch; background: linear-gradient(transparent, var(--line) 20%, var(--line) 80%, transparent); }
.exhibit { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(20px, 3vw, 48px); }
.exhibit--right { grid-template-columns: 1fr 1.2fr; }
.exhibit--right { padding-left: clamp(24px, 3vw, 56px); }
.exhibit--left { padding-right: clamp(24px, 3vw, 56px); }
.exhibit__art {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  transform: translate3d(0, var(--ey, 0px), 0) scale(1.06);
  -webkit-mask-image: radial-gradient(85% 80% at 50% 55%, #000 55%, transparent 100%);
          mask-image: radial-gradient(85% 80% at 50% 55%, #000 55%, transparent 100%);
}
.exhibit__num {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  font-size: 13px; letter-spacing: .1em; color: var(--slate);
}
.exhibit__num::after { content: ""; width: 26px; height: 1px; background: var(--slate); }
.exhibit h2 {
  margin: 0 0 14px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 3.4vw, 54px); line-height: 1; letter-spacing: -.02em;
}
.exhibit h2.exhibit__title--long { font-size: clamp(32px, 2.7vw, 44px); line-height: 1.04; }
.exhibit p { margin: 0; max-width: 30ch; color: rgba(243, 242, 240, .82); font-size: 16px; }
.exhibit .textlink { margin-top: 26px; font-size: 15.5px; }

/* ---------- Thesis ---------- */

.thesis { padding-top: 120px; padding-bottom: 120px; border-top: 1px solid var(--line); }
.eyebrow { margin: 0 0 28px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--copper); }
.thesis__quote { margin: 0; }
.thesis__quote p {
  margin: 0; max-width: 22ch;
  font-family: var(--serif); font-size: clamp(38px, 4.6vw, 76px); line-height: 1.04; letter-spacing: -.02em;
}
.draft-tag {
  display: inline-block; margin: 26px 0 0; padding: 4px 10px; border-radius: 6px;
  font-size: 12px; letter-spacing: .06em; color: var(--slate); border: 1px dashed rgba(184, 192, 201, .4);
}
.thesis__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin: 72px 0 0; }
.thesis__facts div { padding-top: 22px; border-top: 1px solid var(--line); }
.thesis__facts dt { font-family: var(--serif); font-size: 30px; margin-bottom: 10px; }
.thesis__facts dd { margin: 0; color: rgba(243, 242, 240, .78); max-width: 30ch; }

/* ---------- Field Notes ---------- */

.notes { padding-bottom: 130px; }
.notes__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 40px; }
.notes__head h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 4.4vw, 68px); letter-spacing: -.02em; }
.notes__head .textlink { margin: 0; }
.notes__grid { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-rows: auto auto; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.note {
  display: flex; flex-direction: column; gap: 14px; padding: 36px 38px;
  background: var(--obsidian); text-decoration: none; transition: background .3s ease;
}
.note:hover { background: #0B121B; }
.note--feature { grid-row: span 2; padding: 52px 50px; justify-content: flex-end; min-height: 460px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(22, 52, 76, .55), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(216, 164, 116, .12), transparent 60%),
    var(--obsidian);
}
.note__kind { margin: 0; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.note h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -.01em; }
.note--feature h3 { font-size: clamp(34px, 3.2vw, 50px); max-width: 18ch; }
.note__dek { margin: 0; color: rgba(243, 242, 240, .78); max-width: 52ch; }
.note__meta { margin: auto 0 0; font-size: 13px; color: var(--slate); }

/* ---------- Ask again ---------- */

.again {
  position: relative; isolation: isolate;
  max-width: 980px; padding-top: 100px; padding-bottom: 140px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.again::before {
  content: ""; position: absolute; z-index: -1; left: -30%; right: -30%; bottom: 0; height: 70%;
  background:
    radial-gradient(50% 60% at 50% 100%, rgba(216, 164, 116, .16), transparent 70%),
    radial-gradient(70% 50% at 50% 100%, rgba(117, 223, 223, .08), transparent 75%);
  pointer-events: none;
}
.again .disclosure { max-width: 60ch; }
.again h2 { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 5vw, 80px); letter-spacing: -.02em; line-height: 1; }
.again > p { margin: 0 0 36px; max-width: 46ch; color: rgba(243, 242, 240, .78); }
.composer--compact { width: min(720px, 100%); min-height: 72px; text-align: left; }
.composer--compact button { width: 48px; height: 48px; }

/* ---------- Footer ---------- */

.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.foot__row { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot__line { margin: 12px 0 0; color: var(--slate); font-size: 15px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 14px 32px; align-content: flex-start; max-width: 520px; }
.foot__nav a { text-decoration: none; color: rgba(243, 242, 240, .82); font-size: 15px; }
.foot__nav a:hover { color: var(--copper); }
.foot__legal { margin-top: 48px; font-size: 13px; color: rgba(184, 192, 201, .75); }
.foot__legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ---------- Reveal ---------- */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .exhibits { grid-template-columns: 1fr; gap: 72px; padding-inline: clamp(20px, 5.5vw, 88px); margin-top: 0; }
  .exhibits__rule { display: none; }
  .exhibit--left, .exhibit--right { padding: 0; }
  .exhibit--right .exhibit__art { order: -1; }
}

@media (max-width: 900px) {
  .thesis__facts { grid-template-columns: 1fr; gap: 0; }
  .thesis__facts div { padding: 22px 0; }
  .notes__grid { grid-template-columns: 1fr; }
  .note--feature { grid-row: auto; min-height: 380px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .mast__row { height: 76px; }
  .wordmark { font-size: 28px; }
  .mast__menu {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(7, 11, 17, .5); color: var(--moon);
    font: inherit; font-size: 15px; font-weight: 400; cursor: pointer;
  }
  .mast__nav {
    position: absolute; top: 72px; right: 16px; left: 16px;
    flex-direction: column; gap: 0; padding: 10px 22px;
    background: rgba(11, 17, 26, .96); border: 1px solid var(--line); border-radius: 18px;
    backdrop-filter: blur(12px);
    visibility: hidden; opacity: 0; transform: translateY(-8px); transition: .25s ease;
  }
  .mast__nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .mast__nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .mast__nav a:last-child { border-bottom: 0; }
  .mast__nav a::after { display: none; }

  .hero { align-items: flex-end; min-height: 100svh; padding: 34svh 0 56px; }
  .hero__art { object-position: 50% 20%; }
  .hero__shimmer { display: none; }
  .hero__veil {
    background: linear-gradient(180deg, rgba(7, 11, 17, .35) 0%, rgba(7, 11, 17, 0) 14%, rgba(7, 11, 17, .25) 34%, rgba(7, 11, 17, .82) 52%, var(--obsidian) 72%);
  }
  .hero__title { font-size: clamp(42px, 11.5vw, 60px); margin-bottom: 18px; }
  .hero__lede { margin-bottom: 26px; font-size: 17px; }
  .composer { min-height: 66px; padding: 8px 8px 8px 20px; border-radius: 20px; }
  .composer textarea { font-size: 16.5px; }
  .composer button { width: 48px; height: 48px; }
  .chips { gap: 8px; margin-top: 14px; }
  .chips button { min-height: 44px; padding: 0 16px; font-size: 14.5px; gap: 10px; }
  .disclosure { font-size: 13.5px; }
  .textlink { margin-top: 22px; }

  .exhibit { grid-template-columns: 1fr; gap: 18px; }
  .exhibit__art { aspect-ratio: 16 / 10; }
  .thesis { padding-top: 80px; padding-bottom: 80px; }
  .note, .note--feature { padding: 30px 26px; }
  .again { padding-top: 60px; padding-bottom: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__art, .hero__shimmer, .hero__glow { animation: none; }
  .hero__stage picture, .hero__glow, .hero__inner, .exhibit__art { transform: none; }
  .hero__inner { opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .composer, .chips button, .textlink { transition: none; }
  .composer { animation: none; }
  .hero__title span, .hero__lede, .ask, .hero__inner > .textlink { animation: none; }
}
