/* Websight Studios — base, nav, cursor, loader, hero */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 4px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; } /* sections that receive focus from in-page links */
::selection { background: var(--c-iris-glow); color: var(--c-ink); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--s-4); top: var(--s-4); z-index: calc(var(--z-loader) + 1); padding: var(--s-3) var(--s-5); background: var(--c-sclera); color: var(--c-ink); border-radius: var(--r-pill); transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- Type roles ---------- */
.display { font-family: var(--f-display); font-stretch: 118%; font-weight: 780; line-height: 0.9; letter-spacing: -0.035em; margin: 0; }
.mono { font-family: var(--f-mono); font-weight: 400; letter-spacing: 0; }
.label { font-family: var(--f-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.12em; }
.lede { font-size: var(--fs-lg); line-height: 1.4; max-width: 34ch; }
.bracket { color: var(--accent-on-dark); font-family: var(--f-mono); font-weight: 400; }
.light .bracket { color: var(--accent-text-light); }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--section-y) var(--gutter); }
.dark { background: var(--bg-dark); color: var(--text-on-dark); }
.light { background: var(--bg-light); color: var(--text-on-light); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: var(--btn-h); padding: 0 var(--btn-pad-x);
  border-radius: var(--r-pill);
  font-family: var(--f-mono); font-size: var(--fs-sm); letter-spacing: 0.02em;
  transition: transform var(--d-fast) var(--ease-out), background-color var(--d-base) var(--ease-out), color var(--d-base) var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(0.96); }
.btn--solid { background: var(--c-sclera); color: var(--c-ink); }
.btn--solid:hover { background: var(--c-iris-glow); }
.light .btn--solid { background: var(--c-ink); color: var(--c-sclera); }
.light .btn--solid:hover { background: var(--c-iris-deep); }
.btn--ghost { color: inherit; padding: 0 var(--s-2); }
.btn--ghost:hover { color: var(--accent-on-dark); }
.btn .b { opacity: 0.55; transition: transform var(--d-base) var(--ease-out); }
.btn:hover .b:first-child { transform: translateX(-4px); }
.btn:hover .b:last-child { transform: translateX(4px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-5) var(--gutter);
  mix-blend-mode: difference; color: var(--c-white);
  transition: transform var(--d-slow) var(--ease-out);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { width: 132px; }
.nav__logo svg { width: 100%; height: auto; fill: currentColor; }
.nav__links { display: none; gap: var(--s-8); align-items: center; font-family: var(--f-mono); font-size: var(--fs-sm); }
.nav__links a { position: relative; padding: var(--s-2) 0; }

.pill {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 18px); z-index: var(--z-nav);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s-2);
  height: var(--nav-pill-h); padding: 0 var(--s-2) 0 var(--s-5);
  border-radius: var(--r-pill);
  background: rgba(20, 20, 20, 0.72); color: var(--c-sclera);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--rule-on-dark);
  font-family: var(--f-mono); font-size: var(--fs-sm);
  width: max-content; white-space: nowrap; /* left:50% would otherwise cap it at half the screen and wrap the labels */
}
.pill__cta { height: 42px; padding: 0 var(--s-4); display: inline-flex; align-items: center; border-radius: var(--r-pill); background: var(--c-sclera); color: var(--c-ink); }
.pill__menu { height: 44px; padding: 0 var(--s-3); display: inline-flex; align-items: center; }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .pill { display: none; }
  .nav__logo { width: 156px; }
}

/* ---------- Menu overlay ---------- */
.menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: var(--c-ink); color: var(--c-sclera);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--s-24) var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 100px);
  visibility: hidden; clip-path: inset(100% 0 0 0);
  transition: clip-path var(--d-slow) var(--ease-out), visibility 0s linear var(--d-slow);
}
.menu.is-open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path var(--d-slow) var(--ease-out); }
.menu__close { position: absolute; top: var(--s-5); right: var(--gutter); width: 48px; height: 48px; font-family: var(--f-mono); font-size: 1.25rem; }
.menu ol { list-style: none; margin: 0; padding: 0; }
.menu li a { display: flex; align-items: baseline; gap: var(--s-4); font-family: var(--f-display); font-stretch: 120%; font-weight: 780; font-size: clamp(2.75rem, 13vw, 6rem); line-height: 1.02; letter-spacing: -0.03em; padding: var(--s-1) 0; }
.menu li a .label { color: var(--text-on-dark-muted); }
.menu__foot { margin-top: var(--s-10); display: flex; gap: var(--s-6); color: var(--text-on-dark-muted); }

/* ---------- Cursor (fine pointers only) ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  html.js body, html.js a, html.js button { cursor: none; }
  .cursor { display: block; position: fixed; left: 0; top: 0; z-index: var(--z-cursor); pointer-events: none; mix-blend-mode: difference; color: var(--c-white); }
  .cursor__arrow { width: 22px; height: 22px; transition: opacity var(--d-fast); }
  .cursor__brackets { position: fixed; left: 0; top: 0; display: flex; justify-content: space-between; align-items: center; opacity: 0; font-family: var(--f-mono); font-size: 28px; line-height: 1; transition: opacity var(--d-fast); }
  .cursor.is-target .cursor__arrow { opacity: 0; }
  .cursor.is-target .cursor__brackets { opacity: 1; }
}
.tap-flash { position: fixed; z-index: var(--z-cursor); pointer-events: none; font-family: var(--f-mono); font-size: 22px; color: var(--c-iris-glow); mix-blend-mode: difference; transform: translate(-50%, -50%); }

/* ---------- Loader ---------- */
.loader { display: none; }
html.js .loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  display: grid; place-items: center;
  background: var(--c-ink); color: var(--c-sclera);
}
html.js .loader.is-done { pointer-events: none; }
.loader__mark { width: min(78vw, 720px); }
.loader__mark svg { width: 100%; height: auto; overflow: visible; fill: currentColor; }
.loader__skip { position: absolute; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); left: 50%; transform: translateX(-50%); color: var(--text-on-dark-muted); }
.caret { fill: var(--c-iris-glow); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; padding-top: 120px; padding-bottom: 120px; display: grid; align-content: center; overflow: clip; isolation: isolate; }
.hero__dots { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0.55; }
.hero__eye { width: min(80vw, 50svh, 560px); aspect-ratio: 328 / 252; /* reserve the SVG's space before JS mounts it: stops the headline jumping */ margin: 0 auto var(--s-8); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.hero__eye svg { width: 100%; height: auto; overflow: visible; }
.hero__title { font-size: clamp(2.25rem, 6vw, 6.75rem); line-height: 0.95; text-align: center; text-wrap: balance; }
@media (min-width: 900px) { .hero__title .line { white-space: nowrap; } }
.hero__title .line { display: block; }
.hero__eyebrow { margin: 0 0 var(--s-6); text-align: center; color: var(--text-on-dark-muted); }
.hero__eyebrow span { color: var(--c-iris-glow); margin: 0 0.35em; }
@media (min-width: 900px) { .hero__title .word-sight { white-space: nowrap; } }
.hero__title .br { font-family: var(--f-mono); font-weight: 300; font-stretch: 100%; color: var(--c-iris-glow); letter-spacing: -0.08em; }
.hero__sub { margin: var(--s-8) auto 0; max-width: 40ch; text-align: center; color: var(--text-on-dark-muted); }
.hero__actions { margin-top: var(--s-10); display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: center; }
.hero__hint { display: none; position: absolute; left: var(--gutter); bottom: var(--s-8); color: var(--text-on-dark-muted); }
.hero__hint--right { left: auto; right: var(--gutter); }
@media (max-width: 899px) {
  .hero { padding-top: 88px; padding-bottom: 96px; }
  .hero__eye { margin-bottom: var(--s-6); }
  .hero__sub { margin-top: var(--s-6); }
  .hero__actions { margin-top: var(--s-8); }
}
@media (min-width: 900px) {
  .hero__hint { display: block; }
  .hero { padding-top: 96px; padding-bottom: 96px; }
  .hero__eye { width: min(42svh, 520px); margin-bottom: var(--s-6); }
}

/* Eye opening into the page */
.aperture { position: relative; height: 180svh; background: var(--c-ink); }
.aperture__stage { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.aperture__svg { width: 100%; height: 100%; }
.aperture__copy { position: absolute; inset: auto var(--gutter) 12svh; text-align: center; color: var(--c-ink); font-size: var(--fs-h3); font-family: var(--f-display); font-stretch: 112%; font-weight: 700; letter-spacing: -0.02em; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .aperture { height: auto; }
  .aperture__stage { position: relative; height: 60svh; }
}
