:root {
  --ink: #243a33;
  --ink-soft: #3d574c;
  --cream: #f4ead1;
  --paper: #e7d7b0;
  --coral: #c76f59;
  --teal: #416d62;
  --gold: #ddb06d;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #263f37; }
body { color: var(--ink); font-family: var(--sans); overflow-x: hidden; }
a { color: inherit; }
button, input { font: inherit; }

.poster {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background: #b7cac0;
}

.world {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  z-index: -5;
  transform: scale(1.015);
  transform-origin: center;
}

.parallax-layer { transition: transform 1.4s cubic-bezier(.2,.72,.18,1); will-change: transform; }
.paper-noise {
  position: absolute;
  inset: 0;
  z-index: 20;
  opacity: .16;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.21'/%3E%3C/svg%3E");
}

.curtain-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 38%, rgba(34,53,46,.08) 68%, rgba(28,44,39,.28) 100%),
    linear-gradient(90deg, rgba(35,53,46,.20), transparent 15% 84%, rgba(35,53,46,.18));
}

.mist {
  position: absolute;
  z-index: -3;
  width: 46vw;
  height: 12vw;
  min-width: 540px;
  min-height: 120px;
  border-radius: 50%;
  filter: blur(28px);
  opacity: .16;
  background: #fff3d0;
  pointer-events: none;
}
.mist-a { top: 19%; left: -8%; animation: drift 22s ease-in-out infinite alternate; }
.mist-b { top: 34%; right: -12%; animation: drift 28s ease-in-out infinite alternate-reverse; }

.topbar,
.footer {
  position: absolute;
  left: clamp(22px, 4vw, 72px);
  right: clamp(22px, 4vw, 72px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar { top: clamp(22px, 4vh, 52px); }
.footer { bottom: clamp(18px, 3vh, 34px); }

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: .18em;
  font-size: 13px;
  font-weight: 600;
}
.brand-mark { width: 27px; height: 27px; display: grid; place-items: center; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { text-shadow: 0 1px 0 rgba(255,255,255,.28); }
.studio-note,
.annotation {
  font-family: var(--hand);
  color: rgba(41,61,53,.78);
  font-size: clamp(16px, 1.4vw, 22px);
  transform: rotate(-1.8deg);
}

.copy {
  position: absolute;
  z-index: 9;
  width: min(620px, 44vw);
  left: clamp(34px, 8vw, 148px);
  top: 49%;
  transform: translateY(-50%);
}
.eyebrow {
  margin: 0 0 18px;
  letter-spacing: .24em;
  font-size: clamp(10px, .75vw, 12px);
  font-weight: 600;
  color: rgba(41,61,53,.76);
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(64px, 7.2vw, 124px);
  line-height: .86;
  letter-spacing: -.055em;
  color: #20372f;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(255,255,255,.28);
}
h1 em {
  font-weight: 500;
  color: #8d5947;
}
.lead {
  margin: 22px 0 0;
  max-width: 470px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.44;
  color: rgba(36,58,51,.88);
}
.coming-row {
  margin-top: 31px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.coming {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .28em;
  font-size: 11px;
  font-weight: 700;
  color: #fff1d1;
  background: #335f53;
  padding: 10px 13px 9px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 25px rgba(36,58,51,.12);
}

.discipline-note {
  position: absolute;
  z-index: 8;
  right: clamp(28px, 5vw, 86px);
  top: 49%;
  transform: translateY(-50%) rotate(90deg) translateX(50%);
  transform-origin: right center;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(245,233,207,.85);
  font-size: 10px;
  letter-spacing: .17em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(15,35,29,.28);
}
.discipline-note i { opacity: .5; font-style: normal; }

.footer-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  letter-spacing: .13em;
  color: rgba(245,233,207,.78);
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(15,35,29,.32);
}
.links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.links a {
  position: relative;
  text-decoration: none;
  color: rgba(245,233,207,.82);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: color .25s ease, transform .25s ease;
  text-shadow: 0 1px 6px rgba(15,35,29,.32);
}
.links a:hover, .links a:focus-visible { color: #fff6df; transform: translateY(-1px); }
.links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transition: right .25s ease;
}
.links a:hover::after, .links a:focus-visible::after { right: 0; }
.engine-scribble {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  left: 50%;
  top: -42px;
  transform: translate(-50%, 6px) rotate(-5deg);
  white-space: nowrap;
  font-family: var(--hand);
  font-size: 17px;
  color: #f4dfae;
  transition: opacity .2s ease, transform .3s ease;
}
.github-link:hover .engine-scribble, .github-link:focus-visible .engine-scribble { opacity: .9; transform: translate(-50%,0) rotate(-5deg); }

.motion-toggle {
  position: absolute;
  z-index: 12;
  right: clamp(22px, 4vw, 72px);
  bottom: clamp(56px, 7vh, 82px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: rgba(245,233,207,.7);
  padding: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 9px;
}
.motion-dot { width: 6px; height: 6px; border-radius: 50%; background: #f2c26d; box-shadow: 0 0 0 4px rgba(242,194,109,.12); animation: pulse 2.4s ease-in-out infinite; }
.motion-toggle[aria-pressed="true"] .motion-dot { animation: none; opacity: .5; }

.dust { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.dust i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff0c8; opacity: .42; animation: dustFloat linear infinite; }

.window-glow { animation: windowBreath 4.4s ease-in-out infinite; }
.core-glow { transform-box: fill-box; transform-origin: center; animation: coreBreath 2.8s ease-in-out infinite; }
.blink-light { animation: blink 6s steps(1) infinite; }
.notes { animation: paperShift 7s ease-in-out infinite alternate; }
.foreground { animation: leafSway 8s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: bottom center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  translate: -50% 16px;
  opacity: 0;
  pointer-events: none;
  background: rgba(35,56,48,.92);
  color: #f6ead0;
  border: 1px solid rgba(246,234,208,.18);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .05em;
  transition: opacity .25s ease, translate .25s ease;
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; translate: -50% 0; }

body.motion-paused *, body.motion-paused *::before, body.motion-paused *::after { animation-play-state: paused !important; }
body.motion-paused .parallax-layer { transform: none !important; }

@keyframes drift { from { transform: translate3d(-2vw,0,0) scale(1); } to { transform: translate3d(7vw,2vh,0) scale(1.08); } }
@keyframes pulse { 0%,100% { opacity:.55; box-shadow: 0 0 0 3px rgba(242,194,109,.08);} 50% {opacity:1; box-shadow:0 0 0 7px rgba(242,194,109,.14);} }
@keyframes dustFloat { from { transform: translate3d(0,15px,0); opacity:0; } 18% {opacity:.45;} 82% {opacity:.3;} to { transform: translate3d(22px,-120px,0); opacity:0;} }
@keyframes windowBreath { 0%,100% { opacity:.42;} 48% {opacity:.72;} 52% {opacity:.58;} }
@keyframes coreBreath { 0%,100% { transform: scale(.93); opacity:.88;} 50% {transform:scale(1.07); opacity:1;} }
@keyframes blink { 0%,82%,86%,100%{opacity:1;} 83%,85%{opacity:.2;} }
@keyframes paperShift { from { transform: translate3d(0,-2px,0) rotate(-.3deg);} to {transform:translate3d(3px,5px,0) rotate(.25deg);} }
@keyframes leafSway { from { transform: rotate(-.18deg);} to {transform:rotate(.22deg);} }

@media (max-width: 980px) {
  .copy { width: min(650px, 72vw); left: clamp(28px, 6vw, 70px); top: 47%; }
  .discipline-note { display: none; }
  h1 { font-size: clamp(66px, 10.5vw, 104px); }
  .studio-note { display: none; }
}

@media (max-width: 680px) {
  .poster { min-height: 100svh; height: 100svh; }
  .world { width: 145%; height: 108%; left: -22%; inset-block: -4%; }
  .topbar, .footer { left: 20px; right: 20px; }
  .topbar { top: 20px; }
  .brand { letter-spacing: .14em; font-size: 11px; }
  .brand-mark { width: 23px; height: 23px; }
  .copy {
    left: 22px;
    right: 22px;
    top: auto;
    bottom: 18.5vh;
    transform: none;
    width: auto;
    max-width: 90%;
  }
  .eyebrow { font-size: 9px; margin-bottom: 13px; color: rgba(245,233,207,.72); text-shadow: 0 1px 8px rgba(20,40,33,.3); }
  h1 { font-size: clamp(54px, 15vw, 78px); color: #f6eacb; text-shadow: 0 2px 16px rgba(18,39,32,.23); }
  h1 em { color: #f0b681; }
  .lead { max-width: 390px; margin-top: 16px; font-size: 17px; line-height: 1.38; color: rgba(248,237,214,.87); text-shadow: 0 2px 12px rgba(18,39,32,.25); }
  .coming-row { margin-top: 21px; gap: 12px; }
  .coming { font-size: 9px; padding: 9px 10px 8px 13px; }
  .annotation { color: rgba(248,237,214,.78); font-size: 15px; }
  .footer { bottom: 16px; align-items: flex-end; }
  .footer-copy { font-size: 8px; gap: 9px; }
  .links { gap: 12px; }
  .links a { font-size: 9px; }
  .links a:nth-child(1), .links a:nth-child(2) { display: none; }
  .motion-toggle { display: none; }
}

@media (max-height: 720px) and (min-width: 681px) {
  .copy { top: 48%; transform: translateY(-50%) scale(.88); transform-origin: left center; }
  .footer { bottom: 16px; }
  .motion-toggle { bottom: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .parallax-layer { transition: none !important; }
  .motion-toggle { display: none; }
}
