/* Amaretto Labs — shared styles for index.html and embeddings.html */

/* ---------- tokens ---------- */
:root {
  --ground: #FCFAF7;
  --ink: #221A13;
  --muted: #7A6E60;
  --accent: #B96A18;
  --accent-soft: #B96A1822;
  --hairline: #E7DFD3;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Didot, "Bodoni MT", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #171310;
    --ink: #EFE7DB;
    --muted: #9C8F7F;
    --accent: #E09540;
    --accent-soft: #E0954026;
    --hairline: #2E2620;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 55rem; margin: 0 auto; padding: 0 1.5rem; }

.eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  margin: 0 0 0.5rem;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 0;
}
.mark { display: flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.mark img { display: block; height: 26px; width: auto; }
.mark span { font-family: var(--serif); font-size: 1.15rem; letter-spacing: 0.01em; }
.topbar .links { display: flex; gap: 1.75rem; font-size: 0.9rem; }
.topbar .links a { color: var(--muted); }
.topbar .links a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 6rem 0 3rem; }
.hero h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(3.2rem, 9vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.hero h1 em { color: var(--accent); }
.hero .lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 2.25rem;
  text-wrap: balance;
}
.hero .cta {
  display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.btn {
  display: inline-block;
  background: var(--ink); color: var(--ground);
  padding: 0.65rem 1.4rem; border-radius: 999px;
  font-size: 0.92rem; font-weight: 500;
}
.btn:hover { background: var(--accent); color: #fff; }
.cta .quiet { color: var(--muted); font-size: 0.92rem; }
.cta .quiet:hover { color: var(--accent); }

/* ---------- page selector ---------- */
.tabs {
  display: flex; gap: 0.35rem;
  margin-top: 0.5rem;
  border-bottom: 1px solid var(--hairline);
}
.tabs a {
  font-size: 0.9rem; color: var(--muted);
  padding: 0.5rem 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] {
  color: var(--ink); font-weight: 500;
  border-bottom-color: var(--accent);
}

/* ---------- model rows ---------- */
.models { padding: 3rem 0 1rem; }
.model {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--hairline);
}
.model:last-of-type { border-bottom: none; }
/* embeddings page: long model names need a wider name column */
.long-names .model { grid-template-columns: 18rem 1fr; }
.long-names .model h2 { white-space: nowrap; }
.model h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.55rem; border-radius: 999px;
}
/* the grid column sets the width on desktop; the cap is for the stacked layout */
.desc { margin: 0; max-width: 40rem; }
.desc .sub { display: block; margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; }

/* labelled spec columns */
.stats {
  display: flex; flex-wrap: wrap; gap: 0.6rem 2.25rem;
  margin: 1.1rem 0 1.2rem;
}
.stats dt {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.stats dd {
  margin: 0;
  font-family: var(--mono); font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

/* where to get the model */
.sources { display: flex; flex-wrap: wrap; gap: 0.35rem 1.5rem; }
.sources a {
  font-size: 0.9rem; font-weight: 500;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.sources a:hover { border-bottom-width: 2px; }

/* hover/focus footnote on a spec value */
.tip { position: relative; cursor: help; border-bottom: 1px dotted var(--muted); }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--ink);
  color: var(--ground);
  font-family: var(--sans);
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 10;
}
.tip:hover::after, .tip:focus-visible::after { opacity: 1; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--hairline);
  margin-top: 3rem;
  padding: 2rem 0 3rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted); font-size: 0.85rem;
}
footer a { color: var(--muted); border-bottom: 1px solid var(--hairline); }
footer a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .topbar { flex-wrap: wrap; gap: 0.75rem; }
  .hero { padding: 4rem 0 2.25rem; }
  .model, .long-names .model { grid-template-columns: 1fr; gap: 1.25rem; padding: 2.25rem 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 0.6s ease both; }
  .hero .lede { animation-delay: 0.08s; }
  .hero .cta { animation-delay: 0.16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
