/* =========================================================
   Collaborative Brainpower — styles.css
   Minimalist dark theme, cyan accents, no external fonts.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg:            #070b12;
  --bg-alt:        #0a0f19;
  --surface:       #0c1220;
  --surface-2:     #101828;
  --border:        rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text:          #e7edf7;
  --text-muted:    #93a2b9;
  --text-dim:      #6b7a91;

  --accent:        #4fd1e0;
  --accent-soft:   rgba(79, 209, 224, 0.12);
  --accent-line:   rgba(79, 209, 224, 0.35);

  --header-h:      68px;
  --radius:        14px;
  --radius-sm:     10px;

  --container:     1120px;
  --container-narrow: 720px;

  --ease:          cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 18% -8%, rgba(79, 209, 224, 0.075), transparent 62%),
    radial-gradient(760px 460px at 92% 4%, rgba(79, 120, 224, 0.055), transparent 60%);
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.021em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s var(--ease), opacity 0.18s var(--ease);
}
a:hover { color: #7ee3ef; }

ul { margin: 0; padding: 0; list-style: none; }

::selection {
  background: rgba(79, 209, 224, 0.28);
  color: #fff;
}

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

/* ---------- Layout ---------- */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: #04121a;
  font-size: 0.9rem;
  font-weight: 600;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 16px; color: #04121a; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 11, 18, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); }
.brand-mark { color: var(--accent); flex-shrink: 0; }
.brand-text { color: var(--text-muted); font-weight: 400; }
.brand-text strong { color: var(--text); font-weight: 600; }

/* Nav */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.nav-toggle:hover { border-color: var(--border-strong); }

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 17px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -5.5px; }
.nav-toggle-bars::after  { top:  5.5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(72px, 13vw, 148px) 0 clamp(64px, 10vw, 116px);
}

.hero-inner { max-width: 900px; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 24px;
  font-size: clamp(2.15rem, 6.2vw, 3.9rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.033em;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(100deg, #7ee3ef 0%, var(--accent) 45%, #5aa8e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 640px;
  margin: 0 0 40px;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 2.1vw, 1.15rem);
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.945rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #04131a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 8px 24px -14px rgba(79, 209, 224, 0.85);
}
.btn-primary:hover {
  background: #6adce9;
  color: #04131a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 12px 30px -14px rgba(79, 209, 224, 0.95);
}
.btn-icon { transition: transform 0.2s var(--ease); }
.btn-primary:hover .btn-icon { transform: translateX(2px); }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.018);
}
.btn-ghost:hover {
  border-color: rgba(79, 209, 224, 0.42);
  background: var(--accent-soft);
  color: var(--text);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(64px, 9vw, 104px) 0;
}
.section-lined {
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: var(--container-narrow);
  margin-bottom: 40px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.15rem);
  letter-spacing: -0.026em;
}
.section-head .eyebrow { margin-bottom: 12px; }

.section-lead {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 1.03rem;
  max-width: 620px;
}

/* ---------- Prose ---------- */
.prose {
  max-width: var(--container-narrow);
  color: var(--text-muted);
  font-size: 1.045rem;
  line-height: 1.75;
}
.prose p + p { margin-top: 1.15em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose-tight { font-size: 1rem; }

/* ---------- Cards ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  padding: 30px 28px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0)) ,
    var(--surface);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
              background 0.25s var(--ease);
}
.card:hover {
  border-color: rgba(79, 209, 224, 0.26);
  transform: translateY(-2px);
}

.card-num {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1.12rem;
  letter-spacing: -0.017em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.945rem;
  line-height: 1.7;
}

/* ---------- Status panel ---------- */
.status-panel {
  max-width: 860px;
  padding: 8px 0 8px 4px;
  border-left: 1px solid var(--border-strong);
}

.status-list { display: grid; gap: 26px; }

.status-list li {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 16px;
  padding-left: 22px;
}

.status-dot {
  position: relative;
  top: 9px;
  left: -29px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 209, 224, 0.1);
  grid-column: 1;
}

.status-list li p {
  grid-column: 2;
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.72;
}
.status-list li p strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}
.contact-grid h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.15rem);
  letter-spacing: -0.026em;
}

.contact-card {
  padding: 30px 30px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.contact-label {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-mail {
  display: inline-block;
  font-size: clamp(1.02rem, 2.4vw, 1.2rem);
  font-weight: 550;
  letter-spacing: -0.012em;
  word-break: break-word;
}

.contact-note {
  margin: 18px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.895rem;
  line-height: 1.68;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 52px 0 40px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.footer-brand .brand-mark { color: var(--accent); margin-top: 2px; }

.footer-name {
  margin: 0 0 5px;
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}
.footer-meta {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.865rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
}
.footer-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.18s var(--ease);
}
.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.845rem;
}

/* ---------- Legal pages ---------- */
.legal {
  padding: clamp(56px, 9vw, 96px) 0 96px;
}
.legal-inner { max-width: 780px; }

.legal-head { margin-bottom: 44px; }
.legal-head h1 {
  font-size: clamp(1.85rem, 4.6vw, 2.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.legal-updated {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.875rem;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.legal-body h2 {
  margin: 46px 0 14px;
  font-size: 1.16rem;
  letter-spacing: -0.017em;
}
.legal-body h2:first-child { margin-top: 0; }

.legal-body p,
.legal-body li {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.76;
}
.legal-body p { margin: 0 0 1.05em; }

.legal-body ul {
  margin: 0 0 1.05em;
  padding-left: 0;
  display: grid;
  gap: 9px;
}
.legal-body ul li {
  position: relative;
  padding-left: 20px;
}
.legal-body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.legal-body a { text-decoration: underline; text-underline-offset: 3px; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  width: 100%;
  color: var(--text-muted);
  font-size: 0.925rem;
}
.legal-back:hover { color: var(--accent); }

/* ---------- 404 ---------- */
.notfound {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h) - 220px);
  padding: 80px 0;
  text-align: center;
}
.notfound-code {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.notfound h1 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
}
.notfound p {
  max-width: 460px;
  margin: 0 auto 32px;
  color: var(--text-muted);
}

/* =========================================================
   Motion
   ========================================================= */

/* Hero entrance */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.anim {
  opacity: 0;
  animation: riseIn 0.75s var(--ease) forwards;
}
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.14s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.34s; }

/* Scroll reveal — only active when JS is available */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger siblings inside a grid */
.js .grid-3 .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .grid-3 .reveal:nth-child(3) { transition-delay: 0.16s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  :root { --header-h: 62px; }

  body { font-size: 16px; }
  .container { padding-inline: 20px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 10px 20px 20px;
    background: rgba(7, 11, 18, 0.98);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--border);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), visibility 0.24s;
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .site-nav a {
    padding: 13px 14px;
    font-size: 1rem;
  }

  .hero { padding-top: 64px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  .footer-top { padding: 42px 0 32px; gap: 28px; }
  .footer-nav ul { gap: 10px 22px; }
  .footer-bottom { padding-bottom: 30px; }
}

@media (max-width: 420px) {
  .brand-text { font-size: 0.9rem; }
  .btn { padding: 12px 18px; font-size: 0.91rem; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .anim { opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (prefers-contrast: more) {
  :root {
    --text-muted: #b9c4d4;
    --text-dim: #97a3b6;
    --border: rgba(255, 255, 255, 0.16);
  }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .site-header, .site-footer, .hero-actions, .skip-link { display: none; }
  .anim, .js .reveal { opacity: 1 !important; transform: none !important; }
}
.footer-bottom-flat { border-top: 0; padding-top: 0; }
.prose-spaced { margin-top: 2rem; }
.shot { margin: 2.5rem 0 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.shot figcaption { margin-top: .75rem; font-size: .875rem; color: #93a2b9; text-align: center; }
