/* Oniroid Studios · site styles */

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Brand (from the logo) */
  --space: #020a18;         /* key-art night sky */
  --space-2: #07142c;
  --space-3: #0c1d40;
  --ink-navy: #000a36;      /* logo navy */
  --cyan: #1ee0f8;          /* logo cyan */
  --cyan-deep: #00708f;     /* cyan that passes contrast on white */
  --coral: #f86858;         /* horns & moon */

  /* Category colours: one per kind of work */
  --cat-games: #f86858;
  --cat-xr: #1ee0f8;
  --cat-applied: #8fb0ff;
  --cat-experiments: #c3a4ff;

  --paper: #ffffff;
  --mist: #f1f5fb;
  --ink: #0a1230;
  --ink-2: #4a5775;
  --line: #dde4ef;
  --line-dark: rgba(255, 255, 255, .1);
  --on-dark: #e9f1fb;
  --on-dark-2: #a3b3cc;

  --radius: 14px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cyan); color: var(--ink-navy); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan-deep);
  margin-bottom: 14px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 2px solid var(--cyan);
  background: var(--cyan); color: var(--ink-navy);
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px -8px rgba(30, 224, 248, .6); }
.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); box-shadow: none; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .3s ease, box-shadow .3s ease; }
.site-header.is-solid { background: rgba(2, 10, 24, .9); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line-dark); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { height: 36px; width: auto; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; }
.brand-name span { font-weight: 400; color: #cfe0f2; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a:not(.btn) { color: var(--on-dark); text-decoration: none; font-size: 15px; font-weight: 500; opacity: .85; }
.site-nav a:not(.btn):hover { opacity: 1; color: var(--cyan); }
.nav-toggle { display: none; }

/* Hero: layered parallax scene (layers move in main.js; positions live here) */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 1000px);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 0 48px;
  background: var(--space); color: var(--on-dark);
}
.scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.layer { position: absolute; inset: -40px; will-change: transform; }
.layer img { position: absolute; max-width: none; }
.sky {
  background:
    radial-gradient(60% 22% at 58% 71%, rgba(248, 104, 88, .38), transparent 70%),
    radial-gradient(45% 30% at 80% 20%, rgba(30, 224, 248, .10), transparent 70%),
    linear-gradient(180deg, #01040c 0%, #06102b 30%, #121a45 55%, #2d2a5e 68%, #4a3a70 74%, #1a1c46 84%, #070b20 100%);
}
.stars { width: calc(100% + 80px); height: calc(100% + 80px); }

.planet { width: clamp(520px, 62vw, 1180px); right: -10%; top: -26%; }
.moon { width: clamp(70px, 7vw, 140px); left: 47%; top: 16%; }
.moon-small { width: clamp(34px, 3vw, 60px); left: 8%; top: 22%; opacity: .9; }
.mountains { width: max(100%, 1500px); left: 50%; bottom: 20%; transform: translateX(-50%); }
.island-c { width: clamp(60px, 6vw, 120px); left: 52%; top: 30%; opacity: .75; filter: brightness(.8); }

.logo-orbit { position: absolute; width: clamp(220px, 27vw, 480px); right: 13%; top: 20%; }
.logo-planet {
  position: relative !important; width: 100%;
  filter: drop-shadow(0 0 24px rgba(30, 224, 248, .45)) drop-shadow(0 0 70px rgba(30, 224, 248, .25));
  animation: bob 9s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-16px) rotate(1.5deg); } }

.island { filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); animation: bob 12s ease-in-out infinite; }
.island-a { width: clamp(150px, 19vw, 360px); right: 1%; bottom: 17%; animation-delay: -3s; }
.island-b { width: clamp(90px, 10vw, 200px); left: 55%; bottom: 33%; animation-delay: -7s; }

.fog { position: absolute; left: 0; right: 0; background: url("../img/hero/fog.webp") repeat-x; background-size: auto 100%; animation: drift 140s linear infinite; }
.fog-back { bottom: 14%; height: 34%; opacity: .75; }
.fog-front { bottom: -4%; height: 26%; opacity: .45; animation-duration: 90s; animation-direction: reverse; }
@keyframes drift { from { background-position: 0 0; } to { background-position: -2400px 0; } }

.foreground { width: max(100%, 1400px); left: 50%; bottom: -2%; transform: translateX(-50%); }

.shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 10, 24, .82) 0%, rgba(2, 10, 24, .55) 32%, rgba(2, 10, 24, 0) 58%),
    linear-gradient(180deg, rgba(2, 10, 24, .5) 0%, transparent 14%, transparent 72%, var(--space) 100%);
}

.hero-copy { position: relative; }
.hero .eyebrow { color: var(--cyan); }
.hero h1 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 700; max-width: 15ch; text-wrap: balance; text-shadow: 0 2px 30px rgba(2, 10, 24, .6); }
.lede { margin-top: 22px; font-size: clamp(17px, 1.5vw, 20px); color: #c3cfe2; max-width: 52ch; text-shadow: 0 1px 16px rgba(2, 10, 24, .8); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.facts {
  list-style: none; margin: 56px 0 0; padding: 28px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line-dark);
}
.facts strong { display: block; font-family: var(--font-display); font-size: 19px; color: #fff; }
.facts span { font-size: 14px; color: var(--on-dark-2); }

/* Sections */
.section { padding: var(--section-y) 0; }
.section-tint { background: var(--mist); }
.section-dark { background: var(--space); color: var(--on-dark); }
.section-dark .eyebrow { color: var(--cyan); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(30px, 3.8vw, 46px); font-weight: 700; }
.section-head p:not(.eyebrow) { margin-top: 18px; font-size: 18px; color: var(--ink-2); }
.section-dark .section-head p:not(.eyebrow) { color: var(--on-dark-2); }
.sub-head { font-size: 22px; margin: 72px 0 24px; }

.icon {
  width: 48px; height: 48px; padding: 11px; border-radius: 12px;
  background: #e6f7fb;
  fill: none; stroke: var(--ink-navy); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* Category colour hook */
[data-cat="games"] { --cat: var(--cat-games); }
[data-cat="xr"] { --cat: var(--cat-xr); }
[data-cat="applied"] { --cat: var(--cat-applied); }
[data-cat="experiments"] { --cat: var(--cat-experiments); }

/* What we do */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pillar {
  position: relative; padding: 30px 26px 28px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pillar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--cat); }
.pillar:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(2, 10, 24, .35); }
.pillar .icon { background: color-mix(in srgb, var(--cat) 16%, white); }
.pillar h3 { font-size: 20px; margin: 18px 0 10px; }
.pillar p { color: var(--ink-2); font-size: 15.5px; }
.pillar ul { list-style: none; margin-top: 16px; display: grid; gap: 6px; }
.pillar li { font-size: 14.5px; color: var(--ink); padding-left: 16px; position: relative; }
.pillar li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 50%; background: var(--cat); }

.engage { margin-top: 56px; padding: 32px; border-radius: calc(var(--radius) * 1.4); background: var(--space-2); color: var(--on-dark); }
.engage h3 { font-size: 20px; margin-bottom: 20px; }
.engage ul { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.engage strong { display: block; font-family: var(--font-display); color: var(--cyan); font-size: 16px; margin-bottom: 4px; }
.engage span { font-size: 14.5px; color: var(--on-dark-2); }

/* Work */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: -24px 0 32px; }
.chip {
  font: 600 14px var(--font-display); color: var(--on-dark);
  background: transparent; border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.chip:hover { border-color: rgba(255,255,255,.5); }
.chip.is-active { background: var(--cyan); border-color: var(--cyan); color: var(--ink-navy); }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.work {
  display: flex; flex-direction: column;
  background: var(--space-2); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.work:hover { transform: translateY(-4px); border-color: rgba(30, 224, 248, .4); }
.work[hidden] { display: none; }
.work-media { aspect-ratio: 16 / 9; background: radial-gradient(120% 100% at 70% 0%, var(--space-3), var(--space)); display: grid; place-items: center; }
.work-media img, .work-media video { width: 100%; height: 100%; object-fit: cover; }
.media-ph { color: var(--on-dark-2); font-size: 14px; letter-spacing: .05em; }
.work-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-body h3 { font-size: 24px; color: #fff; }
.work-body > p:not(.work-meta):not(.credit) { color: var(--on-dark-2); font-size: 16px; }
.work-meta { font-size: 13.5px; color: var(--on-dark-2); }
.credit { margin-top: auto; padding-top: 12px; font-size: 13px; font-style: italic; color: var(--on-dark-2); border-top: 1px solid var(--line-dark); }
.tag {
  display: inline-block; padding: 3px 10px; margin-right: 6px;
  border-radius: 999px; font-size: 12px; font-weight: 600; font-style: normal;
  color: var(--cat, var(--cyan)); background: color-mix(in srgb, var(--cat, var(--cyan)) 16%, transparent);
}
.footnote { margin-top: 32px; font-size: 14px; color: var(--on-dark-2); max-width: 70ch; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { position: relative; padding-top: 28px; border-top: 2px solid var(--ink-navy); }
.steps li::before { content: ""; position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); }
.step-n { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--cyan-deep); letter-spacing: .1em; }
.steps h3 { font-size: 21px; margin: 10px 0; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* Founder & people */
.founder {
  display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center;
  padding: clamp(24px, 4vw, 48px); background: var(--mist); border-radius: calc(var(--radius) * 1.5);
}
.founder-photo { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--space); display: grid; place-items: center; }
.founder-photo img { width: 72%; }
.founder-photo img[src$=".jpg"] { width: 100%; height: 100%; object-fit: cover; }
.founder h3 { font-size: 30px; }
.founder-role { color: var(--cyan-deep); font-weight: 500; margin: 6px 0 18px; }
.founder-body > p:not(.eyebrow):not(.founder-role) { color: var(--ink-2); }
.founder-links { margin-top: 18px; }
.founder-links a { font-weight: 600; color: var(--ink-navy); }

.people { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.person { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.person strong { display: block; font-family: var(--font-display); }
.person span:not(.avatar) { font-size: 14px; color: var(--ink-2); }
.avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ink-navy); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Contact */
.section-contact {
  background:
    radial-gradient(700px 400px at 90% 10%, rgba(30, 224, 248, .14), transparent 60%),
    radial-gradient(500px 300px at 0% 100%, rgba(248, 104, 88, .12), transparent 60%),
    var(--space-2);
  color: var(--on-dark);
}
.section-contact .eyebrow { color: var(--cyan); }
.contact-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.section-contact h2 { font-size: clamp(32px, 4.2vw, 52px); max-width: 16ch; }
.section-contact p:not(.eyebrow) { margin-top: 18px; font-size: 18px; color: var(--on-dark-2); max-width: 50ch; }
.contact-box { background: rgba(255,255,255,.05); border: 1px solid var(--line-dark); border-radius: calc(var(--radius) * 1.5); padding: clamp(24px, 3vw, 36px); }
.contact-mail { display: block; font-family: var(--font-display); font-size: clamp(20px, 2.3vw, 26px); font-weight: 600; color: #fff; text-decoration: none; word-break: break-word; }
.contact-mail:hover { color: var(--cyan); }
.contact-list { list-style: none; margin: 22px 0 28px; display: grid; gap: 10px; font-size: 15px; color: var(--on-dark); }
.contact-list li > span:first-child { display: inline-block; width: 90px; color: var(--on-dark-2); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }

/* Footer */
.site-footer { background: var(--space); color: var(--on-dark-2); font-size: 14px; border-top: 1px solid var(--line-dark); }
.footer-inner { display: flex; align-items: center; gap: 18px; padding-top: 28px; padding-bottom: 28px; flex-wrap: wrap; }
.footer-mark { width: 38px; }
.footer-inner p { flex: 1; min-width: 240px; }
.footer-inner a { color: var(--on-dark); }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Drafts & placeholders
   [data-draft]       hidden in production, dashed outline in preview.
   [data-collection]  hides itself when none of its [data-item] children are published.
   .ph                placeholder text, highlighted in preview. Must be gone before it goes live. */
html:not(.preview) [data-draft] { display: none !important; }
html:not(.preview) [data-collection]:not(:has([data-item]:not([data-draft]))) { display: none; }
.preview [data-draft] { outline: 2px dashed var(--coral); outline-offset: 4px; }
.preview .ph { background: rgba(248, 104, 88, .25); box-shadow: 0 0 0 2px rgba(248, 104, 88, .25); border-radius: 3px; }
.preview-bar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90;
  background: var(--coral); color: #2a0600; font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  width: max-content; max-width: calc(100% - 32px); text-align: center;
}

/* Responsive */
@media (max-width: 1080px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .engage ul { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; color: #fff; }
  .bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s ease; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -7px; }
  .bars::after { top: 7px; }
  .nav-open .bars { background: transparent; }
  .nav-open .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-open .bars::after { transform: translateY(-7px) rotate(-45deg); }

  .brand img { height: 30px; }
  .brand-name { font-size: 18px; }
  .site-nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--space); padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open .site-header { background: var(--space); }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line-dark); font-size: 17px; }
  .site-nav .btn { margin-top: 18px; }

  /* Mobile scene: laid out in vw so it fills the top square of the screen, text below */
  .hero { min-height: 0; padding-top: 100vw; }
  .layer { inset: 0 0 auto 0; height: 130vw; }
  .stars { width: 100%; height: 100%; }
  .planet { width: 125vw; right: -52vw; top: -22vw; }
  .moon { width: 13vw; left: 6vw; top: 34vw; }
  .moon-small { width: 7vw; left: 84vw; top: 76vw; }
  .logo-orbit { width: 48vw; left: 26vw; right: auto; top: 26vw; }
  .island-a { width: 30vw; right: -3vw; top: 62vw; bottom: auto; }
  .island-b { width: 19vw; left: 5vw; top: 64vw; bottom: auto; }
  .island-c { display: none; }
  .mountains { width: 1000px; top: 66vw; bottom: auto; }
  .fog-back { top: 80vw; bottom: auto; height: 26vw; }
  .fog-front { display: none; }
  .foreground { width: 900px; top: 84vw; bottom: auto; }
  .shade { background: linear-gradient(180deg, rgba(2, 10, 24, .5) 0, transparent 90px, transparent 86vw, rgba(2, 10, 24, .9) 104vw, var(--space) 118vw); }
  .work-grid, .contact-inner, .founder { grid-template-columns: 1fr; }
  .founder { gap: 28px; }
  .founder-photo { width: 180px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .pillars, .engage ul, .steps, .facts { grid-template-columns: 1fr; }
  .facts { gap: 16px; }
  .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
