/* convocortex — static site styles.
   No frameworks, no external assets, no JavaScript. */

:root {
  color-scheme: dark;
  --bg: #080a0f;
  --surface: #0f1219;
  --surface-raised: #141926;
  --line: #232a39;
  --line-hover: #38425a;
  --ink: #eef1f8;
  --muted: #9aa5bd;
  --accent: #8aa4ff;
  --accent-ink: #080a0f;
  --mark: #58d5c6;
  --radius: 14px;
  --max-width: 68rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-raised: #f0f2f7;
    --line: #dde1ea;
    --line-hover: #b9c0d0;
    --ink: #14181f;
    --muted: #4d5769;
    --accent: #3350cf;
    --accent-ink: #ffffff;
    --mark: #0f8377;
  }
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 10;
  padding: 0.6rem 0.9rem;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.skip-link:focus {
  left: 0.75rem;
}

/* Under-construction notice */

.under-construction {
  padding: 1rem 1.25rem;
  margin: 0 auto 2rem;
  max-width: var(--max-width);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}

@supports not (backdrop-filter: blur(8px)) {
  .site-header {
    background: var(--bg);
  }
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.brand {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.35em;
  border-radius: 50%;
  background: var(--mark);
  vertical-align: 0.05em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

/* Layout */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.section {
  padding: 3.5rem 0 0;
  scroll-margin-top: 5.5rem;
}

.section h2 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

.section-lede {
  color: var(--muted);
  max-width: 46rem;
  margin-bottom: 1.75rem;
}

/* Hero */

.hero {
  padding: 4.5rem 0 0;
}

.hero h1 {
  font-size: clamp(2.05rem, 5vw, 3.35rem);
  margin: 0 0 1.25rem;
  max-width: 24ch;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 44rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

.button {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--line-hover);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover {
  filter: brightness(1.08);
}

/* Sound-bar motif */

.wave {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 4.5rem;
  margin-top: 3rem;
}

.wave span {
  width: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--mark));
  animation: wave 2.6s ease-in-out infinite;
  transform-origin: bottom center;
}

.wave .bar-1 { height: 32%; animation-delay: -1.9s; }
.wave .bar-2 { height: 58%; animation-delay: -1.6s; }
.wave .bar-3 { height: 84%; animation-delay: -1.3s; }
.wave .bar-4 { height: 100%; animation-delay: -1s; }
.wave .bar-5 { height: 66%; animation-delay: -0.7s; }
.wave .bar-6 { height: 92%; animation-delay: -0.4s; }
.wave .bar-7 { height: 44%; animation-delay: -0.1s; }
.wave .bar-8 { height: 74%; animation-delay: -2.2s; }
.wave .bar-9 { height: 28%; animation-delay: -2.5s; }

@keyframes wave {
  0%,
  100% {
    transform: scaleY(0.45);
    opacity: 0.6;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave span {
    animation: none;
    opacity: 0.9;
  }
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card:hover {
  border-color: var(--line-hover);
}

.card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

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

.card-link {
  margin-top: auto;
  padding-top: 0.5rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1.5rem 3rem;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}

.footer-links a {
  color: var(--muted);
}
