/* ============ Tokens ============ */
:root {
  --bg: #0b0e14;
  --bg-alt: #0f131c;
  --surface: #141a26;
  --border: #232b3b;
  --text: #e8ecf4;
  --text-dim: #9aa5b8;
  --accent: #d4a94e;        /* warm gold */
  --accent-soft: rgba(212, 169, 78, 0.12);
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1120px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.mono { font-family: var(--font-mono); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 600; }

p { color: var(--text-dim); }
p + p { margin-top: 1em; }

em { font-style: italic; color: var(--accent); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(35, 43, 59, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand-mark { width: 27px; height: 27px; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  padding: 8px 18px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: 68px;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 80px;
}

.hero-sub {
  max-width: 560px;
  margin-top: 1.4rem;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #1a1405;
}

.btn-primary:hover { background: #e3bc66; }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ============ Sections ============ */
.section { padding-block: 110px; }

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

.section-head { margin-bottom: 56px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

/* ============ Stats ============ */
.stats-row {
  display: flex;
  gap: 48px;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============ Cards ============ */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
  margin-bottom: 1.4rem;
}

.card h3 { margin-bottom: 0.7rem; font-size: 1.4rem; }

.card-list {
  margin-top: 1.2rem;
  list-style: none;
}

.card-list li {
  color: var(--text-dim);
  padding-left: 24px;
  position: relative;
  margin-top: 0.55rem;
  font-size: 0.95rem;
}

.card-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.6rem;
  color: var(--accent);
}

/* ============ Steps ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  list-style: none;
  counter-reset: step;
}

.step {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.step-num {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.step h3 { margin-block: 0.8rem 0.5rem; }

.step p { font-size: 0.95rem; }

/* ============ Principles ============ */
.principles { display: flex; flex-direction: column; gap: 32px; }

.principle {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
}

.principle h3 { margin-bottom: 0.4rem; }

/* ============ Contact ============ */
.contact-inner {
  max-width: 640px;
}

.contact-sub { max-width: 420px; }

.contact-email {
  display: inline-block;
  margin-top: 1.6rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.contact-location {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text-dim);
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-note { font-size: 0.9rem; }

/* ============ Careers page ============ */
.careers-intro {
  padding-top: 178px;
}

.careers-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
}

.careers-sub {
  max-width: 560px;
  margin-top: 1.4rem;
  font-size: 1.1rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 56px;
}

.benefit h3 { margin-bottom: 0.5rem; }

.benefit p { font-size: 0.95rem; max-width: 460px; }

.positions-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 640px;
}

.positions-empty > p:first-child {
  font-size: 1.1rem;
  color: var(--text);
}

.positions-note {
  margin-top: 0.8rem;
  font-size: 0.95rem;
}

.positions-note a { color: var(--accent); }

@media (max-width: 640px) {
  .benefits-grid { grid-template-columns: 1fr; }
}

/* ============ Login page ============ */
.login-page {
  min-height: 100svh;
  background:
    radial-gradient(1100px 600px at 75% 15%, rgba(212, 169, 78, 0.07), transparent 60%),
    radial-gradient(900px 700px at 15% 85%, rgba(90, 60, 140, 0.12), transparent 60%),
    var(--bg);
}

#login-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-wrap {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 48px 16px;
}

.login-panel {
  width: 100%;
  max-width: 440px;
  background: rgba(10, 12, 18, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.login-brand {
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-error {
  background: rgba(196, 78, 78, 0.12);
  border: 1px solid rgba(196, 78, 78, 0.45);
  border-radius: 10px;
  padding: 12px 16px;
  color: #e4a3a3;
  font-size: 0.92rem;
}

.login-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-btn {
  margin-top: 4px;
  width: 100%;
}

.login-forgot {
  align-self: flex-start;
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.login-forgot:hover { color: var(--accent); }

.login-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0 28px;
}

.login-notice h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.login-notice p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

.login-notice a { color: var(--accent); }

.login-legal {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  opacity: 0.85;
}

.login-back {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.login-back:hover { color: var(--accent); }

@media (max-width: 480px) {
  .login-panel { padding: 34px 24px; }
}

/* ============ 404 page ============ */
.notfound-panel { text-align: center; }

.notfound-panel .login-brand { justify-content: center; margin-bottom: 24px; }

.notfound-code {
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.3em;
}

.notfound-title {
  font-size: 1.9rem;
  margin: 10px 0 12px;
}

.notfound-sub {
  margin-bottom: 28px;
}

/* ============ Reveal animation ============ */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .section { padding-block: 80px; }
}

@media (max-width: 640px) {
  h1 { font-size: clamp(1.8rem, 8.5vw, 2.4rem); }
  h1 br { display: none; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    display: none;
    padding-block: 8px;
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; text-align: center; }

  .nav-links a {
    display: block;
    padding: 14px;
  }

  .nav-cta {
    border: none;
    padding: 14px !important;
  }

  .steps { grid-template-columns: 1fr; }
  .stats-row { gap: 28px; }
}
