/* Hallmark · genre: modern-minimal · macrostructure: Index-First
 * F3 spec-sheet knobs: columns=5 (name/val/rate), rule density=every row, numbers=tabular
 * N9 edge-aligned minimal · Ft4 dense typographic colophon · theme: Cobalt
 * enrichment: none (typography only) · studied: no
 * pre-emit critique: P5 H5 E4 S5 R5 V4
 * Shape lock: tiles 0.375rem, controls 0.25rem, chips 999px. Nothing else. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/font/space-grotesk-var.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter Tight";
  src: url("/font/inter-tight-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/font/jetbrains-mono-var.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink-2);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.reveal {
  opacity: 0;
  transform: translateY(3rem);
  filter: blur(0.45rem);
  transition: opacity var(--dur-reveal) var(--ease-out),
              transform var(--dur-reveal) var(--ease-out),
              filter var(--dur-reveal) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-ink); text-decoration: none; }

h1, h2, p, dl, dd { margin: 0; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-snug);
  font-style: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 10;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 0 0 var(--radius-core) 0;
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-core);
  box-shadow: 0 0 0 3px var(--color-focus-halo);
}
.nav-edge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: min(calc(100% - 2 * var(--gutter)), var(--wrap));
  margin: var(--space-md) auto 0;
  padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-sm);
  border: 1px solid var(--color-rule);
  border-radius: 999px;
  background: color-mix(in oklch, var(--color-paper) 86%, transparent);
  box-shadow: var(--shadow-soft), var(--shadow-inset);
  backdrop-filter: blur(1rem);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  white-space: nowrap;
}

.wordmark__mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-core);
}

.nav-edge__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: var(--tap);
  padding: 0.25rem 0.35rem 0.25rem 1rem;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--dur-quick) var(--ease-out),
              color var(--dur-quick) var(--ease-out),
              transform var(--dur-quick) var(--ease-out);
}

.nav-edge__cta:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.nav-edge__cta:active { transform: scale(0.98); }

.nav-edge__icon {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 50%;
  background: var(--color-accent-soft);
  transition: transform var(--dur-quick) var(--ease-out),
              background var(--dur-quick) var(--ease-out);
}

.nav-edge__cta:hover .nav-edge__icon {
  transform: translate(0.25rem, -0.0625rem) scale(1.05);
  background: color-mix(in oklch, var(--color-accent-ink) 18%, transparent);
}

.open__shell {
  padding: 0.375rem;
  border: 1px solid var(--color-rule);
  border-radius: calc(var(--radius-tile) + 0.375rem);
  background: var(--color-paper-2);
  box-shadow: var(--shadow-soft);
}

.open__core {
  padding: var(--space-lg) var(--space-md);
  border-radius: var(--radius-tile);
  background: var(--color-paper);
  box-shadow: var(--shadow-inset);
}

.eyebrow {
  margin-top: var(--space-md);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.open__mark {
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-tile);
}

.open__name {
  margin-top: var(--space-sm);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-ink);
}

.open__line {
  max-width: 52ch;
  margin-top: var(--space-2xs);
  color: var(--color-ink-2);
  font-size: var(--text-lg);
  line-height: 1.45;
}

.open__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-top: var(--space-sm);
  color: var(--color-ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

.open__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- index: categorised link list, links are the buttons ---------- */
.index {
  display: flex;
  flex-direction: column;
}

.group {
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--color-rule);
}

.group:last-child { border-bottom: 0; }

.group__label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-ink-3);
}

.group__note {
  max-width: 60ch;
  margin-top: var(--space-2xs);
  color: var(--color-ink-3);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.group__flag {
  margin-top: var(--space-2xs);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ---------- entries ---------- */
.entry {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  min-height: var(--tap);
  padding: var(--space-2xs) 0;
  border-bottom: 1px solid var(--color-rule-3);
  transition: background var(--dur-quick) var(--ease-out);
}

.group .entry:last-of-type { border-bottom: 0; }
.entry:hover { background: var(--color-paper-2); }

.entry__handle {
  flex: 0 0 11rem;
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}

.entry--primary .entry__handle {
  color: var(--color-accent);
  font-weight: 600;
}

.entry__desc {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--color-ink-3);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.entry__arrow {
  flex: 0 0 auto;
  color: var(--color-ink-3);
  transition: transform var(--dur-base) var(--ease-out);
}

.entry:hover .entry__arrow { transform: translateX(3px); }

/* ---------- F3 tabular spec sheet ---------- */
.scroll {
  margin-top: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.sheet th, .sheet td {
  padding: var(--space-2xs) var(--space-2xs);
  border-bottom: 1px solid var(--color-rule);
  text-align: right;
  font-weight: 400;
  font-size: var(--text-sm);
  white-space: nowrap;
}

.sheet thead th {
  border-bottom: 1px solid var(--color-rule-2);
  color: var(--color-ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sheet tbody th {
  text-align: left;
  color: var(--color-ink-2);
}

.sheet tbody td { color: var(--color-ink); }

/* Derived column, so it steps back one level from the price itself. */
.sheet__rate { color: var(--color-ink-3); }

.sheet__best th, .sheet__best td {
  color: var(--color-accent);
  font-weight: 600;
}

.sheet tbody tr:last-child th,
.sheet tbody tr:last-child td { border-bottom: 0; }

/* ---------- spec list: key/value rows, the last group ---------- */
.specs {
  margin-top: var(--space-sm);
  border-top: 1px solid var(--color-rule);
}

.specs__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2xs) var(--space-sm);
  padding: var(--space-2xs) 0;
  border-bottom: 1px solid var(--color-rule);
}

.specs__row:last-child { border-bottom: 0; }

.specs__k {
  flex: 0 0 11rem;
  color: var(--color-ink);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
}

.specs__v {
  flex: 1 1 14rem;
  min-width: 0;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ---------- Ft4 dense typographic colophon ---------- */
.foot-dense {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--space-md) var(--gutter) var(--space-xl);
  border-top: 1px solid var(--color-rule-2);
}

.foot-dense p {
  max-width: 72ch;
  color: var(--color-ink-3);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1.7;
  font-variant-numeric: tabular-nums;
}

/* ---------- responsive motion ---------- */
@media (max-width: 48rem) {
  .nav-edge { width: calc(100% - 2 * var(--gutter)); }
  .page { padding-inline: var(--gutter); }
  .entry { align-items: flex-start; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); padding-block: var(--space-sm); }
  .entry__handle { flex-basis: calc(100% - 2rem); }
  .entry__desc { flex-basis: calc(100% - 2rem); }
  .entry__arrow { margin-left: auto; margin-top: -2rem; }
  .open__core { padding: var(--space-md) var(--space-sm); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
}
