@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Manrope:wght@300;400;500&display=swap');

:root {
  color-scheme: dark;
  --black: #000;
  --near-black: #070707;
  --white: #f4f4f1;
  --muted: #999b9d;
  --line: rgba(255,255,255,.14);
  --soft-line: rgba(255,255,255,.08);
  --pad: clamp(1.5rem, 4vw, 4rem);
  --max: 90rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--black); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: Inter, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
::selection { background: #fff; color: #000; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .75rem 1rem;
  transform: translateY(-150%);
  background: #fff;
  color: #000;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem var(--pad);
  transition: padding .4s ease, background .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background: rgba(0,0,0,.76);
  border-color: var(--soft-line);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .52em;
}
.brand-mark { width: 1.45rem; height: 1.45rem; flex: none; }
.primary-nav { display: flex; align-items: center; gap: clamp(1.75rem, 3.5vw, 3.75rem); }
.primary-nav a {
  position: relative;
  padding: .5rem 0;
  color: rgba(255,255,255,.84);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.primary-nav a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: .15rem;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: #fff;
  transition: transform .3s ease;
}
.primary-nav a:hover::after, .primary-nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; border: 0; background: none; }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  overflow: hidden;
  padding: 0 var(--pad) clamp(6rem, 11vh, 9rem);
}
.hero-art {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,.12) 68%, #000 100%), url('/assets/istarius-celestial-hero.png');
  background-position: center 43%;
  background-size: cover;
  filter: contrast(1.05);
  animation: hero-breathe 12s ease-in-out infinite alternate;
}
.hero-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
@keyframes hero-breathe { from { transform: scale(1); } to { transform: scale(1.025); } }
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(46rem, 100%);
  text-align: center;
}
.eyebrow {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .23em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-family: Manrope, Arial, sans-serif;
  font-size: clamp(2.45rem, 5vw, 5.1rem);
  font-weight: 300;
  letter-spacing: .16em;
  line-height: 1.05;
}
.hero-intro {
  max-width: 37rem;
  margin: 1.75rem auto 2.4rem;
  color: rgba(255,255,255,.64);
  font-size: clamp(.98rem, 1.4vw, 1.12rem);
  line-height: 1.75;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4.5rem;
  min-width: 11rem;
  padding: .8rem .35rem;
  border-bottom: 1px solid rgba(255,255,255,.35);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .27em;
  text-transform: uppercase;
  transition: border-color .3s ease;
}
.text-link .arrow { font-size: 1rem; transition: transform .3s ease; }
.text-link:hover { border-color: #fff; }
.text-link:hover .arrow { transform: translate(3px, 3px); }
.scroll-cue {
  position: absolute;
  z-index: 2;
  right: var(--pad);
  bottom: 3rem;
  width: 1px;
  height: 3.5rem;
  overflow: hidden;
  background: rgba(255,255,255,.2);
}
.scroll-cue span { display: block; width: 100%; height: 45%; background: #fff; animation: scroll 2s ease-in-out infinite; }
@keyframes scroll { 0% { transform: translateY(-120%); } 100% { transform: translateY(280%); } }

.section {
  position: relative;
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(7rem, 13vw, 13rem) var(--pad);
  border-top: 1px solid var(--soft-line);
}
.section-label {
  display: flex;
  gap: 1.25rem;
  margin-bottom: clamp(4rem, 8vw, 8rem);
  color: #737578;
  font-size: .65rem;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.section-label span { color: var(--white); }
.section h2 {
  margin: 0;
  font-family: Manrope, Arial, sans-serif;
  font-size: clamp(3rem, 7.5vw, 8rem);
  font-weight: 300;
  letter-spacing: -.045em;
  line-height: .98;
}
.work-heading { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(18rem,.7fr); gap: 6vw; align-items: end; }
.work-heading > p {
  margin: 0 0 .5rem;
  color: #a4a4a2;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.7;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  margin-top: clamp(5rem, 11vw, 10rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.work-card {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem clamp(1.5rem, 3vw, 3rem) 2.5rem;
  border-right: 1px solid var(--line);
  transition: background .4s ease;
}
.work-card:first-child { padding-left: 0; }
.work-card:last-child { border-right: 0; }
.work-card:hover { background: rgba(255,255,255,.025); }
.work-number { color: #5e6062; font-family: Manrope; font-size: .72rem; letter-spacing: .2em; }
.work-card h3, .platform-item h3 {
  margin: 0 0 1rem;
  font-family: Manrope;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -.02em;
}
.work-card p, .platform-item p {
  max-width: 22rem;
  margin: 0;
  color: #929392;
  font-size: .95rem;
  line-height: 1.65;
}
.logo-showcase {
  width: 100vw;
  margin-top: clamp(5rem, 9vw, 8rem);
  margin-left: calc((100% - 100vw) / 2);
}
.logo-rail {
  overflow: hidden;
  padding: clamp(2.3rem, 4vw, 3.5rem) 0;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.logo-track {
  --logo-gap: clamp(4rem, 7vw, 7.5rem);
  display: flex;
  width: max-content;
  animation: logo-scroll 55s linear infinite;
  will-change: transform;
}
.logo-rail:hover .logo-track { animation-play-state: paused; }
.logo-set {
  display: flex;
  align-items: center;
  gap: var(--logo-gap);
  padding-right: var(--logo-gap);
}
.logo-item {
  width: clamp(8rem, 14vw, 13.5rem);
  height: clamp(3.25rem, 5vw, 4.75rem);
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
}
.logo-item--symbol { width: clamp(5.5rem, 8vw, 7rem); }
.logo-item--wide { width: clamp(11rem, 18vw, 17.5rem); }
.logo-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: .68;
  transition: opacity .3s ease, filter .3s ease;
}
.logo-item:hover img { opacity: .95; filter: brightness(1.16); }
@keyframes logo-scroll { to { transform: translateX(-50%); } }

.section-platform { width: 100%; max-width: none; background: var(--near-black); }
.section-platform > * { width: min(calc(var(--max) - var(--pad) * 2), 100%); margin-right: auto; margin-left: auto; }
.platform-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 10vw; align-items: start; }
.platform-sticky { position: sticky; top: 9rem; }
.platform-sticky h2 { max-width: 42rem; font-size: clamp(2.8rem, 5vw, 5.6rem); }
.platform-list { border-top: 1px solid var(--line); }
.platform-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 2.8rem 0 3.25rem;
  border-bottom: 1px solid var(--line);
}
.platform-item > span { color: #66686a; font-size: .68rem; letter-spacing: .14em; }
.section-about { min-height: 100vh; display: flex; flex-direction: column; }
.about-copy { max-width: 78rem; margin-top: auto; }
.about-copy h2 { max-width: 67rem; font-size: clamp(3rem, 6.3vw, 7rem); }
.about-lede {
  max-width: 60rem;
  margin: 4rem 0;
  font-family: Manrope;
  font-size: clamp(1.5rem, 2.8vw, 2.8rem);
  font-weight: 300;
  line-height: 1.4;
}
.about-detail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5vw; max-width: 56rem; margin-left: auto; }
.about-detail p { margin: 0; color: #929392; line-height: 1.75; }

.section-contact { width: 100%; max-width: none; min-height: 92vh; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.section-contact > *:not(.contact-orbit) { width: min(calc(var(--max) - var(--pad) * 2), 100%); margin-right: auto; margin-left: auto; }
.contact-orbit {
  position: absolute;
  top: 18%;
  right: -24vw;
  width: 62vw;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(255,255,255,.025), inset 0 0 90px rgba(255,255,255,.02);
}
.contact-orbit::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -.2rem;
  width: .38rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px 5px rgba(255,255,255,.5);
}
.contact-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0,1.12fr) minmax(23rem,.72fr);
  gap: clamp(4rem, 9vw, 10rem);
  align-items: end;
}
.contact-copy h2 { font-size: clamp(3.3rem, 6.4vw, 7.5rem); }
.contact-intro {
  max-width: 39rem;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0;
  color: #929392;
  font-size: clamp(.95rem, 1.25vw, 1.1rem);
  line-height: 1.75;
}
.contact-email {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 39rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: Manrope;
  font-size: clamp(.95rem, 1.5vw, 1.2rem);
  transition: padding .3s ease, border-color .3s ease;
}
.contact-email:hover { padding-right: .75rem; padding-left: .75rem; border-color: rgba(255,255,255,.5); }
.application-form {
  position: relative;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,.3);
}
.form-field {
  padding: 1.4rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}
.form-field label {
  display: block;
  margin-bottom: .7rem;
  color: #747678;
  font-size: .6rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.form-field input,
.form-field select {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  font-family: Manrope, Arial, sans-serif;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 300;
}
.form-field input::placeholder { color: #4f5153; }
.form-field select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%);
  background-position: calc(100% - 5px) 48%, 100% 48%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.form-field select:invalid { color: #4f5153; }
.form-field select option { background: #0a0a0a; color: var(--white); }
.form-field:focus-within { border-color: rgba(255,255,255,.48); }
.application-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.1rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(255,255,255,.72);
  background: transparent;
  color: var(--white);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s ease, color .3s ease;
}
.application-submit:hover,
.application-submit:focus-visible { background: var(--white); color: #000; }
.application-submit:disabled { cursor: wait; opacity: .55; }
.form-status {
  min-height: 1.2rem;
  margin: .9rem 0 0;
  color: #8d8f91;
  font-size: .72rem;
  line-height: 1.5;
}
.form-status.is-error { color: #d1a2a2; }
footer {
  width: min(var(--max), 100%);
  min-height: 8rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  margin: 0 auto;
  padding: 2rem var(--pad);
  border-top: 1px solid var(--soft-line);
  color: #5d5f61;
  font-size: .6rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}
footer p:nth-last-child(2) { text-align: center; }
footer p:last-child { text-align: right; }
.footer-brand { color: #8d8e90; font-size: .65rem; }
.footer-brand .brand-mark { width: 1rem; height: 1rem; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.22,1,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .site-header { padding-top: 1.4rem; padding-bottom: 1.4rem; }
  .brand { font-size: .7rem; gap: .75rem; }
  .menu-toggle { position: relative; z-index: 2; display: flex; align-items: center; gap: .75rem; padding: .4rem 0; cursor: pointer; }
  .menu-label { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
  .menu-lines { width: 1.2rem; display: grid; gap: .3rem; }
  .menu-lines i { display: block; height: 1px; background: #fff; transition: transform .3s ease; }
  .menu-toggle[aria-expanded="true"] .menu-lines i:first-child { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-lines i:last-child { transform: translateY(-2px) rotate(-45deg); }
  .primary-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: var(--pad);
    visibility: hidden;
    opacity: 0;
    background: rgba(0,0,0,.96);
    transition: opacity .3s ease, visibility .3s ease;
  }
  .primary-nav.open { visibility: visible; opacity: 1; }
  .primary-nav a { font-family: Manrope; font-size: clamp(2.2rem, 11vw, 4rem); font-weight: 300; letter-spacing: -.03em; text-transform: none; }
  .hero { padding-bottom: 6rem; }
  .hero-art { background-position: center 39%; }
  .hero h1 { letter-spacing: .1em; }
  .hero-intro { max-width: 31rem; }
  .scroll-cue { display: none; }
  .work-heading, .platform-layout { grid-template-columns: 1fr; }
  .work-heading { gap: 2.5rem; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card, .work-card:first-child {
    min-height: 17rem;
    display: grid;
    grid-template-columns: 4rem 1fr;
    align-items: end;
    padding: 2rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .work-card:last-child { border-bottom: 0; }
  .logo-rail {
    padding-top: 2rem;
    padding-bottom: 2rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
  .logo-track { --logo-gap: 4rem; animation-duration: 36s; }
  .logo-item { width: 9.5rem; height: 3.4rem; }
  .platform-sticky { position: static; margin-bottom: 4rem; }
  .about-detail { grid-template-columns: 1fr; gap: 1.5rem; margin-left: 0; }
  .contact-layout { grid-template-columns: 1fr; align-items: start; }
  .application-form { max-width: 39rem; }
  .contact-orbit { top: 40%; right: -55vw; width: 120vw; }
  footer { grid-template-columns: 1fr auto; gap: 2rem; }
  footer p:nth-last-child(2) { display: none; }
}

@media (max-width: 500px) {
  .hero { align-items: end; }
  .hero-art { background-size: auto 100%; }
  .hero h1 { font-size: clamp(2rem, 10vw, 3rem); letter-spacing: .08em; }
  .hero-intro { font-size: .92rem; line-height: 1.65; }
  .section { padding-top: 6rem; padding-bottom: 6rem; }
  .section-label { margin-bottom: 3.5rem; }
  .work-card, .work-card:first-child { grid-template-columns: 2.5rem 1fr; }
  .section-contact { min-height: 75vh; }
  .contact-email { font-size: 1rem; }
  footer { min-height: 7rem; }
  .footer-brand { letter-spacing: .35em; }
  footer p:last-child { font-size: .52rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .logo-rail {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
    scrollbar-width: thin;
  }
  .logo-track { animation: none !important; transform: none !important; }
  .logo-set[aria-hidden="true"] { display: none; }
}
