/* Nari Labs brand tokens — the single source of truth for the whole site.
   Every page loads this file; page styles reference only these variables. */

/* mono accent for the announcement banner */
@font-face {
  font-family: "Nari Mono";
  src: url("/assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* no rubber-band bounce at scroll edges, site-wide */
html,
body {
  overscroll-behavior: none;
}

/* never synthesize weights/styles a font doesn't ship — keeps the serif from
   rendering heavier than its real max weight (inherited everywhere) */
html {
  font-synthesis: none;
}

:root {
  /* palette */
  --bg: #ffffff;               /* white page background */
  --text: #1a1a1a;             /* primary ink */
  --text-muted: #8a8880;       /* secondary / meta text */
  --border: #e9e9e7;           /* hairlines, card borders */
  --surface: #ffffff;          /* cards, tables, players */
  --surface-tint: #fbfbfa;     /* table header fill */
  --surface-fill: #f5f5f3;     /* filled cards on white */
  --surface-fill-soft: #f9f9f7; /* lighter card fill */
  --border-faint: #f0f0ee;     /* barely-there component outline */
  --code-bg: #f3f3f1;          /* inline code chips */
  --nav-veil: rgba(255, 255, 255, 0.82);  /* sticky nav / footer scrim */
  --underline: rgba(26, 26, 26, 0.25);    /* resting link underline */
  --shadow-soft: rgba(26, 26, 26, 0.08);  /* card shadows */

  /* accents */
  --yc-orange: #ff6600;        /* YC mark / hover */
  --yc-name: #c24a00;          /* YC wordmark — 4.9:1 on white */
  --sky-deep: #2e64b8;         /* text-safe blue — 5.8:1 on white */
  --heart: var(--sky);         /* footer heart — pastel key blue */
  --bloom: #fff461;            /* banner yellow */
  --sky: #bfd7ff;              /* banner gradient tail */
  --on-key: #211e19;           /* ink on the banner accents */

  /* type */
  --serif: "Iowan Old Style BT", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --mono: "Nari Mono", ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

/* --- YC lockup (from redesign branch) — shared across all pages --- */
.yc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.yc .yc-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background: var(--yc-orange);
  color: #ffffff;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 1;
}
.yc .yc-name {
  color: var(--yc-name);
}
.yc:hover .yc-name {
  color: var(--yc-orange);
}

/* --- blog announcement banner — shared across all pages --- */
.blog-banner {
  position: relative;
  background: linear-gradient(90deg, var(--bloom) 0%, var(--bloom) 70%, var(--sky) 100%);
  color: var(--on-key);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 44px;
  text-decoration: none;
}
.banner-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--on-key);
  opacity: 0.55;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.banner-close:hover {
  opacity: 1;
}
@media (max-width: 640px) {
  .blog-banner {
    padding: 10px 20px;
    font-size: 10.5px;
  }
}

/* --- contact sheet (shared) — opened by the nav mail icon on every page.
   Markup is injected and wired by /assets/contact-sheet.js */
.sheet-back {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  background: rgba(26, 26, 26, 0.34);
  pointer-events: none;
}
.sheet-back.open {
  display: block;
  pointer-events: auto;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: sheet-back-in 0.22s ease both;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 96;
  display: none;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -20px 60px rgba(26, 26, 26, 0.22);
  max-height: 98vh;
  overflow-y: auto;
}
.sheet-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.sheet.open {
  display: block;
  animation: sheet-in 0.36s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes sheet-back-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 3fr 5fr;
  min-height: 96vh;
}
.sheet-split > * {
  min-width: 0;
}
.sheet-aside {
  position: relative;
  display: flex;
  align-items: center;
  padding: 56px 5vw;
  background: var(--bg);
  border-right: 1px solid var(--border);
}
.sheet-aside-in {
  position: relative;
  z-index: 1;
  max-width: 22em;
}
.s-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  /* pastel key blue, mixed toward text-safe --sky-deep for legibility */
  color: var(--sky-deep);
  color: color-mix(in srgb, var(--sky) 55%, var(--sky-deep));
  text-transform: uppercase;
}
.sheet-aside h2 {
  font-family: var(--serif);
  font-weight: 400;
  /* sized so "realtime humans." holds one line → headline breaks in two */
  font-size: clamp(30px, 3.4vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 12px 0 0;
}
.sheet-aside h2 .nowrap {
  white-space: nowrap;
}
.s-intro {
  color: var(--text-muted);
  font-size: 16.5px;
  line-height: 1.6;
  margin-top: 14px;
}
.sheet-form {
  display: flex;
  align-items: center;
  padding: 44px 4vw 52px;
  overflow-y: auto;
}
.sheet-card {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 32px 38px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 26px 70px rgba(26, 26, 26, 0.18);
}
.sheet-x {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-x:hover {
  background: var(--surface-tint);
}
body.sheet-open {
  overflow: hidden;
}
.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  margin-bottom: 14px;
}
.field.full {
  grid-column: 1 / -1;
}
.sheet label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.control {
  width: 100%;
  font-family: var(--sans);
  font-size: 15.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 16px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}
.control::placeholder {
  color: var(--text-muted);
}
.control:hover {
  border-color: var(--text-muted);
}
.control:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(191, 215, 255, 0.45);
}
textarea.control {
  min-height: 92px;
  resize: vertical;
  line-height: 1.6;
}
.sheet .marketing-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.sheet .marketing-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--text);
  cursor: pointer;
}
.sheet .marketing-consent span {
  font-size: 13.5px;
  line-height: 1.55;
}
.sheet .submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}
.sheet-submit {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border: 0;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.sheet-submit:hover {
  opacity: 0.85;
}
@media (max-width: 820px) {
  .sheet-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .sheet-aside {
    padding: 40px 32px 32px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sheet-form {
    padding: 28px 24px 40px;
  }
}
@media (max-width: 560px) {
  .sheet .frow {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
