/* Ossia Productions - small design system.
   Tokens first; everything below reads from them.
   Palette: clean white and ink, with holographic cyan and gilded gold taken from the imagery. */

:root {
  --bg: #ffffff;
  --bg-2: #f4f5f7;
  --ink: #0b0d12;
  --ink-soft: #4a505e;
  --ink-faint: #8a8f9c;
  --rule: rgba(11, 13, 18, 0.12);
  --cyan: #0e8fa1;
  --cyan-glow: #4fe3f5;
  --gold: #a87a2e;
  --gold-bright: #e2b866;
  --night: #07080b;
  --on-night: #f3f4f6;
  --on-night-soft: #b7bcc7;
  --field: #ffffff;
  --danger: #c0392b;
  --ok: #0f7a5a;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.7vw, 1.7rem);
  --step-2: clamp(2.2rem, 1.6rem + 2.6vw, 4rem);
  --step-3: clamp(3.2rem, 2rem + 6vw, 7.5rem);

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --space-l: clamp(4.5rem, 3rem + 6vw, 9rem);
  --wide: 80rem;
  --radius: 999px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --bg-2: #12151c;
    --ink: #f3f4f6;
    --ink-soft: #b7bcc7;
    --ink-faint: #7c8292;
    --rule: rgba(243, 244, 246, 0.12);
    --cyan: #4fd6e8;
    --gold: #e2b866;
    --field: #12151c;
    --danger: #ff8a7a;
    --ok: #5fd3a5;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--cyan-glow); color: var(--night); }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--font-display); line-height: 1; letter-spacing: -0.015em; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
h3 { font-size: var(--step-0); font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--bg); padding: 0.5rem 1rem; z-index: 200; }
.skip:focus { top: 1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.5rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--cyan-glow); }

/* Masthead: sits over the dark hero */
.masthead {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
}
.brand { display: inline-flex; color: #fff; text-decoration: none; }

/* Wordmark: Unbounded with a holographic lens for the O.
   The ring is drawn optically larger than the cap height (hollow shapes read small),
   and PRODUCTIONS is spread letter by letter to the exact width of OSSIA. */
.logo { display: inline-grid; color: inherit; line-height: 1; }
.logo b { font: 800 2.1rem/1 "Unbounded", var(--font-text); letter-spacing: -0.03em; display: inline-flex; align-items: center; }
.logo em { flex: none; width: 0.86em; height: 0.86em; border-radius: 50%; display: inline-block; margin-right: 0.05em; background: conic-gradient(from 210deg, var(--cyan-glow), var(--gold-bright), var(--cyan-glow)); -webkit-mask: radial-gradient(circle, transparent 0 30%, #000 31%); mask: radial-gradient(circle, transparent 0 30%, #000 31%); }
.logo small { display: flex; justify-content: space-between; font: 600 0.55rem/1 var(--font-text); text-transform: uppercase; margin-top: 0.5rem; opacity: 0.85; }
.logo--sm b { font-size: 1.35rem; }
.logo--sm small { font-size: 0.4rem; margin-top: 0.4rem; }
.masthead ul { list-style: none; display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); margin: 0; padding: 0; font-size: var(--step--1); font-weight: 500; letter-spacing: 0.04em; }
.masthead nav a { text-decoration: none; color: rgba(255, 255, 255, 0.85); }
.masthead nav a:hover { color: #fff; }
.nav__cta { border: 1px solid rgba(255, 255, 255, 0.4); border-radius: var(--radius); padding: 0.5rem 1.1rem; }
.nav__cta:hover { border-color: var(--cyan-glow); }

/* Hero */
.hero {
  position: relative;
  min-height: min(100svh, 62rem);
  display: grid;
  align-items: end;
  background: var(--night);
  color: var(--on-night);
  overflow: hidden;
  isolation: isolate;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; z-index: -2; }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 8, 11, 0.55) 0%, rgba(7, 8, 11, 0) 25%),
    linear-gradient(0deg, rgba(7, 8, 11, 0.95) 0%, rgba(7, 8, 11, 0.55) 40%, rgba(7, 8, 11, 0) 75%);
}
.hero__text { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 10rem var(--gutter) clamp(3rem, 8vw, 6rem); }
.hero h1 { font-size: var(--step-3); color: #fff; margin-bottom: 1.75rem; }
.hero h1 em { color: var(--gold-bright); }
.lede { font-size: var(--step-1); color: var(--on-night-soft); max-width: 34ch; line-height: 1.45; }
.hero__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem 2rem; margin-top: 2.25rem; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.8rem 1.75rem;
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); color: var(--bg);
  font: 600 var(--step--1) / 1 var(--font-text); letter-spacing: 0.06em;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.button:hover { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.button--light { background: #fff; border-color: #fff; color: var(--night); }
.button--light:hover { background: var(--cyan-glow); border-color: var(--cyan-glow); color: var(--night); box-shadow: 0 0 2rem rgba(79, 227, 245, 0.45); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.link { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 0.2rem; }
.link--light { color: #fff; }
.link--light:hover { color: var(--cyan-glow); }

/* Codex feature */
.feature {
  max-width: var(--wide); margin: 0 auto;
  padding: var(--space-l) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem); align-items: center;
}
.feature h2 { font-size: var(--step-2); margin-bottom: 1.75rem; }
.feature__lead { font-size: var(--step-1); line-height: 1.4; }
.feature p:not(.feature__lead):not(.eyebrow) { color: var(--ink-soft); max-width: 36rem; }
.feature__img { margin: 0; border-radius: 1.25rem; overflow: hidden; box-shadow: 0 2rem 4rem -1.5rem rgba(11, 13, 18, 0.45); }

/* Vault gallery: dark band */
.vault { background: var(--night); color: var(--on-night); padding: var(--space-l) var(--gutter); }
.vault__head, .vault__grid, .vault__note { max-width: var(--wide); margin-inline: auto; }
.vault h2 { font-size: var(--step-2); color: #fff; max-width: 18ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.vault h2 em { color: var(--gold-bright); }
.vault__grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.vault__grid img { border-radius: 1rem; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; margin-bottom: 1.25rem; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.vault__grid li:hover img { box-shadow: 0 0 3rem -0.5rem rgba(79, 227, 245, 0.35); }
.vault__grid h3 { color: #fff; margin-bottom: 0.4rem; }
.vault__grid p { color: var(--on-night-soft); font-size: var(--step--1); margin: 0; max-width: 32ch; }
.vault__note { margin-top: 2.5rem; font-size: var(--step--1); color: #8a90a0; }

/* Approach */
.approach { max-width: var(--wide); margin: 0 auto; padding: var(--space-l) var(--gutter); }
.approach__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.approach h2 { font-size: var(--step-2); margin-bottom: 1.5rem; }
.approach__lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.45; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); }
.pillars li { border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.pillars__n { display: block; font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--gold); margin-bottom: 1rem; }
.pillars h3 { margin-bottom: 0.5rem; font-size: var(--step-1); font-weight: 500; }
.pillars p { color: var(--ink-soft); margin: 0; }

/* Image strip */
.strip { margin: 0; }
.strip img { width: 100%; height: clamp(14rem, 32vw, 28rem); object-fit: cover; }

/* Contact */
.contact-band {
  max-width: var(--wide); margin: 0 auto;
  padding: var(--space-l) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
}
.contact-band h2 { font-size: var(--step-2); margin-bottom: 1.25rem; max-width: 14ch; }
.contact-band__note { color: var(--ink-soft); max-width: 30ch; }
.contact { display: grid; gap: 1.4rem; align-content: start; }
.field { display: grid; gap: 0.45rem; }
.field label { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--field); border: 1px solid var(--rule); border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(14, 159, 179, 0.18); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: var(--step--1); margin: 0; }
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
.contact__status { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.contact__status[data-state="ok"] { color: var(--ok); }
.contact__status[data-state="error"] { color: var(--danger); }
.contact--sent .field, .contact--sent .button { display: none; }
.contact--sent .contact__status { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); }

/* Footer */
.footer { background: var(--night); color: var(--on-night-soft); }
.footer__inner { max-width: var(--wide); margin: 0 auto; padding: 3rem var(--gutter); display: flex; gap: 1.5rem; align-items: flex-start; font-size: var(--step--1); }
.footer .logo { flex: none; color: #fff; margin-top: 0.2rem; }
.footer__legal { max-width: 52rem; margin-bottom: 0.4rem; }

/* Motion: only when allowed */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero__img { animation: drift 24s ease-in-out infinite alternate; }
  html.js .hero__text > * { animation: rise 1.1s var(--ease) both; }
  html.js .hero__text > :nth-child(2) { animation-delay: 0.15s; }
  html.js .hero__text > :nth-child(3) { animation-delay: 0.3s; }
  html.js .masthead .logo em { animation: spin 14s linear infinite; }
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  html.js .reveal.is-in { opacity: 1; transform: none; }
  .vault__grid li:hover img { transform: translateY(-4px); }
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateY(-1.5%); } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Layout collapse */
@media (max-width: 56rem) {
  .feature, .contact-band { grid-template-columns: minmax(0, 1fr); }
  .vault__grid, .pillars { grid-template-columns: minmax(0, 1fr); }
  .vault__grid img { aspect-ratio: 4 / 3; }
  .hero { min-height: 44rem; }
}
@media (max-width: 34rem) {
  .masthead nav li:not(:last-child) { display: none; }
  .masthead .logo b { font-size: 1.7rem; }
  .masthead .logo small { font-size: 0.45rem; }
  .footer__inner { flex-direction: column; }
}
