/* ==========================================================================
   Origene Ventures — origeneventures.com
   Vanilla CSS. Design tokens up top; everything derives from them.
   ========================================================================== */

:root {
  /* Colour */
  --bg: #0d0d0f;
  --surface: #131316;
  --surface-2: #17171b;
  --text: #e8e8ea;
  --muted: #a2a2ab;
  --faint: #71717a;
  --accent: #e4002b;
  --accent-soft: rgba(228, 0, 43, 0.35);
  --line: rgba(232, 232, 234, 0.09);

  /* Type */
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Rhythm */
  --container: 1120px;
  --section-pad: clamp(5.5rem, 12vw, 9.5rem);
  --nav-h: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0; }

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

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

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

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

/* ---------- Utility type ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.eyebrow .slash {
  color: var(--accent);
  margin-right: 0.6em;
  font-weight: 500;
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  max-width: 22ch;
  margin-bottom: 1rem;
}

.section-intro {
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 2.75rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-out),
              border-color 0.3s var(--ease-out),
              color 0.3s var(--ease-out),
              transform 0.3s var(--ease-out);
}

.btn:active { transform: translateY(1px); }

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

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

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

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

.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.875rem; }

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 60;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  transition: background-color 0.4s var(--ease-out),
              border-color 0.4s var(--ease-out);
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(13, 13, 15, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  color: var(--accent);
  animation: mark-pulse 6s var(--ease-out) infinite;
}

.brand-mark--static { animation: none; }

@keyframes mark-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.72; }
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .brand-name { font-size: 0.8rem; letter-spacing: 0.1em; }
}

.brand-name span { color: var(--muted); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.3s var(--ease-out);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0 9px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease-out);
}

.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.25rem;
    background: rgba(13, 13, 15, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: none;
  }

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

  .nav-links a {
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child { border-bottom: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 45%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 45%, #000 30%, transparent 78%);
}

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

/* One slow diagonal light sweep, same angle as the logo slash */
.hero-sweep {
  position: absolute;
  inset: -30%;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(228, 0, 43, 0.07) 50%,
    transparent 58%
  );
  animation: sweep 15s linear infinite;
}

@keyframes sweep {
  from { transform: translateX(-38%); }
  to   { transform: translateX(38%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-h);
}

.hero-item {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.9s var(--ease-out) forwards;
}

.hero-item:nth-child(1) { animation-delay: 0.15s; }
.hero-item:nth-child(2) { animation-delay: 0.3s; }
.hero-item:nth-child(3) { animation-delay: 0.5s; }
.hero-item:nth-child(4) { animation-delay: 0.65s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-headline {
  font-size: clamp(2.5rem, 7.5vw, 4.75rem);
  max-width: 19ch;
  margin-bottom: 1.5rem;
}

.rotator { display: inline-block; }

.rotator-word {
  display: inline-block;
  color: var(--accent);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.rotator-word.is-leaving {
  opacity: 0;
  transform: translateY(-14px);
  transition-duration: 0.3s;
}

.rotator-word.is-entering {
  opacity: 0;
  transform: translateY(14px);
  transition: none;
}

.hero-subline {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  max-width: 44ch;
  margin-bottom: 2.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--faint);
  border-radius: 11px;
  opacity: 0;
  animation: rise 0.9s var(--ease-out) 1.4s forwards;
}

.hero-scroll-hint span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--muted);
  animation: hint-drop 2.2s var(--ease-out) infinite;
}

@keyframes hint-drop {
  0%       { transform: translateY(0); opacity: 1; }
  60%,100% { transform: translateY(11px); opacity: 0; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); }

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

/* ---------- Cards (pillars) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.9rem 1.7rem;
  transition: transform 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
}

.section-alt .card { background: var(--surface-2); }

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

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1.4rem;
  color: var(--accent);
}

.card-icon svg { width: 26px; height: 26px; }

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--muted);
  font-size: 0.975rem;
}

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

/* ---------- Divisions ---------- */

.division-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.division-card {
  display: flex;
  flex-direction: column;
  padding: 2.1rem 1.9rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: transform 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
}

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

.division-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.division-name {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.division-arrow {
  color: var(--accent);
  font-size: 1.15rem;
  transition: transform 0.35s var(--ease-out);
}

.division-card:hover .division-arrow { transform: translateX(5px); }

.division-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.division-desc {
  color: var(--muted);
  font-size: 0.975rem;
  margin-bottom: 1.6rem;
}

.division-url {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
}

/* Future division: visually distinct, muted, dashed */
.division-card--future {
  background: transparent;
  border-style: dashed;
  border-color: rgba(232, 232, 234, 0.16);
}

.division-card--future:hover {
  transform: none;
  border-color: rgba(232, 232, 234, 0.28);
}

.division-card--future .division-name { color: var(--muted); }
.division-card--future .division-role { color: var(--faint); }

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

/* ---------- About ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-body p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

@media (max-width: 860px) {
  .about-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Contact ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 500;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 2px;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-location {
  margin-top: 1rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-size: 0.85rem;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.3s var(--ease-out);
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-soft);
}

.contact-form .btn { align-self: flex-start; }

.form-note {
  font-size: 0.82rem;
  color: var(--faint);
}

@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
}

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

.footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-brand .brand-mark { width: 32px; height: 32px; }

.footer-name { font-weight: 500; font-size: 0.95rem; }

.footer-meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-links a { transition: color 0.3s var(--ease-out); }
.footer-links a:hover { color: var(--text); }

.footer-copy {
  width: 100%;
  color: var(--faint);
  font-size: 0.8rem;
}

/* ---------- Legal pages (privacy.html, terms.html) ---------- */

.legal {
  max-width: 72ch;
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 5rem));
  padding-bottom: var(--section-pad);
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  margin-bottom: 0.75rem;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 2.75rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
}

.legal p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.legal ul {
  color: var(--muted);
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.legal li { margin-bottom: 0.5rem; }

.legal a {
  color: var(--text);
  border-bottom: 1px solid var(--accent-soft);
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.legal a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.legal-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.3s var(--ease-out);
}

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

/* ---------- Scroll reveals ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced motion: show final states, kill all non-essential motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-item,
  .hero-scroll-hint {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero-scroll-hint span,
  .brand-mark,
  .hero-sweep { animation: none; }

  .hero-sweep,
  .hero-canvas { display: none; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rotator-word { transition: none; }

  .card, .division-card, .btn, .division-arrow { transition: none; }
  .card:hover, .division-card:hover { transform: none; }

  .scroll-progress { display: none; }
}
