@font-face {
  font-family: Inter;
  src: url("./fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: Inter, system-ui, sans-serif;
  scrollbar-width: none;
  overscroll-behavior-y: none;
  background: #f8f8f6;
  color: #08090a;
  transition: background-color var(--theme-duration, 560ms) ease-in-out;
}
:root::-webkit-scrollbar { display: none; }
* { box-sizing: border-box; }
body { margin: 0; overflow-x: clip; }
.stage, .stage canvas, .atmosphere { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage { position: fixed; pointer-events: none; overflow: hidden; }
.stage canvas { display: block; opacity: 0; }
.stage[data-renderer="webgl"] canvas { opacity: 1; }
.stage[data-renderer="webgl"] .fallback-glass,
.stage[data-renderer="webgl"] .atmosphere { visibility: hidden; }
.atmosphere {
  background:
    radial-gradient(ellipse at var(--light-x, 72%) var(--light-y, 42%), #c6bfff 0%, transparent 45%),
    radial-gradient(ellipse at 24% 76%, #c0ecf5, transparent 48%),
    radial-gradient(ellipse at 82% 70%, #f0d9ee, transparent 46%),
    linear-gradient(138deg, #fff, #f3f4f9 60%, #f8f8f6);
}
.fallback-glass {
  position: absolute;
  top: 45%;
  left: 72%;
  width: min(42vw, 77vh);
  aspect-ratio: 1.6;
  border: 1px solid #ffffffd9;
  border-radius: 5.8vh;
  transform: translate(-50%, -50%) perspective(130vh) rotateX(-10deg) rotateY(-20deg) rotateZ(-6deg);
  background: linear-gradient(141deg, #ffffffe0, #faffff25 31%, #625bd21c 63%, #ffffffe6);
  box-shadow: inset 0 0 0 2px #ffffff91, inset 0 -7px 18px #766ed73d, 0 16px 38px #53578a30;
  backdrop-filter: blur(12px) saturate(130%);
}
main, footer { position: relative; }
[data-frame] { min-height: 100vh; min-height: 100svh; }
.footer-surface {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: var(--footer-height, 25svh);
}
footer[data-docked] .footer-surface { position: fixed; }
@media (max-width: 760px), (max-aspect-ratio: 117/100) {
  .fallback-glass { left: 50%; top: 28%; width: min(78vw, 58vh); }
}
.brand {
  position: fixed;
  z-index: 1;
  inset-block-start: max(clamp(20px, 4svh, 40px), calc(env(safe-area-inset-top) + 12px));
  inset-inline-start: 50%;
  width: clamp(106px, 10vw, 134px);
  color: #08090a;
  transform: translateX(-50%);
  pointer-events: none;
  transition: color var(--theme-duration, 560ms) ease-in-out;
}
.brand svg { display: block; width: 100%; height: auto; }

:root[data-theme="dark"] {
  color-scheme: dark;
  background: #08090a;
  color: #f8f8f6;
}
[data-theme="dark"] .brand { color: #f8f8f6; }
.atmosphere::after, .fallback-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--theme-duration, 560ms) ease-in-out;
}
[data-theme="dark"] .atmosphere::after,
[data-theme="dark"] .fallback-glass::after { opacity: 1; }
.atmosphere::after {
  background:
    radial-gradient(ellipse at var(--light-x, 72%) var(--light-y, 42%), #382875, transparent 51%),
    radial-gradient(ellipse at 24% 76%, #164654, transparent 49%),
    radial-gradient(ellipse at 82% 70%, #451e48, transparent 46%),
    #08090a;
}
.fallback-glass {
  transition: border-color var(--theme-duration, 560ms) ease-in-out, box-shadow var(--theme-duration, 560ms) ease-in-out;
}
.fallback-glass::after {
  border-radius: inherit;
  background: linear-gradient(141deg, #a9beee42, #0b10202b 31%, #8172da32 63%, #a3caff54);
}
[data-theme="dark"] .fallback-glass {
  border-color: #c9ddff98;
  box-shadow: inset 0 0 0 1px #e7e9ff55, inset 0 -7px 18px #8170f954, 0 16px 38px #0009;
}

.theme-toggle {
  position: fixed;
  z-index: 2;
  inset-block-start: max(clamp(12px, 3svh, 28px), calc(env(safe-area-inset-top) + 6px));
  inset-inline-end: max(16px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #08090a;
  background: transparent;
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle svg {
  grid-area: 1 / 1;
  transition: opacity var(--theme-duration, 560ms) ease-in-out, transform var(--theme-duration, 560ms) ease-in-out;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle:focus-visible {
  outline: 2px solid #08090a;
  outline-offset: -5px;
}
[data-theme="dark"] .theme-toggle:focus-visible { outline-color: #f8f8f6; }
[data-theme="dark"] .theme-sun { color: #f8f8f6; }

.theme-sun { opacity: 0; transform: rotate(-30deg) scale(.72); }
[data-theme="dark"] .theme-moon { opacity: 0; transform: rotate(30deg) scale(.72); }
[data-theme="dark"] .theme-sun { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  :root, .brand, .atmosphere::after, .fallback-glass, .fallback-glass::after, .theme-toggle svg {
    transition: none;
  }
}

.story {
  --story-gutter: clamp(26px, 7vw, 128px);
  position: relative;
}
.story-copy {
  position: absolute;
  top: 50svh;
  left: var(--story-gutter);
  width: min(35vw, 31rem);
  transform: translateY(-50%);
}
.story-right .story-copy {
  left: auto;
  right: var(--story-gutter);
}
.story-center .story-copy {
  top: 77svh;
  left: 50%;
  width: min(76vw, 48rem);
  text-align: center;
  transform: translateX(-50%);
}
.story h1, .story h2 {
  margin: 0;
  font-weight: 560;
  letter-spacing: -.055em;
  line-height: 1.02;
  text-wrap: balance;
}
.story h1 { font-size: clamp(39px, min(5.4vw, 8.6svh), 84px); }
.story h2 { font-size: clamp(34px, min(4.1vw, 7.3svh), 64px); }
.story-center h2 { font-size: clamp(26px, min(3.3vw, 5.2svh), 49px); }
.story p {
  margin: clamp(10px, 2svh, 20px) 0 0;
  font-size: clamp(15px, min(1.45vw, 3svh), 20px);
  line-height: 1.48;
  opacity: .84;
  text-wrap: pretty;
}
.story-center p { margin-top: 8px; }
.story-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: clamp(14px, 3svh, 26px);
  padding: 8px 17px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.story-action:hover { text-decoration: underline; text-underline-offset: .22em; }
.story-action:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
:root { transition-property: background-color, color; }

@media (max-width: 760px), (max-aspect-ratio: 117/100) {
  .story-copy, .story-right .story-copy, .story-center .story-copy {
    top: 72svh;
    bottom: auto;
    left: 50%;
    right: auto;
    width: min(calc(100% - 40px), 28rem);
    text-align: center;
    transform: translate(-50%, -50%);
  }
  .story-options .story-copy { top: 30svh; }
  .story-center .story-copy { top: 72svh; }
  .story-contact .story-copy { top: 72svh; }
  .story h1 { font-size: clamp(30px, min(8.8vw, 7svh), 54px); }
  .story h2, .story-center h2 { font-size: clamp(26px, min(7.1vw, 5.8svh), 46px); }
  .story p { font-size: clamp(14px, 3.8vw, 18px); line-height: 1.4; }
}

.footer-content {
  visibility: hidden;
  display: grid;
  grid-template-columns: minmax(10rem, .7fr) minmax(0, 2.3fr);
  align-content: center;
  gap: clamp(12px, 2.3svh, 24px) clamp(24px, 6vw, 100px);
  height: 100%;
  padding-inline: clamp(24px, 7vw, 128px);
}
footer[data-docked] .footer-content {
  visibility: visible;
  animation: footer-enter 540ms ease-out 90ms both;
}
.footer-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 48px);
}
.footer-content p, .footer-content h2 { margin: 0; }
.footer-logo {
  display: block;
  width: clamp(88px, 9vw, 124px);
  aspect-ratio: 1104 / 280;
  background-color: currentColor;
  -webkit-mask: url("./iyven-wordmark.svg") center / contain no-repeat;
  mask: url("./iyven-wordmark.svg") center / contain no-repeat;
}
.footer-directory h2 {
  font-size: clamp(14px, 1.45vw, 18px);
  font-weight: 650;
  letter-spacing: -.025em;
}
.footer-identity .footer-logo + p, .footer-directory p {
  margin-top: 5px;
  font-size: clamp(11px, 1.14vw, 15px);
  line-height: 1.35;
  opacity: .84;
}
.footer-credit {
  grid-column: 1 / -1;
  padding-top: clamp(7px, 1.4svh, 15px);
  border-top: 1px solid color-mix(in srgb, currentColor 23%, transparent);
  font-size: 11px;
  opacity: .76;
}
@keyframes footer-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (max-width: 760px), (max-aspect-ratio: 117/100) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: clamp(7px, 1.6svh, 15px);
    padding-inline: clamp(16px, 6vw, 38px);
  }
  .footer-directory h2 { font-size: clamp(12px, 3.3vw, 16px); }
  .footer-identity .footer-logo + p, .footer-directory p { font-size: clamp(11px, 2.8vw, 14px); }
}
@media (prefers-reduced-motion: reduce) {
  footer[data-docked] .footer-content { animation: none; }
}

.scroll-cue {
  position: fixed;
  z-index: 3;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  inset-block-end: max(14px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  animation: scroll-cue-reveal 420ms ease-out both;
}
.scroll-cue[hidden] { display: none; }
.scroll-cue svg {
  width: 34px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scroll-cue path {
  transform-box: fill-box;
  transform-origin: center;
  animation: scroll-cue-pull 1.85s ease-in-out 360ms infinite;
}
.scroll-cue path + path { animation-delay: 540ms; }
.scroll-cue:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }
@keyframes scroll-cue-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scroll-cue-pull {
  0%, 72%, 100% { transform: translateY(0) scaleX(1); }
  38% { transform: translateY(4px) scaleX(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue, .scroll-cue path { animation: none; }
}
