/* ==========================================================================
   Opria — reset, typography, layout primitives, header & footer
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}

p, blockquote, figure, dl, dd, dt { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--accent-deep); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent-deep);
  color: #fff;
  border-radius: var(--r-sm);
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 16px; }

.vh {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide { max-width: 1560px; }

.section { position: relative; padding-block: var(--sect-y); }
.section--tight { padding-block: clamp(56px, 7vw, 104px); }
.section--flush { padding-block: 0; }

.rule { height: 1px; background: var(--line-faint); border: 0; margin: 0; }

/* --------------------------------------------------------------------------
   Typography components
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.eyebrow::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-line);
}
.eyebrow--plain::before { display: none; }

.h1 {
  font-size: var(--fs-h1);
  line-height: .93;
  letter-spacing: -.035em;
  font-weight: 500;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -.03em;
  font-weight: 500;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 500;
}
.lede {
  font-size: var(--fs-lede);
  color: var(--text-dim);
  max-width: 54ch;
  text-wrap: pretty;
}
.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.accent-txt { color: var(--accent); }

/* A hairline label used the way an engineering drawing uses callouts. */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 3px 8px;
}
.tag--accent { color: var(--accent); border-color: var(--accent-line); }
.tag--dashed { border-style: dashed; }

.num {
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  color: var(--text-faint);
}

/* Section header block, reused everywhere. */
.shead { display: grid; gap: 20px; max-width: 62ch; }
.shead .lede { margin-top: 4px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -.005em;
  color: var(--btn-fg);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out),
              color .3s var(--ease-out), transform .3s var(--ease-out);
}
.btn .arw {
  display: inline-block;
  transition: transform .38s var(--ease-out);
}
.btn:hover .arw { transform: translateX(4px); }

.btn--primary {
  background: var(--accent-deep);
  border-color: transparent;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn--primary:hover { background: var(--accent-press); }

.btn--ghost { background: transparent; }
.btn--ghost:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .035); }

.btn--sm { padding: 9px 16px; font-size: .8438rem; }

/* Text link with an animated rule underneath. */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: .9375rem;
  color: var(--text);
  padding-bottom: 4px;
}
.link::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left;
  transition: transform .4s var(--ease-out), background-color .4s var(--ease-out);
}
.link:hover::after { background: var(--accent); transform: scaleX(1.0); }
.link .arw { transition: transform .38s var(--ease-out); }
.link:hover .arw { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out),
              backdrop-filter .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.hdr.is-stuck {
  background: rgba(8, 8, 8, .78);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-faint);
}
.hdr__in {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 74px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__word {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: #f2f5fa;
}

.hdr__nav { display: flex; gap: 28px; margin-left: auto; }
.hdr__nav a {
  font-size: .875rem;
  color: var(--text-dim);
  transition: color .25s var(--ease-out);
}
.hdr__nav a:hover { color: var(--text); }

.hdr__side { display: flex; align-items: center; gap: 14px; }

.lang {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow: hidden;
}
.lang a, .lang span { padding: 6px 9px; line-height: 1; }
.lang .is-on { background: rgba(255, 255, 255, .09); color: var(--text); }
.lang a { color: var(--text-faint); transition: color .25s, background-color .25s; }
.lang a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

.burger { display: none; width: 40px; height: 40px; margin-left: auto; }
.burger span {
  display: block; width: 20px; height: 1px; margin: 5px auto;
  background: var(--text);
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.hdr.is-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hdr.is-open .burger span:nth-child(2) { opacity: 0; }
.hdr.is-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.ftr {
  border-top: 1px solid var(--line-faint);
  padding-block: clamp(56px, 7vw, 96px) 40px;
  background: var(--bg);
}
.ftr__grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(120px, .7fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.ftr__brand { display: grid; gap: 18px; }
.ftr h3 {
  font-family: var(--font-mono);
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.ftr li + li { margin-top: 11px; }
.ftr li a {
  font-size: .9063rem;
  color: var(--text-dim);
  transition: color .25s var(--ease-out);
}
.ftr li a:hover { color: var(--text); }

.ftr__base {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  color: var(--text-faint);
}
.ftr__legal { display: inline-flex; flex-wrap: wrap; gap: 10px 24px; }
.ftr__legal a { transition: color .25s var(--ease-out); }
.ftr__legal a:hover { color: var(--text-dim); }

/* --------------------------------------------------------------------------
   Scroll reveal — the resting state. js/motion.js clears these.
   Everything stays visible if JS never runs.
   -------------------------------------------------------------------------- */

.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal-line > * { opacity: 0; transform: translateY(26px); }

/* The hero plays on load rather than on scroll, so it is primed in CSS to
   avoid a flash of the finished state before the deferred scripts run. */
.js .hero .eyebrow,
.js .hero__lede,
.js .hero__cta > *,
.js .shard,
.js .hero__base > * { opacity: 0; }
.js .hero .h1 .ln > span { transform: translateY(108%); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .burger { display: block; }
  .hdr__nav {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 28px;
    background: rgba(8, 8, 8, .97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line-faint);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  }
  .hdr.is-open .hdr__nav { opacity: 1; transform: none; pointer-events: auto; }
  .hdr__nav a {
    display: block;
    padding: 15px 0;
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--text);
    border-bottom: 1px solid var(--line-faint);
  }
  .hdr__side { order: 3; }
  .hdr__side .btn { display: none; }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
  .ftr__brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .ftr__grid { grid-template-columns: 1fr; gap: 34px; }
}

/* --------------------------------------------------------------------------
   Reduced motion — everything is simply present.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal, .js .reveal-line > *, .js .stream > *,
  .js .hero .eyebrow, .js .hero__lede, .js .hero__cta > *,
  .js .shard, .js .hero__base > *,
  .js .hero .h1 .ln > span { opacity: 1 !important; transform: none !important; }
}
