/* OEAlgo — single-page site */

:root {
  --bg:        #08090c;
  --bg-alt:    #0b0d12;
  --card:      rgba(255, 255, 255, 0.026);
  --card-hi:   rgba(255, 255, 255, 0.05);
  --line:      rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
  --fg:        #e8ecf3;
  --fg-dim:    #a3adbe;
  --muted:     #78829456;
  --accent:    #8ab4ff;
  --accent-2:  #a78bfa;

  --wrap: 1120px;
  --r: 14px;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient backdrop: faint grid + two soft glows, fixed behind everything. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 72% -8%,  rgba(138, 180, 255, 0.10), transparent 65%),
    radial-gradient(48rem 34rem at 8%  18%,  rgba(167, 139, 250, 0.07), transparent 65%),
    linear-gradient(to bottom, transparent, var(--bg) 78%),
    repeating-linear-gradient(to right,  var(--muted) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to bottom, var(--muted) 0 1px, transparent 1px 72px);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 28px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(8, 9, 12, 0.72);
  border-bottom: 1px solid var(--line-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark { width: 26px; height: 26px; color: var(--accent); flex: none; }

.brand-name {
  font-size: 1.16rem;
  font-weight: 640;
  letter-spacing: -0.022em;
}
.brand-name.small { font-size: 1rem; }
.brand-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.94rem;
}
.nav-links a {
  color: var(--fg-dim);
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--fg); text-decoration: none; }

.nav-cta {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg) !important;
}
.nav-cta:hover { border-color: var(--accent); background: rgba(138, 180, 255, 0.08); }

@media (max-width: 560px) {
  .nav-links { gap: 18px; font-size: 0.88rem; }
  .nav-links a[href="#approach"] { display: none; }
}

/* ---------- Typography ---------- */

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.9;
}

h1 {
  margin: 0 0 26px;
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  line-height: 1.07;
  font-weight: 660;
  letter-spacing: -0.036em;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  font-weight: 640;
  letter-spacing: -0.028em;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 620;
  letter-spacing: -0.014em;
}

.grad {
  background: linear-gradient(96deg, var(--accent) 8%, var(--accent-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 62ch;
  margin: 0 0 38px;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: var(--fg-dim);
}

.section-lede {
  max-width: 58ch;
  margin: 0 0 48px;
  color: var(--fg-dim);
}

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

.hero { padding: clamp(84px, 13vw, 156px) 0 clamp(72px, 10vw, 118px); }

.section { padding: clamp(72px, 9vw, 116px) 0; }

.section-alt {
  background: linear-gradient(to bottom, transparent, var(--bg-alt) 12%, var(--bg-alt) 88%, transparent);
  border-block: 1px solid var(--line-soft);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.97rem;
  font-weight: 560;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
              background 0.16s ease, border-color 0.16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #0a0c11;
  box-shadow: 0 6px 26px -10px rgba(138, 180, 255, 0.6);
}
.btn-primary:hover { box-shadow: 0 12px 34px -10px rgba(138, 180, 255, 0.72); }

.btn-ghost {
  border-color: var(--line);
  color: var(--fg);
  background: var(--card);
}
.btn-ghost:hover { border-color: rgba(138, 180, 255, 0.45); background: var(--card-hi); }

.btn-lg {
  padding: 15px 34px;
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

/* ---------- Service cards ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

.card {
  position: relative;
  padding: 30px 28px 32px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(138, 180, 255, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover {
  border-color: var(--line);
  background: var(--card-hi);
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }

.card-num {
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  opacity: 0.75;
}

.card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--fg-dim);
}

/* ---------- Approach ---------- */

.points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .points { grid-template-columns: repeat(2, 1fr); }
}

.points li {
  padding-left: 20px;
  border-left: 2px solid rgba(138, 180, 255, 0.3);
}

.points p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--fg-dim);
}

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

.contact { text-align: center; }
.contact .section-lede { margin-inline: auto; }

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

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 30px 0;
}

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

.footer-meta { font-size: 0.88rem; color: var(--fg-dim); }
.footer-meta a { color: var(--fg-dim); }
.footer-meta a:hover { color: var(--accent); }

/* ---------- Focus ---------- */

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