/* ============================================================
   nagara — studio site
   Type: Newsreader (serif) · Source Sans 3 (sans) · IBM Plex Mono
   ============================================================ */

:root {
  /* warm paper palette */
  --bg:        oklch(0.985 0.006 85);
  --paper:     oklch(0.997 0.003 85);
  --ink:       oklch(0.245 0.012 65);
  --ink-soft:  oklch(0.46 0.012 65);
  --ink-faint: oklch(0.60 0.010 65);
  --line:      oklch(0.885 0.008 80);
  --line-soft: oklch(0.93 0.006 80);

  /* one confident accent — deep teal (tweakable) */
  --accent:      oklch(0.50 0.084 195);
  --accent-ink:  oklch(0.44 0.088 195);
  --accent-soft: oklch(0.955 0.024 195);

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --serif: "Bricolage Grotesque", system-ui, sans-serif;       /* display / headline */
  --sans:  "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --em-style: normal;  /* Bricolage has no true italic; tweak flips this for Newsreader */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent-soft); color: var(--accent-ink); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* shared eyebrow / mono label */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line-soft); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.wordmark .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  align-self: center;
  display: inline-block;
}
.wordmark small {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.wordmark small.wm-by {
  color: var(--accent);
  margin-left: 0.15rem;
}
.nav__link {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: color 0.2s ease;
}
.nav__link:hover { color: var(--accent-ink); }
.nav__link .arrow { transition: transform 0.2s ease; }
.nav__link:hover .arrow { transform: translateX(3px); }

/* ---------- hero / manifesto ---------- */
.hero {
  padding-top: clamp(4rem, 11vw, 9rem);
  padding-bottom: clamp(3.5rem, 9vw, 7rem);
  border-bottom: 1px solid var(--line);
}
.hero__eyebrow { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); display: block; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: var(--em-style);
  color: var(--accent-ink);
}
.hero__sub {
  margin: clamp(1.6rem, 4vw, 2.4rem) 0 0;
  font-size: clamp(1.12rem, 2.1vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 46ch;
  font-weight: 380;
}
.hero__cta {
  margin-top: clamp(2.2rem, 5vw, 3rem);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--accent-ink);
  padding-bottom: 4px;
  border-bottom: 1.5px solid color-mix(in oklab, var(--accent) 45%, transparent);
  transition: gap 0.2s ease, border-color 0.2s ease;
}
.hero__cta:hover { gap: 1.05rem; border-bottom-color: var(--accent); }

/* ---------- section frame ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  flex-wrap: wrap;
}
.section__head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
}
.section__head p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 34ch;
  font-size: 1.02rem;
}

/* ---------- products ---------- */
.products { border-top: 1px solid var(--line); }
.product {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.4rem, 5vw, 3.6rem);
  border-bottom: 1px solid var(--line);
}
.product__body { max-width: 38ch; }
.product__index {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.9rem;
}
.product__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  letter-spacing: -0.015em;
  line-height: 1;
  margin: 0 0 0.55rem;
}
.product__pov {
  margin: 0 0 0.5rem;
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.product__desc {
  margin: 0 0 1.4rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.5;
}
.product__link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--accent-ink);
}
.product__link .u {
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.product__link .arrow { transition: transform 0.2s ease; opacity: 0.8; }
.product:hover .product__link .arrow { transform: translate(3px, -3px); }
.product:hover .product__link .u { border-bottom-color: var(--accent); }

.product__preview { justify-self: end; width: 100%; }

/* preview shell — a small "screen" */
.screen {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.6) inset,
    0 18px 40px -28px oklch(0.3 0.02 65 / 0.45);
  overflow: hidden;
  width: 100%;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease;
}
.product:hover .screen {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.6) inset,
    0 26px 52px -26px oklch(0.3 0.02 65 / 0.5);
}
.screen__bar {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
}
.screen__bar i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--line);
}
.screen__bar .ttl {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.screen__body { padding: 14px; }

/* generic preview atoms */
.row { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--ink-faint); }
.chip {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  white-space: nowrap;
}
.bar-line { height: 7px; border-radius: 4px; background: var(--line-soft); }

/* Relay — support inbox */
.inbox { display: flex; flex-direction: column; }
.inbox__item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.inbox__item:last-child { border-bottom: 0; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 600;
  color: var(--ink-soft);
  background: oklch(0.93 0.01 80);
  flex: none;
}
.inbox__txt { flex: 1; min-width: 0; }
.inbox__name { font-size: 0.78rem; font-weight: 600; color: var(--ink); }
.inbox__sub  { font-size: 0.72rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.status-dot.idle { background: var(--line); }

/* Crate — cart / checkout */
.cart__line { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.cart__thumb { width: 30px; height: 30px; border-radius: 6px; background: oklch(0.92 0.012 80); flex: none; }
.cart__name { font-size: 0.78rem; font-weight: 600; }
.cart__meta { font-size: 0.68rem; color: var(--ink-faint); }
.cart__price { margin-left: auto; font-family: var(--mono); font-size: 0.74rem; }
.cart__total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.cart__total b { font-family: var(--mono); font-size: 0.95rem; }
.btn-mini {
  margin-top: 11px;
  display: block; text-align: center;
  background: var(--accent); color: oklch(0.99 0.01 195);
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px; border-radius: 7px;
}

/* Hangar — deploy log */
.deploy__step { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 0.76rem; }
.deploy__step .tick {
  width: 15px; height: 15px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 0.6rem; font-weight: 700;
}
.deploy__step.run .tick { background: var(--line-soft); color: var(--ink-faint); }
.deploy__step .t { color: var(--ink-soft); }
.deploy__step .dur { margin-left: auto; font-family: var(--mono); font-size: 0.66rem; color: var(--ink-faint); }
.deploy__done {
  margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 0.7rem; color: var(--accent-ink);
  display: flex; justify-content: space-between;
}

/* Tree — node graph */
.graph { position: relative; height: 132px; }
.node {
  position: absolute;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--mono); font-size: 0.64rem; color: var(--ink-soft);
  box-shadow: 0 4px 12px -8px oklch(0.3 0.02 65 / 0.5);
}
.node .led { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.node.n1 { top: 8px;  left: 0; }
.node.n2 { top: 8px;  right: 0; }
.node.n3 { top: 58px; left: 50%; transform: translateX(-50%); border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.node.n4 { bottom: 6px; left: 50%; transform: translateX(-50%); }
.graph svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.graph svg path { stroke: var(--line); stroke-width: 1.5; fill: none; }

/* Atlas — ledger */
.ledger { width: 100%; border-collapse: collapse; }
.ledger td { padding: 6px 0; font-size: 0.76rem; border-bottom: 1px solid var(--line-soft); }
.ledger tr:last-child td { border-bottom: 0; }
.ledger .amt { text-align: right; font-family: var(--mono); font-size: 0.72rem; }
.ledger .pos { color: var(--accent-ink); }
.ledger__head td {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint); border-bottom-color: var(--line);
}
.ledger__bal td { font-weight: 700; border-bottom: 0; padding-top: 9px; }
.ledger__bal .amt { font-size: 0.82rem; }

/* ---------- how we work ---------- */
.work { background: var(--bg); border-top: 1px solid var(--line); }
.work__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.work__lead {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: pretty;
}
.work__lead em { font-style: var(--em-style); color: var(--accent-ink); }
.tenets { list-style: none; margin: 2rem 0 0; padding: 0; }
.tenets li {
  display: flex; gap: 0.9rem; align-items: baseline;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.tenets li:last-child { border-bottom: 1px solid var(--line); }
.tenets .k { font-family: var(--mono); font-size: 0.7rem; color: var(--accent-ink); flex: none; width: 1.5rem; }

/* by the numbers */
.numbers {
  display: flex;
  gap: clamp(2rem, 6vw, 4.5rem);
  margin-top: 0.4rem;
  flex-wrap: wrap;
}
.numbers .n { display: flex; flex-direction: column; }
.numbers .n b {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.numbers .n span {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--ink);
  padding-block: clamp(3.5rem, 8vw, 6rem) 2.5rem;
}
.footer h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}
.footer__cta {
  display: inline-flex; align-items: center; gap: 0.7rem;
  margin-top: 1.6rem;
  font-family: var(--mono); font-size: 0.92rem;
  color: var(--accent-ink);
  border-bottom: 1.5px solid color-mix(in oklab, var(--accent) 45%, transparent);
  padding-bottom: 5px;
  transition: gap 0.2s ease, border-color 0.2s ease;
}
.footer__cta--alt {
  font-size: 1.1rem;
  opacity: 0.75;
}
.footer__cta:hover { gap: 1.05rem; border-bottom-color: var(--accent); }
.footer__meta {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  margin-top: clamp(3.5rem, 8vw, 5.5rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}
.footer__meta a:hover { color: var(--accent-ink); }
.footer__links { display: flex; gap: 1.6rem; flex-wrap: wrap; }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  body { font-size: 17px; }
  .product {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .product__preview { justify-self: stretch; max-width: 420px; }
  .work__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 520px) {
  .nav__link .label-full { display: none; }
  .numbers { gap: 2.2rem; }
}
