:root {
  --alu: #E6E9EC;      /* build-plate aluminium: page background */
  --alu-2: #CDD3D9;    /* grid lines, rules */
  --paper: #F4F6F8;    /* raised surfaces */
  --ink: #15171B;      /* graphite: text, dark panels */
  --ink-2: #4A5058;    /* secondary text */
  --cobalt: #2B45F5;   /* digital work, primary actions */
  --amber: #B8710F;    /* physical work */
  --hot: #FF5A1F;      /* nozzle tip only */

  --display: "Anybody", system-ui, sans-serif;
  --body: "Onest", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --steps: 24;         /* print layers in the hero */
  --print-time: 2.6s;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--alu);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 4px; }
em { font-style: normal; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85em 1.4em;
  border: 0; border-radius: 999px;
  background: var(--cobalt); color: #fff;
  font: 600 1rem/1 var(--body);
  text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -8px var(--cobalt); }
.btn-small { padding: .65em 1.1em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); background: var(--paper); }
.btn-ghost-dark { background: transparent; color: var(--alu); box-shadow: inset 0 0 0 1.5px #4A5058; }
.btn-ghost-dark:hover { box-shadow: inset 0 0 0 1.5px var(--alu); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--alu) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 1.15rem/1 var(--display);
  font-variation-settings: "wdth" 125;
  text-decoration: none; letter-spacing: -.01em;
}
.brand svg { width: 28px; height: 28px; color: var(--ink); }
.nav nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 32px); }
.nav nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav nav a:not(.btn):hover { color: var(--cobalt); }

/* ---------- hero: the print bed ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - 64px);
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(24px, 4vh, 48px);
  padding: clamp(32px, 6vh, 72px) var(--gutter) 64px;
  background-image:
    linear-gradient(var(--alu-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--alu-2) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}
.eyebrow {
  font: 500 .75rem/1.5 var(--mono);
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-2);
}

.print { position: relative; width: fit-content; max-width: 100%; }
.print-text {
  font-family: var(--display);
  font-weight: 850;
  font-variation-settings: "wdth" 112;
  font-size: clamp(2.6rem, 11.5vw, 11.5rem);
  line-height: .92;
  letter-spacing: -.03em;
}
.print-text span { display: block; }
/* FDM layer lines, baked into the letters */
.print-text span, .print-text em, .result em {
  background: repeating-linear-gradient(180deg, var(--ink) 0 .042em, #3a3f47 .042em .052em);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.print-text em.digital, .result em.digital { background-image: repeating-linear-gradient(180deg, var(--cobalt) 0 .042em, #5b70ff .042em .052em); }
.print-text em.physical, .result em.physical { background-image: repeating-linear-gradient(180deg, var(--amber) 0 .042em, #d38d2d .042em .052em); }

.nozzle { display: none; }

.js .print-text { animation: print var(--print-time) steps(var(--steps), jump-none) .3s both; }
.js .nozzle {
  display: block;
  position: absolute; left: -2%; right: -2%; height: 2px;
  background: var(--cobalt);
  box-shadow: 0 0 12px var(--cobalt);
  animation:
    nozzle-rise var(--print-time) steps(var(--steps), jump-none) .3s both,
    fade-out .4s ease calc(var(--print-time) + .3s) forwards;
}
.nozzle i {
  position: absolute; bottom: 0; left: 0;
  width: 22px; height: 26px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 64% 62%, 50% 100%, 36% 62%, 0 62%);
  animation: sweep .28s linear infinite alternate;
}
.nozzle i::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--hot); box-shadow: 0 0 10px 2px var(--hot);
}
@keyframes print { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes nozzle-rise { from { top: 100%; } to { top: 0; } }
@keyframes sweep { from { left: 0; } to { left: calc(100% - 22px); } }
@keyframes fade-out { to { opacity: 0; } }

.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px; align-items: end;
}
.gcode {
  margin: 0; min-height: 6.4em;
  font: 400 .72rem/1.6 var(--mono);
  color: var(--ink-2);
  white-space: pre; overflow: hidden;
}
.gcode b { color: var(--cobalt); font-weight: 500; }
.hero-pitch { display: grid; gap: 24px; max-width: 36rem; justify-self: end; }
.hero-pitch p { font-size: clamp(1.05rem, 1.4vw, 1.2rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.js .hero-foot { animation: rise .7s ease calc(var(--print-time) + .1s) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.ruler {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 16px;
  display: flex; justify-content: space-between;
  padding-top: 12px;
  font: 400 .65rem/1 var(--mono); color: var(--ink-2);
  background:
    repeating-linear-gradient(90deg, var(--ink-2) 0 1px, transparent 1px 20%) top left / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, var(--alu-2) 0 1px, transparent 1px 2%) top left / 100% 6px no-repeat;
}

/* ---------- shared sections ---------- */
.services, .work, .process { padding: clamp(72px, 12vh, 140px) var(--gutter); }
.section-title {
  font: 800 clamp(2.2rem, 6vw, 5rem)/1 var(--display);
  font-variation-settings: "wdth" 112;
  letter-spacing: -.03em;
  margin-bottom: clamp(32px, 6vh, 64px);
}

/* ---------- services ---------- */
.groups { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.group-label {
  display: flex; align-items: center; gap: 10px;
  font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  padding-bottom: 16px;
}
.group-label::before { content: ""; width: 12px; height: 12px; background: var(--accent); }
.group-digital { --accent: var(--cobalt); }
.group-physical { --accent: var(--amber); }

.row {
  position: relative;
  display: grid; gap: 6px;
  padding: 22px 0 22px 0;
  border-top: 1.5px solid var(--ink);
  transition: padding-left .3s ease;
}
.row:last-child { border-bottom: 1.5px solid var(--ink); }
.row::before {
  content: ""; position: absolute; left: 0; top: -1.5px; bottom: 0; width: 0;
  background: var(--accent); transition: width .3s ease;
}
.row:hover { padding-left: 20px; }
.row:hover::before { width: 6px; }
.row h3 {
  font: 700 clamp(1.35rem, 2.2vw, 1.75rem)/1.15 var(--display);
  font-variation-settings: "wdth" 105;
}
.row p { color: var(--ink-2); max-width: 44ch; }
.row small { font: 400 .7rem/1.6 var(--mono); color: var(--ink-2); }

/* ---------- name: kalpanā + forge ---------- */
.name {
  display: grid; justify-items: center; text-align: center;
  padding: clamp(72px, 12vh, 140px) var(--gutter);
  border-top: 1.5px solid var(--ink);
}
.name .eyebrow { margin-bottom: clamp(32px, 6vh, 56px); }
.equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px clamp(20px, 5vw, 72px); }
.term { display: grid; justify-items: center; gap: 10px; }
.term-top { font: 600 clamp(1.2rem, 2.2vw, 1.6rem)/1.2 "Anek Devanagari", var(--body); color: var(--ink-2); }
.term-ipa { font: 400 clamp(.9rem, 1.6vw, 1.15rem)/1.6 var(--mono); }
.term-word {
  font: 800 clamp(2.6rem, 7.5vw, 6.5rem)/1 var(--display);
  font-variation-settings: "wdth" 112;
  letter-spacing: -.03em;
}
.term-idea .term-word { color: var(--cobalt); }
.term-make .term-word { color: var(--amber); }
.term-word s { position: relative; text-decoration: none; opacity: .3; }
.term-word s::after {
  content: ""; position: absolute; left: -4%; right: -4%; top: 55%; height: .07em;
  background: var(--ink); transform-origin: left;
}
.term-gloss { font: 400 .72rem/1.6 var(--mono); color: var(--ink-2); max-width: 26ch; }
.op { font: 800 clamp(2rem, 5vw, 4rem)/1 var(--display); color: var(--ink-2); }
.result {
  margin-top: clamp(40px, 7vh, 72px);
  font: 900 clamp(2.4rem, 10.5vw, 10rem)/.95 var(--display);
  font-variation-settings: "wdth" 115;
  letter-spacing: -.04em;
}
.meaning { margin-top: 20px; font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 500; }
.say { margin-top: 10px; font: 400 .72rem/1.6 var(--mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }

/* The sequence: imagination arrives, forge arrives, "nā" is struck out, the name prints. */
.js .name:not(.play) :is(.term, .op, .result, .meaning, .say) { opacity: 0; }
.name.play .term-idea { animation: from-left .8s cubic-bezier(.2, .7, .2, 1) both; }
.name.play .op { animation: pop .5s ease .5s both; }
.name.play .term-make { animation: from-right .8s cubic-bezier(.2, .7, .2, 1) .7s both; }
.name.play .term-word s { animation: fade-na .5s ease 1.6s both; }
.name.play .term-word s::after { animation: strike .4s ease 1.6s both; }
.name.play .result { animation: print 1.6s steps(20, jump-none) 2.2s both; }
.name.play :is(.meaning, .say) { animation: rise .7s ease 3.8s both; }
@keyframes from-left { from { opacity: 0; transform: translateX(-60px); } }
@keyframes from-right { from { opacity: 0; transform: translateX(60px); } }
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(-90deg); } }
@keyframes fade-na { from { opacity: 1; } }
@keyframes strike { from { transform: scaleX(0); } }

/* ---------- recent work ---------- */
.work { border-top: 1.5px solid var(--ink); }
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px); }
.project { display: grid; align-content: start; gap: 10px; }
.project h3 { margin-top: 14px; font: 700 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--display); font-variation-settings: "wdth" 105; }
.project p { color: var(--ink-2); max-width: 52ch; }
.project small { font: 400 .7rem/1.6 var(--mono); color: var(--ink-2); }
.visit { justify-self: start; margin-top: 6px; font-weight: 600; color: var(--cobalt); text-decoration: none; }
.visit:hover { text-decoration: underline; }

.shot {
  display: block; overflow: hidden;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 0 1px 0 var(--ink), 0 24px 48px -28px rgba(21, 23, 27, .55);
  transition: transform .4s ease;
}
.shot:hover { transform: translateY(-4px); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #4A5058; }
.shot-bar span { margin-left: 10px; font: 400 .7rem/1 var(--mono); color: #A9B0B8; }
.shot-view { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper); }
.shot-view img {
  display: block; width: 100%; height: auto;
  transition: transform 4s cubic-bezier(.45, 0, .55, 1);
}
/* hover scrolls the preview down the page; 800x1500 images in a 16:10 frame */
.shot:hover img, .shot:focus-visible img { transform: translateY(-66.67%); }

/* ---------- process ---------- */
.process { border-top: 1.5px solid var(--ink); }
.layers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.layer {
  display: grid; align-content: start; gap: 10px;
  padding: 24px 20px 28px;
  background: var(--paper);
  border-bottom: 6px solid var(--ink);
}
/* each step stands one layer taller than the last */
.layer:nth-child(1) { margin-top: 96px; }
.layer:nth-child(2) { margin-top: 64px; }
.layer:nth-child(3) { margin-top: 32px; }
.layer-no { font: 500 .7rem/1 var(--mono); color: var(--cobalt); text-transform: uppercase; letter-spacing: .05em; }
.layer h3 { font: 700 1.35rem/1.15 var(--display); font-variation-settings: "wdth" 105; }
.layer p { color: var(--ink-2); font-size: 1rem; }

/* ---------- start / inquiry ---------- */
.start {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(72px, 12vh, 140px) var(--gutter);
  background: var(--ink); color: var(--alu);
}
.start-intro p { color: #A9B0B8; font-size: 1.15rem; max-width: 30ch; }

.inquiry { display: grid; gap: 28px; min-width: 0; }
.progress { display: grid; gap: 10px; }
.progress-label { font: 400 .72rem/1 var(--mono); color: #A9B0B8; text-transform: uppercase; letter-spacing: .05em; }
.progress-label b { color: var(--alu); font-weight: 500; }
.progress-bar { height: 12px; background: #262A31; overflow: hidden; }
.progress-bar i {
  display: block; height: 100%; width: 25%;
  background: repeating-linear-gradient(90deg, var(--amber) 0 5px, #d38d2d 5px 7px);
  transition: width .5s steps(6, end);
}

.step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 18px; }
.step legend {
  padding: 0; margin-bottom: 18px;
  font: 700 clamp(1.5rem, 3vw, 2.2rem)/1.1 var(--display);
  font-variation-settings: "wdth" 108;
}
.step legend:focus { outline: none; }
.hint { color: #A9B0B8; margin-top: -8px; }
.js .step:not([hidden]) { animation: rise .35s ease both; }

.chips, .budgets, .currency { display: flex; flex-wrap: wrap; gap: 10px; }
.chip, .budget, .currency label { position: relative; cursor: pointer; }
.chip input, .budget input, .currency input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span, .budget span, .currency span {
  display: inline-block;
  padding: .7em 1.1em;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px #4A5058;
  font-weight: 500;
  transition: background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.chip:hover span, .budget:hover span, .currency label:hover span { box-shadow: inset 0 0 0 1.5px var(--alu); }
.chip input:checked + span, .budget input:checked + span, .currency input:checked + span {
  background: var(--cobalt); color: #fff; box-shadow: none;
}
.chip-physical input:checked + span { background: var(--amber); }
.chip input:focus-visible + span, .budget input:focus-visible + span, .currency input:focus-visible + span {
  outline: 3px solid var(--alu); outline-offset: 3px;
}
.currency { margin-bottom: 4px; }
.currency span { font-family: var(--mono); font-size: .8rem; }
.budgets[data-currency="INR"] .usd, .budgets[data-currency="USD"] .inr { display: none; }

.field { display: grid; gap: 8px; }
.field > span { font-weight: 500; font-size: .95rem; }
.field em { color: #A9B0B8; font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: .8em .9em;
  border: 1.5px solid #4A5058; border-radius: 10px;
  background: #1D2026; color: var(--alu);
  font: 400 1rem/1.4 var(--body);
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #767E88; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 40%, transparent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-wide { grid-column: 1 / -1; }

.step-error:empty, .form-status:empty { display: none; }
.step-error, .form-status { color: #FF9C7A; font-size: .95rem; }
.form-nav { display: flex; gap: 12px; }
.form-nav [data-next], .form-nav [data-send] { margin-left: auto; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

.sent { display: grid; gap: 14px; align-content: start; }
.sent:focus { outline: none; }
.sent .eyebrow { color: var(--amber); }
.sent h3 { font: 800 clamp(2rem, 4vw, 3rem)/1 var(--display); font-variation-settings: "wdth" 112; }
.sent p { color: #A9B0B8; font-size: 1.1rem; }
.sent b { color: var(--alu); font-weight: 500; }

/* ---------- footer ---------- */
.footer { padding: 48px var(--gutter) 32px; display: grid; gap: 24px; }
.footer-mark {
  font: 900 clamp(2rem, 10.5vw, 11rem)/.85 var(--display);
  font-variation-settings: "wdth" 120;
  letter-spacing: -.04em;
  background: repeating-linear-gradient(180deg, var(--ink) 0 .042em, #3a3f47 .042em .052em);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-meta { display: flex; flex-wrap: wrap; gap: 12px 32px; font: 400 .75rem/1.6 var(--mono); color: var(--ink-2); }
.footer-meta a:hover { color: var(--cobalt); }

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-foot, .groups, .start, .projects { grid-template-columns: minmax(0, 1fr); }
  .hero-pitch { justify-self: start; }
  .gcode { order: 2; min-height: 0; }
  .layers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layer:nth-child(n) { margin-top: 0; }
}
@media (max-width: 600px) {
  .nav nav a:not(.btn) { display: none; }
  .layers, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .gcode { display: none; }
  .equation { flex-direction: column; gap: 12px; }
  .form-nav .btn { flex: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .nozzle { display: none; }
}
