/* Kashaf Labs: editorial, calm, honest. Paper and ink, one lime signal. */
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-opsz-normal-5.3.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/assets/fonts/fraunces-opsz-italic-5.3.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/assets/fonts/geist-wght-5.3.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/assets/fonts/geist-mono-wght-5.3.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallbacks keep the layout still while the fonts load. */
@font-face {
  font-family: 'Fraunces Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 104%;
  ascent-override: 92%;
}
@font-face {
  font-family: 'Geist Fallback';
  src: local('Arial'), local('Helvetica');
  size-adjust: 102%;
}

:root {
  --paper: #fbfaf7;
  --surface: #ffffff;
  --stone: #efebe3;
  --sand: #c9c2b4;
  --ink: #0f1114;
  --ink-2: #33363b;
  --muted: #64635f;
  --line: rgba(15, 17, 20, 0.12);
  --line-strong: rgba(15, 17, 20, 0.22);
  --lime: #d4f25a;
  --on-lime: #0f1206;
  --link: #4d5c00;
  --night: #0f1114;
  --night-2: #191b1f;
  --serif: 'Fraunces', 'Fraunces Fallback', Georgia, serif;
  --sans: 'Geist', 'Geist Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 136px);
  --radius: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0f1114;
    --surface: #16181b;
    --stone: #191b1f;
    --sand: #3a3d42;
    --ink: #f3f1ec;
    --ink-2: #d2d0ca;
    --muted: #a3a29d;
    --line: rgba(243, 241, 236, 0.12);
    --line-strong: rgba(243, 241, 236, 0.24);
    --link: #d4f25a;
    --night: #08090b;
    --night-2: #131518;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--link);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--lime);
  color: var(--on-lime);
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius);
  z-index: 100;
}
.skip:focus {
  left: 8px;
}

/* Type */
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 380;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  line-height: 1.06;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(44px, 7vw, 96px);
  letter-spacing: -0.025em;
}
h2 {
  font-size: clamp(32px, 4.6vw, 58px);
}
h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
}
h1 em,
h2 em {
  font-style: italic;
  font-weight: 340;
}
p {
  margin: 0 0 1em;
  text-wrap: pretty;
}
.lead {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}
.label {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.measure {
  max-width: 40em;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 420 21px/1 var(--serif);
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand img {
  width: 28px;
  height: 28px;
}
.brand span {
  color: var(--muted);
}
.site-nav {
  display: flex;
  gap: 26px;
  font-size: 15px;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: 550 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover {
  border-color: var(--ink);
}
.btn.primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
}
.btn.primary:hover {
  background: #c7e84a;
}
.btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}
.btn svg {
  width: 16px;
  height: 16px;
}
a svg {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  margin-left: 2px;
}

/* Status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: 500 12.5px/1.2 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8aa61e;
  box-shadow: 0 0 0 3px color-mix(in srgb, #8aa61e 25%, transparent);
}

/* Sections */
.section {
  padding: var(--section) 0;
}
.section.tight {
  padding-top: 0;
}
.section.stone {
  background: var(--stone);
}
.section.night {
  background: var(--night);
  color: #f3f1ec;
  --ink: #f3f1ec;
  --ink-2: #d2d0ca;
  --muted: #a3a29d;
  --line: rgba(243, 241, 236, 0.14);
  --line-strong: rgba(243, 241, 236, 0.28);
  --link: #d4f25a;
}
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head .label {
  grid-column: 1 / -1;
}
.section-head h2 {
  margin: 0;
}
.section-head p {
  margin: 0;
  color: var(--ink-2);
  max-width: 32em;
}
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

/* Hero */
.hero {
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
}
.hero .pill {
  margin-bottom: 28px;
}
.hero h1 {
  max-width: 12.5em;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 34px;
}
.hero-media {
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
}

/* Figures */
.figure {
  margin: 0;
}
.figure .frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #10182b;
}
.figure img {
  width: 100%;
}
.figcap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 12px;
  font: 400 12.5px/1.45 var(--mono);
  color: var(--muted);
  letter-spacing: 0.01em;
}
.chip-overlay {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(251, 250, 247, 0.92);
  color: #0f1114;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.02em;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.chip-overlay i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #d4f25a;
  display: inline-block;
}

/* Product card (home) */
.product {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.product .body {
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.product .body h3 {
  font-size: clamp(34px, 4vw, 52px);
  margin-bottom: 14px;
}
.product .body p {
  color: var(--ink-2);
}
.product .media {
  background: #10182b;
  min-height: 320px;
}
.product .media picture,
.product .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 0;
}
.facts div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.facts dt {
  font: 500 11.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd {
  margin: 4px 0 0;
  font-size: 15px;
}

/* Principles / steps */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.step {
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
}
.step .num {
  font: 500 13px/1 var(--mono);
  color: var(--muted);
  letter-spacing: 0.06em;
}
.step h3 {
  margin: 14px 0 10px;
}
.step p {
  color: var(--ink-2);
  margin: 0;
}

/* Tabs (styles, time of day) */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.tab {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  font: 500 14px/1 var(--sans);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.tab[aria-selected='true'] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
}
.tab small {
  font: 400 12px/1 var(--mono);
  margin-left: 6px;
  opacity: 0.75;
}
.panel[hidden] {
  display: none;
}
.panel .figure {
  animation: fade 0.35s ease both;
}
@keyframes fade {
  from {
    opacity: 0.35;
  }
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.cell {
  grid-column: span 2;
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.section.night .cell {
  background: var(--night-2);
}
.cell.wide {
  grid-column: span 3;
}
.cell h3 {
  font-size: 23px;
  margin: 6px 0 0;
}
.cell p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
}
.cell .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--lime) 30%, transparent);
  color: var(--ink);
}
.section.night .cell .icon {
  background: rgba(212, 242, 90, 0.14);
  color: #d4f25a;
}
.cell .icon svg {
  width: 20px;
  height: 20px;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.plan {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.plan.featured {
  border-color: var(--ink);
}
.plan h3 {
  font-size: 22px;
  margin: 0 0 6px;
}
.plan .price {
  font: 380 40px/1.1 var(--serif);
  letter-spacing: -0.02em;
  margin: 8px 0 14px;
}
.plan .price small {
  font: 400 14px/1 var(--sans);
  color: var(--muted);
  letter-spacing: 0;
}
.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--ink-2);
}
.plan li {
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

/* FAQ */
.faq {
  max-width: 860px;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font: 400 21px/1.35 var(--serif);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font: 300 26px/1 var(--sans);
  color: var(--muted);
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: 12px 0 0;
  color: var(--ink-2);
  max-width: 44em;
}

/* Early access form */
.early {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: center;
}
.signup {
  display: grid;
  gap: 12px;
}
.signup .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.signup input[type='email'],
.signup select {
  min-height: 50px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1 var(--sans);
  padding: 0 20px;
}
.signup input[type='email'] {
  flex: 1 1 240px;
  min-width: 0;
}
.signup select {
  flex: 0 1 auto;
  padding-right: 36px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.section.night .signup input[type='email'],
.section.night .signup select {
  background: var(--night-2);
}
.signup .btn {
  min-height: 50px;
}
.signup .fine {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}
.signup .status {
  min-height: 1.4em;
  font-size: 15px;
  margin: 0;
}
.signup .status.ok {
  color: var(--link);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Breadcrumbs */
.crumbs {
  font: 400 13px/1.4 var(--mono);
  color: var(--muted);
  margin: 0 0 24px;
}
.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.crumbs li + li::before {
  content: '/';
  margin-right: 6px;
  opacity: 0.6;
}
.crumbs a {
  color: inherit;
}

/* Long-form documents and guides */
.doc {
  padding: clamp(48px, 7vw, 96px) 0 var(--section);
}
.doc .wrap {
  max-width: 820px;
}
.doc h1 {
  font-size: clamp(40px, 6vw, 68px);
}
.doc h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-top: 2em;
}
.doc h3 {
  font-size: 21px;
  margin-top: 1.6em;
}
.doc p,
.doc li {
  color: var(--ink-2);
}
.doc .meta {
  font: 400 13px/1.5 var(--mono);
  color: var(--muted);
  margin-bottom: 36px;
}
.doc table,
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  margin: 16px 0 24px;
}
.table-wrap {
  overflow-x: auto;
}
.doc th,
.doc td,
.table th,
.table td {
  text-align: left;
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc th,
.table th {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.note {
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--stone);
  border: 1px solid var(--line);
  margin: 20px 0;
}
.toc {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px;
  margin: 28px 0 8px;
  background: var(--surface);
}
.toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 10px 0 0;
  padding-left: 20px;
}
.toc li {
  margin: 4px 0;
}

/* Style guide entries */
.style-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(56px, 8vw, 104px) 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.style-entry:nth-of-type(even) .figure {
  order: 2;
}
.style-entry .figure {
  position: sticky;
  top: 96px;
}
.style-entry .swatches {
  padding: 0;
}
.style-entry h2 {
  font-size: clamp(34px, 4vw, 50px);
}
.style-entry .copy p,
.style-entry .copy li {
  color: var(--ink-2);
}
.style-entry ul {
  padding-left: 18px;
  margin: 0 0 18px;
}
.style-entry li {
  margin: 5px 0;
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}
.swatches li {
  display: grid;
  gap: 6px;
  justify-items: start;
  font: 400 11.5px/1.3 var(--mono);
  color: var(--muted);
  margin: 0;
}
.swatches .sw {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.style-index {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 14px;
}
.style-index a {
  color: var(--ink);
  text-decoration: none;
}
.style-index .frame {
  border-radius: 6px;
  overflow: hidden;
  background: #10182b;
}
.style-index span {
  display: block;
  margin-top: 8px;
  font: 400 18px/1.2 var(--serif);
}
.style-index a:hover span {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  font-size: 15px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.footer-grid h2 {
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-grid li {
  margin: 0 0 8px;
}
.footer-grid a {
  color: var(--ink-2);
  text-decoration: none;
}
.footer-grid a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 980px) {
  .product,
  .early,
  .style-entry {
    grid-template-columns: minmax(0, 1fr);
  }
  .style-entry:nth-of-type(even) .figure {
    order: 0;
  }
  .style-entry .figure {
    position: static;
  }
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bento .cell,
  .bento .cell.wide {
    grid-column: span 3;
  }
  .style-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .site-header .wrap {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 10px;
    gap: 8px 16px;
  }
  .site-nav {
    order: 3;
    width: 100%;
    gap: 20px;
    font-size: 14px;
    overflow-x: auto;
  }
  .section-head,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .bento .cell,
  .bento .cell.wide {
    grid-column: span 6;
  }
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
  .style-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .toc ol {
    columns: 1;
  }
  .chip-overlay {
    left: 10px;
    bottom: 10px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
