/* ─── tokens ─── */
:root {
  --bg: oklch(0.155 0.006 60);
  --bg2: oklch(0.19 0.008 60);
  --fg: oklch(0.965 0.005 80);
  --dim: oklch(0.62 0.01 70);
  --hair: oklch(1 0 0 / 0.08);
  --accent-from: oklch(0.62 0.22 285);
  --accent-to: oklch(0.68 0.22 325);

  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --display: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --body: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: normal; }
em.dot { color: color-mix(in oklch, var(--accent-from), var(--accent-to)); opacity: 0.9; }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.mono.small { font-size: 10.5px; }

/* ─── shell ─── */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  position: relative;
  z-index: 2;
}

/* ─── background layers ─── */
.bg-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bg-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(currentColor 1px, transparent 1px);
  background-size: 28px 28px;
  color: oklch(1 0 0 / 0.035);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, black, transparent 75%);
}
.bg-orb {
  position: absolute;
  top: -10vh; right: -20vw;
  width: 90vw; height: 90vw;
  max-width: 1200px; max-height: 1200px;
  background: radial-gradient(closest-side, var(--accent-from), transparent 70%),
              radial-gradient(closest-side at 70% 60%, var(--accent-to), transparent 65%);
  opacity: 0.35;
  filter: blur(80px) saturate(110%);
  animation: orbDrift 22s ease-in-out infinite alternate;
}
@keyframes orbDrift {
  0%   { transform: translate(0, 0)     scale(1);    opacity: 0.32; }
  100% { transform: translate(-6vw, 4vh) scale(1.08); opacity: 0.42; }
}
.bg-grid-lines {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, var(--hair) 1px, transparent 1px) 0 0 / 96px 100%,
    linear-gradient(to bottom, var(--hair) 1px, transparent 1px) 0 0 / 100% 96px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

/* ─── nav ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad);
  transition: backdrop-filter 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav-scrolled {
  backdrop-filter: blur(12px) saturate(140%);
  background: color-mix(in oklch, var(--bg) 65%, transparent);
  border-bottom-color: var(--hair);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.brand-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.logo-img { user-select: none; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--fg);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ─── section index ─── */
.section-index {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--dim);
  text-transform: uppercase;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-index .idx { color: var(--fg); }
.section-index .hair-h { flex: 1; height: 1px; background: var(--hair); }

/* ─── hero ─── */
.hero {
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 80px;
  display: flex; flex-direction: column;
  position: relative;
}
.hero-kicker {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim);
  margin-bottom: clamp(40px, 8vh, 90px);
}
.hero-kicker .dotsep { color: var(--hair); }

/* stacked variant */
.hero-stacked { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(40px, 6vh, 72px); }
.hero-wordmark {
  display: flex; flex-direction: column;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(80px, 17vw, 260px);
  line-height: 0.85;
  letter-spacing: -0.055em;
  color: var(--fg);
}
.hero-wordmark .line { display: block; }
.hero-wordmark .line:nth-child(2) {
  background: linear-gradient(120deg, var(--accent-from) 0%, var(--accent-to) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 28px;
}
.rule { height: 1px; background: var(--fg); opacity: 0.7; }
.hero-line {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
}
.hero-line em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.005em;
  background: linear-gradient(120deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.05em;
}

/* single-line variant */
.hero-single { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.hero-single .big {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(60px, 11vw, 180px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.hero-kicker-2 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* marquee variant */
.hero-marquee { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 56px; padding: 60px 0; }
.marquee-row { overflow: hidden; }
.marquee-track {
  display: inline-flex; gap: 60px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 140px);
  letter-spacing: -0.04em;
  line-height: 1;
}
.marquee-row.reverse .marquee-track { animation-direction: reverse; animation-duration: 55s; }
.marquee-item { display: inline-flex; align-items: center; gap: 60px; }
.marquee-item.subtle { color: var(--dim); font-size: 0.4em; letter-spacing: 0.2em; }
.hero-line.center { text-align: center; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* hero foot */
.hero-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto;
  padding-top: 60px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.hero-foot a { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.hero-foot a span:first-child {
  display: inline-block; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--fg);
  text-align: center; line-height: 20px;
  transition: transform 0.3s ease;
}
.hero-foot a:hover span:first-child { transform: translateY(4px); }

/* ─── about ─── */
.about {
  padding: clamp(80px, 12vw, 160px) 0;
  border-top: 1px solid var(--hair);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.about-head {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: pretty;
}
.about-head em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.about-body {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.55;
  color: oklch(from var(--fg) l c h / 0.82);
  display: flex; flex-direction: column; gap: 18px;
  max-width: 42ch;
}
.about-coda {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin-top: 4px !important;
}
.about-meta {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  border-top: 1px solid var(--hair);
  padding-top: 24px;
  max-width: 42ch;
}
.about-meta dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; margin: 0; }
.about-meta dl > div { display: flex; flex-direction: column; gap: 2px; }
.about-meta dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--dim);
  text-transform: uppercase;
}
.about-meta dd { font-family: var(--display); font-size: 15px; color: var(--fg); margin: 0; }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-head, .about-body, .about-meta { grid-column: 1; grid-row: auto; }
}

/* ─── products ─── */
.products {
  padding: clamp(60px, 10vw, 140px) 0;
  border-top: 1px solid var(--hair);
}
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.4vw, 36px);
}
@media (max-width: 880px) {
  .products-grid { grid-template-columns: 1fr; }
}

.product {
  background: var(--bg2);
  border: 1px solid var(--hair);
  border-radius: 6px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.product:hover {
  border-color: oklch(1 0 0 / 0.18);
  transform: translateY(-2px);
}

.product-art {
  aspect-ratio: 16 / 11;
  background: linear-gradient(160deg, color-mix(in oklch, var(--bg2) 70%, var(--bg)), var(--bg));
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hair);
}
.product-meta { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; }
.product-eyebrow { display: flex; align-items: center; gap: 12px; }
.pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--fg);
}
.product-featured .pill {
  border-color: transparent;
  background: linear-gradient(120deg, var(--accent-from), var(--accent-to));
  color: oklch(0.16 0 0);
  font-weight: 600;
}
.product-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 3.6vw, 48px);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}
.product-tag {
  font-family: var(--display);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0;
}
.product-tag em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.product-body {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.55;
  color: oklch(from var(--fg) l c h / 0.78);
  margin: 0;
  max-width: 42ch;
}
.product-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  margin-top: 10px;
  align-self: flex-start;
  padding: 4px 0;
  border-bottom: 1px solid var(--fg);
}
.product-link .arrow { transition: transform 0.3s ease; }
.product-link:hover .arrow { transform: translateX(6px); }

/* invoicetastic visual */
.iv { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.iv-paper {
  width: 78%;
  max-width: 380px;
  background: oklch(0.98 0.005 80);
  color: oklch(0.18 0.005 60);
  border-radius: 4px;
  padding: 22px 24px;
  font-family: var(--display);
  box-shadow: 0 24px 60px -20px oklch(0 0 0 / 0.5),
              0 1px 0 oklch(1 0 0 / 0.04) inset;
  transform: rotate(-3deg);
  position: relative;
  z-index: 2;
  font-size: 12px;
}
.iv-paper-back {
  position: absolute;
  width: 78%;
  max-width: 380px;
  height: 240px;
  background: linear-gradient(180deg, var(--accent-from), var(--accent-to));
  border-radius: 4px;
  transform: rotate(4deg) translate(8%, 8%);
  z-index: 1;
  filter: blur(0.5px);
  opacity: 0.7;
}
.iv-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px dashed oklch(0.18 0.005 60 / 0.16); }
.iv-row:last-of-type { border-bottom: none; }
.iv-head { border-bottom: 1px solid oklch(0.18 0.005 60); padding-bottom: 10px; margin-bottom: 6px; }
.iv-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; font-weight: 600; }
.iv-num { font-family: var(--mono); font-size: 11px; color: oklch(0.18 0.005 60 / 0.6); }
.iv-row .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.iv-row .num.big { font-size: 14px; font-weight: 600; }
.iv-tot { padding-top: 10px; border-top: 1px solid oklch(0.18 0.005 60); margin-top: 4px; font-weight: 600; }
.iv-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid oklch(0.18 0.005 60 / 0.2); }
.iv-foot .mono { color: oklch(0.18 0.005 60 / 0.6); font-size: 9.5px; }
.iv-stamp {
  width: 32px; height: 32px;
  border: 1.5px solid color-mix(in oklch, oklch(0.55 0.2 145), oklch(0.18 0.005 60));
  color: color-mix(in oklch, oklch(0.55 0.2 145), oklch(0.18 0.005 60));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transform: rotate(-12deg);
}

/* workshop visual */
.ws { position: absolute; inset: 0; overflow: hidden; }
.ws-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
}
.ws-cell { border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.ws-cell.c0 { background: oklch(1 0 0 / 0.02); }
.ws-cell.c3 { background: oklch(1 0 0 / 0.04); }
.ws-cell.c5 { background: linear-gradient(135deg, var(--accent-from), transparent 60%); opacity: 0.15; }
.ws-tape {
  position: absolute;
  top: 50%; left: -10%; right: -10%;
  transform: translateY(-50%) rotate(-6deg);
  background: linear-gradient(90deg, var(--accent-from), var(--accent-to));
  color: oklch(0.16 0 0);
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.05em;
  padding: 10px 0;
  display: flex; gap: 28px; justify-content: center;
  box-shadow: 0 20px 60px -20px oklch(0 0 0 / 0.5);
  white-space: nowrap;
}

/* ─── footer ─── */
.footer {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 140px) var(--pad) 40px;
  border-top: 1px solid var(--hair);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.footer-mark { display: flex; gap: 28px; align-items: flex-start; }
.footer-logo { height: clamp(72px, 8vw, 110px); width: auto; user-select: none; flex-shrink: 0; }
.footer-logo-text {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: 0;
  color: var(--fg);
}
.footer-logo-text span:nth-child(2) {
  background: linear-gradient(120deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-mark > div { display: flex; flex-direction: column; gap: 14px; }
.footer-tag {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 48px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}
.footer-tag em { font-family: var(--serif); font-weight: 400; font-style: italic; }
.footer-contact { display: flex; flex-direction: column; gap: 18px; }
.footer-mail {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  align-self: flex-start;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.footer-mail:hover { border-bottom-color: color-mix(in oklch, var(--accent-from), var(--accent-to)); }
.footer-socials { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-socials a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.2s ease;
}
.footer-socials a:hover { color: var(--fg); }
.footer-rule { height: 1px; background: var(--hair); margin: clamp(40px, 6vw, 80px) 0 24px; }
.footer-bot {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bot { font-size: 10px; }
}

/* ensure tweaks panel sits above bg */
:root { color-scheme: dark; }
