/*
  site.css — hand-written stylesheet for ontofelia.org.
  No build step, no external resources. Fonts are self-hosted under /fonts/.
*/

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #005aa0;
  --blue-dark: #004a85;
  --blue-50: #eaf1f8;
  --blue-100: #d6e5f1;
  --warm: #b5472f;
  --warm-50: #fbeee9;
  --warm-100: #f3d9cf;
  --ink: #0f172a;
  --body: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --card-border: #e2e8f0;
  --green-fg: #15803d;
  --green-bg: #dcfce7;
  --amber-fg: #92400e;
  --amber-bg: #fef3c7;
  --grey-fg: #475569;
  --grey-bg: #e2e8f0;
  --focus: #0ea5e9;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f1f5f9;
    --body: #cbd5e1;
    --muted: #94a3b8;
    --faint: #64748b;
    --line: #243244;
    --bg: #0b1220;
    --bg-soft: #0f1b2d;
    --bg-dark: #060a13;
    --bg-darker: #020617;
    --card-border: #243244;
    --blue-50: #0f2436;
    --blue-100: #123048;
    --warm-50: #2b1711;
    --warm-100: #3a2016;
    --green-bg: #0f2e1d;
    --green-fg: #4ade80;
    --amber-bg: #2e2208;
    --amber-fg: #fbbf24;
    --grey-bg: #1e293b;
    --grey-fg: #cbd5e1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f1f5f9;
  --body: #cbd5e1;
  --muted: #94a3b8;
  --faint: #64748b;
  --line: #243244;
  --bg: #0b1220;
  --bg-soft: #0f1b2d;
  --bg-dark: #060a13;
  --bg-darker: #020617;
  --card-border: #243244;
  --blue-50: #0f2436;
  --blue-100: #123048;
  --warm-50: #2b1711;
  --warm-100: #3a2016;
  --green-bg: #0f2e1d;
  --green-fg: #4ade80;
  --amber-bg: #2e2208;
  --amber-fg: #fbbf24;
  --grey-bg: #1e293b;
  --grey-fg: #cbd5e1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: .5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.wrap-narrow { max-width: 48rem; }

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}
.site-nav .brand img { height: 1.75rem; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a:hover { color: var(--blue); text-decoration: none; }
.nav-links .nav-external { color: var(--faint); font-weight: 600; }
@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1.5rem;
  border-radius: .75rem;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; }
.btn-secondary {
  background: var(--bg);
  color: var(--body);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue);
}
.eyebrow.warm { color: var(--warm); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--blue-50), var(--bg) 70%);
}
.hero .wrap {
  max-width: 50rem;
  padding-top: 5rem;
  padding-bottom: 3.5rem;
  text-align: center;
}
.hero .wordmark { height: 4.5rem; margin: 0 auto 1.75rem; }
.hero .badge-pill {
  display: inline-flex;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blue);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero .lead {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.hero .cta-row {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}

/* Sections */
.section { padding: 4.5rem 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-top: .5rem; }
.section-head p { margin-top: .75rem; color: var(--muted); line-height: 1.7; }

/* Ofelia section */
.ofelia-card {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  background: var(--warm-50);
  border: 1px solid var(--warm-100);
  border-radius: 1.25rem;
  padding: 2rem;
}
.avatar-o {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--warm), #8a3420);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  font-family: "Inter", serif;
}
.ofelia-body p { color: var(--body); line-height: 1.75; margin-top: .9rem; }
.ofelia-body p:first-child { margin-top: 0; }
.ofelia-list {
  margin-top: 1rem;
  display: grid;
  gap: .6rem;
}
.ofelia-list li {
  list-style: none;
  padding-left: 1.4rem;
  position: relative;
  color: var(--body);
}
.ofelia-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--warm);
  font-weight: 700;
}
.ofelia-sig {
  margin-top: 1.25rem;
  font-style: italic;
  color: var(--muted);
}

/* Process flow */
.process-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  counter-reset: step;
}
@media (max-width: 860px) {
  .process-flow { grid-template-columns: 1fr; }
}
.process-step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
}
.process-step .num {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: .75rem;
}
.process-step h3 { font-size: 1.05rem; font-weight: 700; }
.process-step p { margin-top: .5rem; font-size: .9rem; color: var(--muted); line-height: 1.6; }
@media (min-width: 861px) {
  .process-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -1.1rem;
    top: 1.65rem;
    color: var(--faint);
    font-size: 1.2rem;
  }
}
.process-note {
  margin-top: 1.5rem;
  font-size: .9rem;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: .75rem;
  padding: .9rem 1.1rem;
}

/* Log timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.log-entry { position: relative; padding: 0 0 1.75rem 1.75rem; }
.log-entry:last-child { padding-bottom: 0; }
.log-entry::before {
  content: "";
  position: absolute;
  left: -.4rem;
  top: .35rem;
  width: .7rem;
  height: .7rem;
  border-radius: 999px;
  background: var(--blue);
  border: 2px solid var(--bg);
}
.log-date { font-size: .8rem; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.log-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .25rem; }
.log-title { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.log-detail { margin-top: .4rem; color: var(--muted); line-height: 1.65; font-size: .95rem; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .2rem .55rem;
  border-radius: 999px;
}
.badge-done { background: var(--green-bg); color: var(--green-fg); }
.badge-partial { background: var(--amber-bg); color: var(--amber-fg); }
.badge-review { background: var(--grey-bg); color: var(--grey-fg); }

/* Status list */
.status-list { display: grid; gap: 1rem; }
.status-list li {
  list-style: none;
  padding: 1.1rem 1.25rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: .6rem;
  color: var(--body);
  line-height: 1.65;
}

/* Vision roadmap */
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2rem; }
@media (max-width: 760px) { .roadmap { grid-template-columns: 1fr; } }
.roadmap .card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.5rem;
}
.roadmap .card h3 { font-size: 1rem; font-weight: 700; }
.roadmap .card p { margin-top: .6rem; font-size: .9rem; color: var(--muted); line-height: 1.6; }

/* Cards grid (how it works) */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (max-width: 700px) { .card-grid { grid-template-columns: 1fr; } }
.feature-card {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1.75rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0, 90, 160, .08); }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; }
.feature-card p { margin-top: .5rem; color: var(--muted); font-size: .92rem; line-height: 1.6; }

/* Evaluation table */
.eval-table-wrap { overflow-x: auto; border: 1px solid var(--card-border); border-radius: 1rem; margin-top: 2rem; }
table.eval-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 32rem; }
table.eval-table th, table.eval-table td { padding: .9rem 1.1rem; text-align: left; }
table.eval-table thead th {
  background: var(--bg-soft);
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
table.eval-table tbody tr { border-top: 1px solid var(--line); }
table.eval-table tbody tr.highlight { background: var(--blue-50); }
table.eval-table .win { font-weight: 700; color: var(--blue); }
.caveat {
  margin-top: 1.5rem;
  border: 2px solid var(--amber-fg);
  background: var(--amber-bg);
  border-radius: 1rem;
  padding: 1.5rem;
}
.caveat p.caveat-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--amber-fg);
  margin-bottom: .5rem;
}
.caveat p { color: var(--body); line-height: 1.65; }

/* Videos */
.video-row { display: grid; gap: 1.5rem; }
.video-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  overflow: hidden;
  background: #000;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 700px) { .video-grid { grid-template-columns: 1fr; } }
.video-caption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }

/* Quickstart */
.section-dark { background: var(--bg-dark); color: #cbd5e1; }
.section-dark .section-head h2 { color: #fff; }
.section-dark .section-head p,
.section-dark p { color: #cbd5e1; }
.code-block {
  margin-top: 1.5rem;
  background: var(--bg-darker);
  border: 1px solid #334155;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}
.code-block pre { margin: 0; font-size: .88rem; line-height: 1.6; color: #e2e8f0; }
.code-block .comment { color: #64748b; }
.quickstart-link { color: #a5d8ff; font-weight: 600; }
.quickstart-note {
  margin-top: 1.5rem;
  border: 1px solid rgba(245, 158, 11, .4);
  background: rgba(245, 158, 11, .1);
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  font-size: .9rem;
  color: #fde68a;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--bg-darker);
  color: #94a3b8;
  padding: 2.5rem 0;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: .9rem;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

@media (max-width: 480px) {
  .section { padding: 3rem 0; }
  .ofelia-card { flex-direction: column; }
}
