/* MIRA careers — shared styles (V1 design language, ported from home-v2) */

:root {
  --ivory:      #F8F2EE;
  --travertine: #D9BAA5;
  --terracotta: #9C3B23;
  --onyx:       #290702;

  --font-headline: 'Sentient', Georgia, serif;
  --font-body:     'Aspekta', -apple-system, system-ui, sans-serif;

  /* driven by JS during the scroll morphs */
  --page-bg: var(--onyx);
  --page-fg: var(--ivory);

  --pad-x: 40px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--page-bg);
  color: var(--page-fg);
  font-family: var(--font-body);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  overflow-x: hidden;
}

::selection { background: var(--terracotta); color: var(--ivory); }

img { display: block; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px var(--pad-x) 0;
}
.nav .logo img {
  height: 34px;
  width: auto;
  display: block;
  opacity: 0;
  animation: fadeIn 1.2s ease 1.0s forwards;
}
.nav .links {
  display: flex;
  gap: 28px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1.2s ease 1.2s forwards;
}
.nav .links a {
  color: var(--nav-fg, var(--ivory));
  text-decoration: none;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: opacity .25s ease, border-color .25s ease, color .4s ease;
}
.nav .links a:hover { opacity: 1; border-bottom-color: var(--terracotta); }
.nav .mobile-only { display: none; }

/* founder-letter link: dead-center of the page, hides past the hero (ported from home) */
.nav-center {
  position: absolute;
  left: 0; right: 0;
  top: 24px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.nav-center a { pointer-events: auto; }
.nav-center.gone { opacity: 0 !important; }
.nav-center.gone a { pointer-events: none; }

@keyframes fadeIn { to { opacity: 1; } }

/* ============ FOUNDER LETTER OVERLAY (ported from home) ============ */
.letter-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh var(--pad-x);
  background: rgba(41, 7, 2, 0.55);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0s 0.8s;
}
.letter-layer.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0s;
}
.letter {
  max-width: 560px;
  max-height: 84vh;
  overflow-y: auto;
  text-align: left;
  color: var(--ivory);
  transform: translateY(18px);
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  scrollbar-width: none;
}
.letter::-webkit-scrollbar { display: none; }
.letter-layer.open .letter { transform: translateY(0); }
.letter-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--travertine);
  margin-bottom: 4vh;
}
.letter-body p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.3em;
  opacity: 0.94;
}
.letter-sig {
  height: 74px;
  width: auto;
  margin: 3vh 0 10px -8px;
  filter: invert(1);           /* ink signature -> ivory on the dark layer */
  opacity: 0.95;
}
.letter-name {
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.letter-role {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.6;
}
.letter-close {
  position: absolute;
  top: 24px; right: 32px;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity .2s ease;
  font-family: var(--font-body);
}
.letter-close:hover { opacity: 1; }
body.letter-locked { overflow: hidden; }

/* ============ HERO / PAGE HEADER (onyx, typographic) ============ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--onyx);
  display: flex;
  align-items: flex-end;
}
.hero.compact {
  height: auto;
  min-height: 78vh;
  min-height: 78svh;
}
.hero-inner {
  position: relative;
  z-index: 10;
  padding: 22vh var(--pad-x) 14vh;
  width: 100%;
}
.hero .kicker { margin-bottom: 4vh; }
h1.headline {
  font-family: var(--font-headline);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 5.2rem);
  line-height: 1.12;
  letter-spacing: -0.055em;
  color: var(--ivory);
}
h1.headline.role-title {
  font-size: clamp(2rem, 4vw, 4.2rem);
}
h1 .word { white-space: nowrap; display: inline-block; }
h1 .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(6px);
  animation: chIn 0.9s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
@keyframes chIn { to { opacity: 1; transform: translateY(0); filter: blur(0); } }

.hero-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 24px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  justify-items: start;
  align-items: end;
  gap: 24px;
  padding: 0 var(--pad-x);
  pointer-events: none;
}
.hero-bottom > :last-child { justify-self: end; }

/* scroll nudge: thin line drawing downward, bottom center of the hero */
.scroll-cue {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeIn 1.4s ease 2.2s forwards;
  transition: opacity 0.6s ease;
}
.scroll-cue .label {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 0.6;
}
.scroll-cue .line {
  width: 1px;
  height: 42px;
  background: color-mix(in srgb, var(--ivory) 45%, transparent);
  overflow: hidden;
  position: relative;
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 100%;
  background: var(--terracotta);
  transform: translateY(-100%);
  animation: cueDrop 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes cueDrop {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}
body.scrolled .scroll-cue { opacity: 0 !important; }
.hero-sub {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.9;
  color: var(--ivory);
  opacity: 0;
  animation: fadeIn 1.4s ease 1.4s forwards;
}

/* meta row inside a role header */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 0;
  margin-top: 5vh;
  animation: fadeIn 1.2s ease 1.2s forwards;
}
.meta-row .sep { color: var(--terracotta); opacity: 0.9; }

.hero-inner .apply-cta { margin-top: 6vh; opacity: 0; animation: fadeIn 1.2s ease 1.5s forwards; }

/* ============ GRAIN ============ */
.grain {
  position: fixed; inset: -50%; z-index: 3; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(3) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0,0); }
  33% { transform: translate(-2%,1%); }
  66% { transform: translate(1%,-2%); }
  100% { transform: translate(0,0); }
}

/* ============ SHARED ============ */
section { position: relative; z-index: 5; }
.container { max-width: 900px; margin: 0 auto; padding: 0 var(--pad-x); }

.kicker {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 42px;
}

.reveal-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}
.reveal-up.in { opacity: 1; transform: translateY(0); }

/* ============ INTRO STATEMENT (matches home section 2, MIRA IS) ============ */
.intro { padding: 24vh 0 18vh; text-align: center; }
.intro .statement {
  font-family: var(--font-headline);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.15vw, 2.2rem);
  letter-spacing: -0.04em;
  line-height: 1.45;
  color: var(--page-fg);
  max-width: 56ch;
  margin: 0 auto;
  text-wrap: balance;
}

/* ============ OPEN ROLES TABLE ============ */
.roles { padding: 4vh 0 24vh; }
.role-row {
  padding: 36px 0;
  border-top: 1px solid color-mix(in srgb, var(--page-fg) 18%, transparent);
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(110px, 1fr) minmax(130px, 1fr) auto;
  gap: 14px 40px;
  align-items: center;
}
.role-row:last-of-type { border-bottom: 1px solid color-mix(in srgb, var(--page-fg) 18%, transparent); }
.role-row h4 {
  font-family: var(--font-headline);
  font-weight: 300;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--page-fg);
}
.role-row .tag {
  justify-self: start;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--terracotta) 60%, transparent);
  border-radius: 2px;
  color: var(--terracotta);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.role-row .starts {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--page-fg);
  opacity: 0.7;
}
a.learn-more {
  justify-self: end;
  padding: 13px 26px;
  border: 1px solid color-mix(in srgb, var(--page-fg) 45%, transparent);
  border-radius: 2px;
  color: var(--page-fg);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
a.learn-more:hover {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: var(--ivory);
}

/* ============ JD PROSE ============ */
.role-body { padding: 4vh 0 14vh; }
.jd h3 {
  font-family: var(--font-headline);
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  color: var(--page-fg);
  margin: 8vh 0 22px;
}
.jd h4 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 5vh 0 14px;
}
.jd p {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--page-fg);
  opacity: 0.88;
  margin-bottom: 1.25em;
  max-width: 68ch;
}
.jd ul {
  list-style: none;
  margin: 0 0 1.5em;
  max-width: 68ch;
}
.jd ul li {
  position: relative;
  padding-left: 26px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--page-fg);
  opacity: 0.88;
  margin-bottom: 0.7em;
}
.jd ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.72em;
  width: 12px; height: 1px;
  background: var(--terracotta);
}
.jd .rule {
  width: 56px; height: 1px;
  background: var(--terracotta);
  opacity: 0.7;
  margin: 9vh 0 0;
}
.jd strong { font-weight: 400; }
.jd .fine-note {
  font-size: 12.5px;
  line-height: 1.7;
  opacity: 0.55;
  max-width: 62ch;
}

/* ============ APPLY CTA ============ */
.apply-cta {
  display: inline-block;
  padding: 17px 34px;
  background: var(--terracotta);
  color: var(--ivory);
  border-radius: 2px;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .3s ease, transform .15s ease;
}
.apply-cta:hover { background: color-mix(in srgb, var(--terracotta) 78%, var(--onyx)); color: var(--ivory); }
.apply-cta:active { transform: translateY(1px); }
.apply-block { margin-top: 6vh; }
.apply-note {
  margin-top: 20px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--page-fg);
  opacity: 0.55;
}
.apply-note a { color: var(--page-fg); }

/* all-roles backlink at the bottom of a role page */
.all-roles-link {
  display: inline-block;
  margin-top: 5vh;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--page-fg);
  opacity: 0.65;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: opacity .25s ease, border-color .25s ease;
}
.all-roles-link:hover { opacity: 1; border-bottom-color: var(--terracotta); }

/* ============ FOOTER ============ */
footer {
  position: relative;
  z-index: 5;
  min-height: 88vh;
  padding: 10vh var(--pad-x) 6vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
footer .biglogo img {
  height: clamp(96px, 15vw, 190px);
  width: auto;
  margin: 0 auto 10vh;
}
footer .rows {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 26px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 4vh;
}
footer .rows a {
  color: var(--ivory);
  text-decoration: none;
  opacity: 0.75;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: opacity .25s ease, border-color .25s ease;
}
footer .rows a:hover { opacity: 1; border-bottom-color: var(--terracotta); }
footer .rows .sep { color: var(--terracotta); opacity: 0.8; }
footer .fine {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ivory);
  opacity: 0.45;
}

/* ============ MOBILE ============ */
@media (max-width: 700px) {
  :root { --pad-x: 22px; }
  .nav { padding-top: 18px; align-items: flex-start; }
  .nav .logo img { height: 26px; }
  .nav .links { gap: 16px; font-size: 11px; }
  .nav .links.nav-right { flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }
  .nav .nav-right .mobile-only { display: inline; }
  .nav .links.nav-center { display: none; }
  .letter-close { top: 16px; right: 20px; }
  h1.headline { font-size: clamp(1.9rem, 8.6vw, 2.9rem); }
  .hero-inner { padding-bottom: 12vh; }
  .hero-bottom { bottom: 18px; gap: 12px; }
  .hero-sub { font-size: 11px; letter-spacing: 0.14em; }
  .scroll-cue .line { height: 34px; }
  .scroll-cue .label { font-size: 9.5px; }
  .intro { padding: 18vh 0 14vh; }
  .intro .statement { font-size: 1.25rem; line-height: 1.5; }
  .meta-row { gap: 8px 16px; font-size: 11px; }
  .role-row { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  a.learn-more { justify-self: start; }
  .jd h3 { margin-top: 6vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  h1 .ch { opacity: 1; transform: none; filter: none; }
  .nav .logo img, .nav .links, .hero-sub, .meta-row, .hero-inner .apply-cta { opacity: 1; }
  .reveal-up { opacity: 1; transform: none; }
}
