/* The Lustre Collective — design system, aligned with CYLO tokens. */

:root {
  color-scheme: light;
  --font-sans: "Open Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Montserrat", ui-sans-serif, system-ui, sans-serif;

  --background: #f8faff;
  --foreground: #1a2b4d;
  --card: #ffffff;
  --card-foreground: #1a2b4d;
  --primary: #1e40af;
  --primary-foreground: #f8faff;
  --primary-dark: #1e3a8a;
  --secondary: #eef2ff;
  --secondary-foreground: #1e3a8a;
  --muted: #eef2ff;
  --muted-foreground: #5b6b8a;
  --accent: #dbeafe;
  --accent-foreground: #1e3a8a;
  --border: #e0e7ff;
  --input: #c7d2fe;
  --ring: #60a5fa;
  --destructive: #b42318;
  --destructive-foreground: #f8faff;
  --ink: #0f172a;
  --ink-foreground: #e2e8f0;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fff6ed;
  --hero-from: #eef2ff;
  --hero-to: #dbeafe;
  --grid-dot: #1e40af24;
  --shadow: 0 8px 25px rgba(26, 43, 77, 0.08);
  --shadow-lg: 0 16px 40px rgba(26, 43, 77, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --header-h: 4.25rem;
}

html.dark {
  color-scheme: dark;
  --background: #0b1220;
  --foreground: #e8eef9;
  --card: #121a2b;
  --card-foreground: #e8eef9;
  --primary: #93c5fd;
  --primary-foreground: #0b1220;
  --primary-dark: #60a5fa;
  --secondary: #1a2740;
  --secondary-foreground: #dbeafe;
  --muted: #1a2740;
  --muted-foreground: #9bb0d0;
  --accent: #1e3a5f;
  --accent-foreground: #dbeafe;
  --border: #243552;
  --input: #2a4060;
  --ring: #60a5fa;
  --destructive: #f87171;
  --destructive-foreground: #0b1220;
  --ink: #020617;
  --ink-foreground: #e2e8f0;
  --ok: #34d399;
  --ok-soft: #052e1c;
  --warn: #fbbf24;
  --warn-soft: #3b2506;
  --hero-from: #0f172a;
  --hero-to: #1e293b;
  --grid-dot: #93c5fd1f;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.55;
}

img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.75rem;
}

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 4px; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 95%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
}
.site-header.is-over-hero {
  position: absolute;
  width: 100%;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.55), transparent);
  border-bottom-color: transparent;
  backdrop-filter: none;
}
.site-header.is-over-hero .nav-link,
.site-header.is-over-hero .theme-toggle,
.site-header.is-over-hero .menu-toggle {
  color: var(--ink-foreground);
}
.site-header.is-over-hero .nav-link:hover,
.site-header.is-over-hero .nav-link.active {
  background: rgba(226, 232, 240, 0.12);
  color: #fff;
}
.site-header.is-over-hero .logo-mark {
  background: #f8faff;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
}

.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.logo-link {
  display: flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}
.logo-mark {
  height: 44px;
  width: auto;
}
html.dark .logo-mark {
  background: #f8faff;
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 0.15rem;
}
@media (min-width: 960px) {
  .nav-list { display: flex; }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: var(--radius-md);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.nav-link:hover {
  background: var(--secondary);
  color: var(--foreground);
  text-decoration: none;
}
.nav-link.active {
  background: var(--secondary);
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  border: 0;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.btn-primary:hover { background: var(--primary-dark); color: var(--primary-foreground); }
html.dark .btn-primary {
  background: #1e40af;
  color: #f8faff;
}
html.dark .btn-primary:hover { background: #1e3a8a; }
.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}
.btn-secondary:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-lg { height: 3rem; padding: 0 1.5rem; font-size: 0.95rem; }
.btn-ghost {
  background: transparent;
  color: inherit;
}
.btn-ghost:hover { background: color-mix(in oklab, currentColor 10%, transparent); }

.theme-toggle,
.menu-toggle {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover,
.menu-toggle:hover { background: var(--secondary); }
.theme-toggle svg,
.menu-toggle svg { width: 1.1rem; height: 1.1rem; }
.icon-sun { display: none; }
html.dark .icon-sun { display: block; }
html.dark .icon-moon { display: none; }
.menu-toggle { display: inline-flex; }
@media (min-width: 960px) { .menu-toggle { display: none; } }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 0.75rem 1rem 1.25rem;
}
.mobile-nav.open { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav .nav-link { height: 2.75rem; }
.mobile-nav .btn { margin-top: 0.5rem; }

/* ---------- Layout ---------- */
main { flex: 1; }
.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.section {
  padding: 4.5rem 0;
}
.section-tight { padding: 3rem 0; }
.kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0 0 0.75rem;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted-foreground);
  max-width: 46rem;
}
.page-hero {
  padding: 4.5rem 0 2.5rem;
  background: linear-gradient(180deg, var(--hero-from), var(--background));
}
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 0.75rem;
}
.page-hero .lead { margin: 0; }

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.grid-2, .grid-3, .grid-4, .grid-stats {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stat {
  padding: 1.25rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--primary);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}
.stat span {
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

/* ---------- Splash / home hero ---------- */
.splash {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--ink);
  color: var(--ink-foreground);
}
.splash-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 50%;
  animation: splash-pan 28s ease-in-out infinite alternate;
  pointer-events: none;
}
.splash-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #02061766 0%, #0206172e 42%, #02061794 100%),
    radial-gradient(transparent 30%, #0206176b 100%);
  pointer-events: none;
}
.splash-drift {
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  background: color-mix(in oklab, #1e40af 18%, transparent);
  filter: blur(64px);
  pointer-events: none;
  animation: splash-drift 22s ease-in-out infinite alternate;
}
.splash-drift.b {
  width: 32rem;
  height: 32rem;
  right: -20%;
  bottom: 0;
  left: auto;
  top: auto;
  background: color-mix(in oklab, #1e3a8a 28%, transparent);
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}
.splash-drift.a { left: -20%; top: 20%; }

@keyframes splash-pan {
  from { transform: scale(1.08) translate(0); }
  to { transform: scale(1.18) translate(-3%, -2%); }
}
@keyframes splash-drift {
  from { transform: translate(0) scale(1); }
  to { transform: translate(6%, -8%) scale(1.08); }
}

.splash-body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6.5rem 1rem 4rem;
}
.splash .kicker { color: color-mix(in oklab, var(--ink-foreground) 70%, transparent); }
.splash h1 {
  max-width: 48rem;
  font-size: clamp(2.4rem, 7vw, 3.75rem);
  color: #f8faff;
  margin: 0.75rem 0 0;
}
.splash .sub {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #93c5fd;
}
.splash .lede {
  margin: 1.1rem auto 0;
  max-width: 38rem;
  color: color-mix(in oklab, var(--ink-foreground) 82%, transparent);
  font-size: 1.05rem;
}
.splash-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.splash-actions .btn-secondary {
  background: color-mix(in oklab, var(--ink-foreground) 12%, transparent);
  color: var(--ink-foreground);
}
.splash-actions .btn-secondary:hover {
  background: color-mix(in oklab, var(--ink-foreground) 20%, transparent);
}

.dot-grid {
  background-image: radial-gradient(circle at 1px 1px, var(--grid-dot) 1px, transparent 0);
  background-size: 28px 28px;
}

/* ---------- Lists / prose ---------- */
.prose ul, .check-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.prose h2 { margin-top: 1.4rem; font-size: 1.25rem; }
.prose p { color: var(--card-foreground); }
.steps {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}
.steps li { margin-bottom: 0.5rem; }

.check-list li,
.prose ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.45rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 99px;
  background: var(--primary);
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 99px;
  background: var(--primary);
}

.timeline {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.timeline-item {
  padding: 1.4rem 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--secondary);
  border: 1px solid var(--border);
}
.timeline-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.timeline-item p { color: var(--muted-foreground); font-size: 0.98rem; }

.quote {
  margin: 1.5rem 0 0;
  padding: 1.5rem 1.4rem;
  background: var(--ink);
  color: var(--ink-foreground);
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  text-align: center;
}
.quote strong { color: #93c5fd; }

.cta-band {
  margin-top: 2.5rem;
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e2e8f0;
  text-align: center;
}
.cta-band h2, .cta-band h3 { color: #93c5fd; }
.cta-band p { color: color-mix(in oklab, #e2e8f0 88%, transparent); max-width: 40rem; margin: 0 auto 1.4rem; }
.cta-band .btn-primary {
  background: #1e40af;
  color: #f8faff;
}

.people-card h3 { margin-bottom: 0.2rem; }
.people-card .role {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

/* ---------- Forms ---------- */
label {
  display: block;
  margin-top: 1.1rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.required::after { content: " *"; color: var(--destructive); }
input[type="text"],
input[type="email"],
input[type="url"],
select,
textarea {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--foreground);
}
textarea { min-height: 9rem; resize: vertical; }
.file-input {
  margin-top: 0.5rem;
  padding: 1.4rem;
  border: 2px dashed var(--input);
  border-radius: var(--radius-md);
  text-align: center;
  background: var(--muted);
  cursor: pointer;
}
.file-input:hover, .file-input.drag-over { border-color: var(--primary); }
.file-input input { display: none; }
.file-label { font-weight: 600; color: var(--primary); }
.submit-btn { margin-top: 1.5rem; }
#form-message, .form-message {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
}
.success { background: var(--ok-soft); color: var(--ok); }
.error { background: color-mix(in oklab, var(--destructive) 12%, var(--card)); color: var(--destructive); }
.hidden { display: none !important; }
.error-message { color: var(--destructive); font-size: 0.9rem; margin-top: 0.4rem; }

/* ---------- Scoreboard ---------- */
.table-scroll { overflow-x: auto; }
.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 42rem;
}
.score-table th {
  background: #1e40af;
  color: #f8faff;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 0.9rem 0.6rem;
  text-align: center;
}
.score-table th:first-child { text-align: left; padding-left: 1rem; }
.score-table td {
  padding: 0.2rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.score-table tr:nth-child(even) td { background: var(--muted); }
.score-table .req { text-align: left; padding: 0; }
.score-yes { color: var(--ok); font-weight: 800; }
.score-no { color: var(--destructive); font-weight: 800; }
.score-mid { color: var(--warn); font-weight: 800; }
.requirement-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.1rem 1rem;
  font-weight: 600;
}
.requirement-details > summary::-webkit-details-marker { display: none; }
.requirement-details > summary::after {
  content: "▶";
  margin-left: 0.75rem;
  font-size: 0.75em;
  color: var(--muted-foreground);
  transition: transform 0.2s;
}
.requirement-details[open] > summary::after { transform: rotate(90deg); }
.detail-text {
  padding: 0 1.1rem 1.1rem;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  text-align: left;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0 2rem;
}
.toolbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--foreground);
  font-size: 0.85rem;
  min-width: 5.5rem;
}
.toolbar img { height: 2.4rem; width: auto; max-width: 4.5rem; object-fit: contain; }
html.dark .toolbar img[src*="github-mark"] { filter: invert(1); }

.job-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.job-list a {
  display: block;
  padding: 1.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1.15rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.job-list a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.apply-button { margin-top: 1.5rem; }

.careers-hero-card {
  background: linear-gradient(140deg, #0f172a 0%, #1e293b 50%, #1e40af 100%);
  color: #e2e8f0;
  border: 0;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.careers-hero-card h1 { color: #f8faff; }
.careers-hero-card p { color: color-mix(in oklab, #e2e8f0 90%, transparent); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--ink);
  color: var(--ink-foreground);
  padding: 2.5rem 1rem;
}
.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer a {
  color: var(--ink-foreground);
  font-weight: 500;
  margin-left: 0.9rem;
}
.site-footer a:hover { color: #fff; }
.footer-meta {
  font-size: 0.85rem;
  opacity: 0.85;
}
.footer-links { display: flex; flex-wrap: wrap; align-items: center; }

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