/* Open Prognosis — dark, editorial theme inspired by a pill-nav / mountain-hero
   single-brand aesthetic. Fonts: Schibsted Grotesk (sans) + Instrument Serif (accent italics). */

:root {
  --bg: #060606;
  --fg: #fafaf8;
  --fg-rgb: 250, 250, 248;
  --muted: rgba(var(--fg-rgb), 0.68);
  --muted-nav: rgba(var(--fg-rgb), 0.6);
  --muted-label: rgba(var(--fg-rgb), 0.45);
  --accent: #ff6b1f;
  --line: rgba(var(--fg-rgb), 0.08);
  --pill: rgba(var(--fg-rgb), 0.06);
  --pill-border: rgba(var(--fg-rgb), 0.1);
  --pill-active: rgba(var(--fg-rgb), 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Schibsted Grotesk", Arial, Helvetica, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.accent {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--accent);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: clamp(16px, 2.8vh, 28px) clamp(20px, 4vw, 56px) clamp(10px, 1.4vh, 14px);
  background: rgba(6, 6, 6, 0.55);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 12px);
  width: max-content;
  font-size: clamp(17px, 2.2vw, 22px);
  letter-spacing: -0.035em;
  font-weight: 500;
}

.logo-mark {
  display: block;
  height: clamp(24px, 2.8vw, 32px);
  width: clamp(24px, 2.8vw, 32px);
}

.pillnav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--pill);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  padding: 4px;
}

.pillnav a {
  position: relative;
  display: block;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted-nav);
  transition: color 0.25s ease, background 0.25s ease;
}

.pillnav a:hover {
  color: var(--fg);
}

.pillnav a.selected {
  background: var(--pill-active);
  color: var(--fg);
}

.join {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  background: var(--fg);
  color: var(--bg);
  transition: transform 0.2s ease, background 0.2s ease;
}

.join:hover {
  background: #fff;
  transform: translateY(-1px);
}

.join-short {
  display: none;
}

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 86px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.hero-bg canvas {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  display: block;
  will-change: transform;
}

.hero-pad {
  position: relative;
  z-index: 1;
  padding: clamp(16px, min(17vh, 100dvh - 620px), 180px) clamp(20px, 4vw, 56px) clamp(14px, 2.4vh, 24px);
}

.hero-content {
  width: 100%;
  max-width: min(800px, 100%);
  margin: clamp(10px, 6vh, 70px) auto 0;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, min(5.5vw, 8vh), 84px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 500;
  text-wrap: balance;
}

/* ---------- Inner pages (About / Team) ---------- */
.inner-main {
  min-height: calc(100svh - 86px);
  margin: 0 auto;
  width: 100%;
  max-width: 760px;
  padding: clamp(60px, 10vh, 110px) clamp(20px, 4vw, 56px) 8vh;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 560px;
}

.stack.group {
  gap: 12px;
}

.inner-main h2 {
  font-size: clamp(28px, 4vw, 38.4px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 28px;
}

.inner-main p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--muted);
  margin: 0;
}

.inner-main p.emph {
  color: var(--fg);
}

.inner-main p strong {
  color: var(--fg);
  font-weight: 600;
}

.founders {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, auto);
  column-gap: 16px;
  row-gap: 20px;
  justify-content: start;
}

.founder-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.founder-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: var(--fg);
  transition: color 0.2s ease;
}

.founder-name:hover {
  color: var(--accent);
}

.li-icon {
  width: 14px;
  height: 14px;
  color: var(--muted-label);
}

.founder-role {
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-label);
}

.section-label {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--muted);
  margin: 28px 0 0;
}

.role-card {
  margin-top: 20px;
  padding: 20px 0 32px;
  border-top: 1px solid rgba(var(--fg-rgb), 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-card h4 {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.5;
  margin: 0;
  color: var(--fg);
}

.role-meta {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.011em;
  color: var(--muted);
  margin: 0;
}

.role-view {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 10px;
  border: 1px solid rgba(var(--fg-rgb), 0.3);
  border-radius: 999px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.role-view:hover {
  background: var(--pill-active);
  border-color: rgba(var(--fg-rgb), 0.5);
}

/* ---------- Role details modal ---------- */
.role-modal[hidden] {
  display: none;
}

.role-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.role-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 3, 0.82);
  animation: fadeIn 0.25s ease both;
}

.role-modal-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(640px, 100%);
  overflow-y: auto;
  background: #0d0d0d;
  border-radius: 24px 0 0 24px;
  padding: clamp(28px, 5vw, 56px);
  animation: slideIn 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.role-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: rgba(var(--fg-rgb), 0.7);
  cursor: pointer;
}

.role-modal-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-label);
  margin: 0 0 14px;
}

.role-modal-panel h2 {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0 0 14px;
}

.role-modal-meta {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}

.role-modal-intro {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 32px;
}

.role-modal-section {
  margin: 0 0 28px;
}

.role-modal-section-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

.role-modal-section p {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.6;
  color: rgba(var(--fg-rgb), 0.72);
  margin: 0;
}

.role-modal-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-modal-section li {
  position: relative;
  padding-left: 20px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: rgba(var(--fg-rgb), 0.72);
}

.role-modal-section li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.role-modal-apply {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  border-radius: 999px;
  padding: 11px 24px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--bg);
  background: var(--fg);
  transition: background 0.2s ease, transform 0.2s ease;
}

.role-modal-apply:hover {
  background: #fff;
  transform: translateY(-1px);
}

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

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@media (max-width: 680px) {
  .role-modal-panel {
    width: 100%;
    border-radius: 0;
  }
}

/* ---------- Transitions ---------- */
.ready .hero h1,
.ready .inner-main h2,
.ready .inner-main .stack > p:first-child {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.leaving {
  animation: fadeout 0.18s ease both;
}

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

@keyframes fadeout {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .header {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 14px 5% 10px;
  }

  .pillnav a {
    padding: 7px 11px;
    font-size: 12.5px;
  }

  .join {
    padding: 9px 15px;
    font-size: 13px;
  }

  .inner-main {
    padding: 50px 5% 7vh;
  }

  .founders {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
}

@media (max-width: 480px) {
  .header {
    gap: 6px;
    padding: 12px 4% 9px;
  }

  .pillnav {
    gap: 1px;
    padding: 3px;
  }

  .pillnav a {
    padding: 6px 7px;
    font-size: 11px;
  }

  .join {
    padding: 8px 12px;
  }

  .join-full {
    display: none;
  }

  .join-short {
    display: inline;
  }

  .logo span.logo-word {
    display: none;
  }
}
