/* ==========================================================================
   Abbanao — अब बनाओ
   ========================================================================== */
:root {
  --ink: #14100c;
  --ink-2: #1f1912;
  --paper: #f5ede0;
  --paper-2: #ebdfcb;
  --gold: #c9a24a;
  --gold-2: #e6c77a;
  --saffron: #e8892b;
  --vermilion: #c2412d;
  --peacock: #0f5c5c;
  --muted: #7a6a58;
  --line: rgba(20, 16, 12, .14);
  --line-light: rgba(245, 237, 224, .16);

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --dev: 'Tiro Devanagari Hindi', 'Noto Serif Devanagari', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
em { font-style: italic; }
::selection { background: var(--saffron); color: var(--ink); }

.dev { font-family: var(--dev); font-style: normal; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -.02em; }
h2 { font-size: clamp(2.3rem, 6vw, 5rem); font-variation-settings: 'opsz' 144; }
h2 em, h1 em { color: var(--saffron); font-weight: 300; }

.mono { font-family: var(--mono); }
.section-label {
  display: inline-flex; align-items: center; gap: .8em;
  font-family: var(--mono); font-size: .82rem; letter-spacing: .02em; font-weight: 500;
  color: var(--muted); margin-bottom: 1.6rem;
}
.section-label .dev { font-size: 1.25rem; letter-spacing: 0; color: var(--vermilion); }
.section-label::after { content: ''; width: 40px; height: 1px; background: currentColor; opacity: .5; }
.section-head { margin-bottom: clamp(2.5rem, 6vw, 5rem); max-width: 900px; }

/* split helpers */
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wm > span { display: inline-block; will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  padding: 1rem 1.6rem; border-radius: 999px;
  background: var(--saffron); color: var(--ink);
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--gold-2); border-radius: inherit;
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn .arr { transition: transform .4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line-light); }
.btn-ghost::before { background: var(--paper); }
.btn-ghost:hover { color: var(--ink); }
.btn-sm { padding: .7rem 1.2rem; font-size: .85rem; }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--ink); color: var(--gold);
  clip-path: inset(0 0 0 0);
}
.loader-mandala { position: absolute; width: min(56vmin, 420px); aspect-ratio: 1; opacity: .9; animation: spin 18s linear infinite; }
.loader-mandala svg { width: 100%; height: 100%; }
.loader-word { position: relative; overflow: hidden; padding: .2em .1em 0; }
.loader-word .dev { display: block; font-size: clamp(2.6rem, 9vw, 5.5rem); color: var(--gold-2); line-height: 1.3; }
.loader-count {
  position: absolute; right: var(--gutter); bottom: var(--gutter);
  font-family: var(--serif); font-size: clamp(2rem, 6vw, 4rem); font-weight: 300; color: var(--paper);
}
.loader-count span { font-variant-numeric: tabular-nums; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  .cursor {
    position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none;
    display: grid; place-items: center;
    width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
    background: var(--saffron); mix-blend-mode: difference;
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s;
  }
  .cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; background: var(--paper); }
  .cursor.is-label { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--saffron); mix-blend-mode: normal; }
  .cursor-label { font-size: .8rem; font-weight: 600; color: var(--ink); opacity: 0; transition: opacity .2s; white-space: nowrap; }
  .cursor.is-label .cursor-label { opacity: 1; }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 100;
  width: calc(100% - 2 * var(--gutter)); max-width: var(--max);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .6rem .6rem 1.1rem; border-radius: 999px;
  color: var(--paper);
  transition: background .5s var(--ease), box-shadow .5s, transform .6s var(--ease), padding .4s;
}
.nav.scrolled { background: rgba(20, 16, 12, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 0 0 1px var(--line-light); }
.nav.hidden { transform: translate(-50%, -140%); }
.logo { display: flex; align-items: center; gap: .55rem; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; letter-spacing: -.02em; }
.logo-mark { width: 30px; height: 30px; color: var(--gold); transition: transform 1s var(--ease); }
.logo:hover .logo-mark { transform: rotate(180deg); }
.dot { color: var(--saffron); }
.nav-links { display: flex; gap: 2.2rem; font-size: .92rem; }
.nav-links a { position: relative; opacity: .85; transition: opacity .3s; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--saffron); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--saffron); position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .45s var(--ease); }
.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }
.menu-open .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 90; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center; padding: 100px var(--gutter) 40px;
  clip-path: circle(0% at calc(100% - 40px) 40px); visibility: hidden;
  transition: clip-path .8s var(--ease), visibility 0s .8s;
}
.menu-open .menu { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; transition: clip-path .8s var(--ease), visibility 0s; }
.menu-bg { position: absolute; width: 120vw; max-width: 700px; aspect-ratio: 1; right: -30%; bottom: -20%; color: var(--gold); opacity: .12; animation: spin 60s linear infinite; }
.menu nav { display: flex; flex-direction: column; gap: .4rem; position: relative; }
.menu nav a { font-family: var(--serif); font-size: clamp(2.6rem, 12vw, 4rem); line-height: 1.15; display: flex; align-items: baseline; gap: .8rem; }
.menu nav a .dev { font-size: 1rem; color: var(--gold); width: 3.2rem; }
.menu-foot { position: relative; margin-top: auto; display: flex; flex-direction: column; gap: .3rem; color: var(--gold-2); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  background: radial-gradient(120% 90% at 75% 40%, #2a1d10 0%, var(--ink) 55%);
  color: var(--paper); overflow: hidden;
  display: flex; align-items: center;
}
#hero3d { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s var(--ease); }
#hero3d.ready { opacity: 1; }
.hero-fallback { display: none; }
.no-webgl .hero-fallback { display: block; position: absolute; right: 4%; top: 50%; width: min(48vw, 620px); aspect-ratio: 1; transform: translateY(-50%); color: var(--gold); opacity: .8; animation: spin 50s linear infinite; }
.hero-jaali {
  position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23e6c77a' stroke-width='1'%3E%3Cpath d='M28 0 L56 28 L28 56 L0 28Z'/%3E%3Ccircle cx='28' cy='28' r='9'/%3E%3Ccircle cx='0' cy='0' r='9'/%3E%3Ccircle cx='56' cy='0' r='9'/%3E%3Ccircle cx='0' cy='56' r='9'/%3E%3Ccircle cx='56' cy='56' r='9'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(70% 70% at 30% 60%, #000 0%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 30% 60%, #000 0%, transparent 75%);
}
.hero-content { position: relative; z-index: 2; width: 100%; max-width: var(--max); margin: 0 auto; padding: 120px var(--gutter) 90px; pointer-events: none; }
.hero-content > * { pointer-events: auto; }
.eyebrow { display: flex; align-items: center; gap: .8rem; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 1.6rem; }
.eyebrow .dev { font-size: 1.15rem; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.eyebrow i { width: 28px; height: 1px; background: currentColor; opacity: .6; }
.hero-title { font-size: clamp(3.1rem, 9.2vw, 8.6rem); font-weight: 350; line-height: .95; max-width: 11ch; font-variation-settings: 'opsz' 144; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: block; }
.hero-title em { color: var(--saffron); }
.hero-sub { max-width: 34rem; margin-top: 1.8rem; font-size: clamp(1rem, 1.3vw, 1.15rem); color: rgba(245, 237, 224, .75); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.4rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .6rem; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(245, 237, 224, .55); }
.scroll-cue i { width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent); animation: cue 2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Marquee ---------- */
.marquees { background: var(--ink); color: var(--paper); padding: 1.2rem 0 2.4rem; overflow: hidden; }
.marquee { overflow: hidden; white-space: nowrap; padding: .4rem 0; }
.marquee-track { display: inline-flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; will-change: transform; }
.marquee span { font-family: var(--serif); font-size: clamp(2rem, 5.5vw, 4.4rem); font-weight: 300; letter-spacing: -.02em; }
.marquee span.dev { color: var(--gold-2); font-size: clamp(1.8rem, 5vw, 3.8rem); }
.marquee b { color: var(--saffron); font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 400; }
.marquee-alt { background: var(--saffron); color: var(--ink); transform: rotate(-1.4deg); margin: 1rem -2vw 0; padding: .7rem 0; }
.marquee-alt span { font-family: var(--sans); font-weight: 600; font-size: clamp(1rem, 2.2vw, 1.5rem); letter-spacing: .08em; text-transform: uppercase; }
.marquee-alt b { color: var(--ink); font-size: 1rem; }

/* ---------- About ---------- */
.about { position: relative; padding: clamp(6rem, 14vw, 11rem) 0 clamp(5rem, 10vw, 8rem); overflow: hidden; }
.about-orn { position: absolute; width: min(90vw, 900px); aspect-ratio: 1; right: -25%; top: -10%; color: var(--gold); opacity: .14; pointer-events: none; }
.manifesto { position: relative; font-family: var(--serif); font-size: clamp(1.7rem, 4.1vw, 3.6rem); line-height: 1.18; letter-spacing: -.015em; font-weight: 350; max-width: 22ch; max-width: 1100px; }
.manifesto em { color: var(--vermilion); }
.manifesto .w { display: inline; }
.stats { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: clamp(4rem, 8vw, 6.5rem); border-top: 1px solid var(--line); padding-top: 2rem; }
.stat strong { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(2.8rem, 6vw, 4.8rem); line-height: 1; color: var(--ink); letter-spacing: -.03em; }
.stat > span { display: block; margin-top: .7rem; color: var(--muted); max-width: 22ch; font-size: .95rem; }

/* ---------- Services ---------- */
.services { padding: clamp(5rem, 10vw, 8rem) 0; background: var(--paper-2); position: relative; }
.services::before, .footer-border {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 14 Q7 0 14 14 Q21 0 28 14' fill='none' stroke='%23c2412d' stroke-width='1.2'/%3E%3Ccircle cx='14' cy='4' r='1.6' fill='%23c9a24a'/%3E%3C/svg%3E");
  background-repeat: repeat-x; opacity: .7;
}
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; perspective: 1000px; }
.service {
  position: relative; padding: 2rem 1.6rem 2.2rem; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); overflow: hidden;
  transform-style: preserve-3d; transition: border-color .4s, box-shadow .5s var(--ease);
  min-height: 330px; display: flex; flex-direction: column;
}
.service:hover { border-color: var(--gold); box-shadow: 0 30px 60px -30px rgba(120, 70, 20, .35); }
.service-icon { width: 64px; height: 64px; color: var(--vermilion); margin-bottom: auto; transition: transform 1.2s var(--ease); }
.service:hover .service-icon { transform: rotate(120deg) scale(1.08); }
.service h3 { font-size: 1.55rem; margin: 2.4rem 0 .7rem; }
.service p { color: var(--muted); font-size: .95rem; }
.service-num { position: absolute; right: 1.2rem; top: .6rem; font-size: 3.2rem; color: var(--gold); opacity: .35; }

/* ---------- Work ---------- */
.work { position: relative; background: var(--ink); color: var(--paper); padding: clamp(5rem, 10vw, 7rem) 0; overflow: hidden; }
.work .section-label { color: rgba(245, 237, 224, .55); }
.work .section-label .dev { color: var(--saffron); }
.work-head { position: relative; }
.work-head h2 { max-width: 14ch; }
.work-progress { position: absolute; right: var(--gutter); bottom: .8rem; width: 160px; height: 2px; background: var(--line-light); display: none; }
.work-progress i { display: block; height: 100%; background: var(--saffron); transform: scaleX(0); transform-origin: left; }
.work-track {
  display: flex; gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(2.5rem, 5vw, 3.5rem) var(--gutter) 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.work-track::-webkit-scrollbar { display: none; }
.project { flex: 0 0 min(84vw, 620px); scroll-snap-align: center; }
.project > a { display: block; }
.project-visual {
  position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius); overflow: hidden;
  background: var(--bg); color: var(--fg);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06);
  transform: translateZ(0);
}
.bar { position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: rgba(0, 0, 0, .18); backdrop-filter: blur(6px); }
.bar i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .35; }
.bar span { margin-left: 10px; font-size: .72rem; opacity: .7; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
/* Full-page screenshot viewer */
.project-visual { background: #0c0a08; }
.bar { background: #221b14; color: var(--paper); backdrop-filter: none; }
.bar span { font-family: var(--mono); }
.shot { position: absolute; inset: 34px 0 0; overflow: hidden; }
.shot img { width: 100%; height: auto; max-width: none; will-change: transform; transform: translate3d(0, 0, 0); }
.shot::after { /* soft fade at the bottom edge so the cut feels intentional */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18%;
  background: linear-gradient(transparent, rgba(12, 10, 8, .55)); pointer-events: none; transition: opacity .6s;
}
.is-scrolling .shot::after { opacity: 0; }
.shot-scroll { position: absolute; z-index: 3; right: 5px; top: 40px; bottom: 6px; width: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); opacity: 0; transition: opacity .4s; }
.shot-scroll i { display: block; width: 100%; height: 30px; border-radius: inherit; background: var(--saffron); }
.is-scrolling .shot-scroll { opacity: 1; }
.project-visual::before { /* "scroll" pill shown before hover */
  content: '↓ hover to explore'; position: absolute; z-index: 4; left: 50%; bottom: 14px; transform: translateX(-50%);
  font: 500 .72rem var(--mono); color: var(--ink); background: var(--saffron); padding: .35rem .8rem; border-radius: 999px;
  transition: opacity .4s, transform .5s var(--ease); white-space: nowrap;
}
.is-scrolling::before { opacity: 0; transform: translate(-50%, 10px); }
@media (pointer: coarse) { .project-visual::before { content: 'live preview'; } }

.project-meta { display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem .3rem 0; }
.project-meta .num { font-family: var(--serif); font-size: .9rem; color: var(--saffron); align-self: flex-start; padding-top: .35rem; }
.project-meta h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.project-meta p { color: rgba(245, 237, 224, .55); font-size: .9rem; }
.project-meta .visit { margin-left: auto; padding: .55rem 1rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-light); font-size: .82rem; white-space: nowrap; transition: background .4s, color .4s; }
.project:hover .visit { background: var(--saffron); color: var(--ink); box-shadow: none; }

.project-next .next-inner {
  position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: .9rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(140deg, var(--saffron), var(--vermilion)); color: var(--ink);
}
.next-mandala { position: absolute; width: 85%; aspect-ratio: 1; right: -25%; top: -25%; color: var(--ink); opacity: .16; animation: spin 40s linear infinite; }
.project-next h3 { position: relative; font-size: clamp(2.4rem, 5vw, 4rem); }
.project-next .dev { position: relative; font-size: 1.2rem; }
.project-next .btn { position: relative; background: var(--ink); color: var(--paper); }
.project-next .btn::before { background: var(--paper); }
.project-next a:hover .btn { color: var(--ink); }
.project-next a:hover .btn::before { transform: translateY(0); }

/* Desktop pinned horizontal mode (set by JS) */
.work.is-pinned { height: 100vh; padding: 0; display: flex; flex-direction: column; justify-content: center; }
.work.is-pinned .work-progress { display: block; }
.work.is-pinned .work-track { overflow: visible; scroll-snap-type: none; width: max-content; padding-right: 12vw; }
.work.is-pinned .project { flex-basis: min(46vw, 640px); }
.work.is-pinned .project-visual { aspect-ratio: 16 / 10.5; }
@media (min-width: 900px) and (max-height: 820px) {
  .work.is-pinned .project { flex-basis: min(40vw, 560px); }
  .work.is-pinned h2 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); }
}

/* ---------- Process ---------- */
.process { padding: clamp(6rem, 12vw, 9rem) 0; }
.process-list { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-top: 3rem; }
.process-line { position: absolute; left: 0; right: 0; top: 10px; height: 1px; background: var(--line); }
.process-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--saffron), var(--vermilion)); transform: scaleX(0); transform-origin: left; }
.step { position: relative; }
.step-dot { position: absolute; top: -3rem; left: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); transition: background .5s, border-color .5s, transform .6s var(--ease); }
.step-dot::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--line); transition: background .5s; }
.step.on .step-dot { border-color: var(--saffron); transform: scale(1.25); }
.step.on .step-dot::after { background: var(--saffron); }
.step-dev { font-size: 2.6rem; color: var(--gold); line-height: 1.3; opacity: .35; transition: opacity .6s, color .6s; }
.step.on .step-dev { opacity: 1; color: var(--vermilion); }
.step h3 { font-size: 1.7rem; margin: .4rem 0 .7rem; }
.step p { color: var(--muted); font-size: .95rem; max-width: 30ch; }

/* ---------- Contact ---------- */
.contact { position: relative; background: var(--ink); color: var(--paper); padding: clamp(6rem, 12vw, 9rem) 0; overflow: hidden; }
.contact .section-label { color: rgba(245, 237, 224, .55); }
.contact .section-label .dev { color: var(--saffron); }
.contact-orn { position: absolute; width: min(110vw, 1000px); aspect-ratio: 1; left: -30%; bottom: -45%; color: var(--gold); opacity: .09; pointer-events: none; }
.contact-grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
.contact h2 .dev { display: block; font-size: .55em; color: var(--gold-2); margin-bottom: .3em; letter-spacing: 0; }
.contact-sub { margin-top: 1.4rem; color: rgba(245, 237, 224, .65); max-width: 30rem; }
.contact-links { margin-top: 2.6rem; border-top: 1px solid var(--line-light); }
.contact-links a { display: flex; align-items: baseline; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-light); font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.8rem); transition: color .3s, padding .5s var(--ease); }
.contact-links a:hover { color: var(--saffron); padding-left: .6rem; }
.contact-links small { width: 6.5rem; flex: none; font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(245, 237, 224, .45); }

.contact-form { background: rgba(245, 237, 224, .04); border: 1px solid var(--line-light); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.4rem); display: grid; gap: 1.4rem; backdrop-filter: blur(6px); }
.field { display: grid; gap: .4rem; }
.field span, .chips legend { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(245, 237, 224, .5); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1.05rem; color: var(--paper); background: transparent; border: 0; border-bottom: 1px solid var(--line-light); padding: .6rem 0; outline: none; resize: vertical; transition: border-color .3s; }
.field input::placeholder, .field textarea::placeholder { color: rgba(245, 237, 224, .28); }
.field input:focus, .field textarea:focus { border-color: var(--saffron); }
.chips { border: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips legend { margin-bottom: .7rem; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: .5rem 1rem; border-radius: 999px; font-size: .88rem; box-shadow: inset 0 0 0 1px var(--line-light); transition: background .3s, color .3s, box-shadow .3s; }
.chips label:hover span { box-shadow: inset 0 0 0 1px var(--gold); }
.chips input:checked + span { background: var(--saffron); color: var(--ink); box-shadow: none; }
.chips input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .4rem; }

/* ---------- Footer ---------- */
.footer { position: relative; background: var(--ink); color: var(--paper); padding: 2rem 0 2rem; overflow: hidden; }
.footer .wrap { position: relative; }
.footer-border { position: relative; height: 14px; margin-bottom: 2rem; }
.footer-word { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(4rem, 20vw, 17rem); line-height: .9; letter-spacing: -.05em; text-align: center; color: var(--paper); transition: color .5s; }
.footer-word:hover { color: var(--gold-2); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; font-size: .88rem; color: rgba(245, 237, 224, .55); }
.footer-row .dev { color: var(--gold-2); }
.to-top:hover { color: var(--saffron); }

/* ---------- Tech layer ---------- */
.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; margin-right: .5em; box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: pulse 2s infinite; vertical-align: middle; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

.loader-boot { position: absolute; left: var(--gutter); bottom: var(--gutter); display: flex; flex-direction: column; gap: .2rem; font-size: .78rem; color: rgba(245, 237, 224, .55); }

.hud {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 26px;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem;
  font-size: .72rem; color: rgba(245, 237, 224, .7);
}
.hud span { padding: .35rem .7rem; border-radius: 999px; background: rgba(20, 16, 12, .55); box-shadow: inset 0 0 0 1px var(--line-light); backdrop-filter: blur(6px); white-space: nowrap; font-variant-numeric: tabular-nums; }

.service-tag, .step-code {
  display: inline-block; margin-top: 1.2rem; align-self: flex-start;
  font-family: var(--mono); font-size: .74rem; color: var(--peacock);
  background: rgba(15, 92, 92, .08); padding: .3rem .6rem; border-radius: 6px;
}
.step-code { color: var(--vermilion); background: rgba(194, 65, 45, .07); }

.work-hint { margin-top: 1rem; font-size: .8rem; color: var(--gold-2); }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-desk { display: none; } .hint-touch { display: inline; } }

.form-head { font-size: .85rem; color: var(--gold-2); margin: -.4rem 0; }

/* ---------- Craft: built in code ---------- */
.craft { position: relative; padding: clamp(6rem, 12vw, 9rem) 0; background: var(--paper); overflow: hidden; }
.craft-sub { margin-top: 1.6rem; max-width: 46rem; font-size: clamp(1rem, 1.3vw, 1.12rem); color: var(--muted); }
.craft-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1rem, 2.5vw, 2rem); align-items: stretch; }

.editor {
  display: flex; flex-direction: column; min-width: 0;
  background: #17120d; color: #e9dcc6; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(60, 30, 10, .55), 0 0 0 1px rgba(20, 16, 12, .2);
}
.editor-bar { display: flex; align-items: center; gap: 6px; padding: 0 14px; height: 40px; background: #211912; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.editor-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a2e22; }
.editor-bar i:nth-child(1) { background: #c2412d; } .editor-bar i:nth-child(2) { background: #f2b134; } .editor-bar i:nth-child(3) { background: #0f7a72; }
.editor-tab { margin-left: 12px; font-size: .78rem; padding: .3rem .8rem; background: #17120d; border-radius: 6px 6px 0 0; align-self: flex-end; color: var(--gold-2); }
.editor-lang { margin-left: auto; font-size: .7rem; color: rgba(233, 220, 198, .4); }
.editor-code {
  flex: 1; margin: 0; padding: 1.1rem 1.2rem; overflow: auto; max-height: 560px; min-height: 420px;
  font-size: clamp(.68rem, .9vw, .8rem); line-height: 1.65; tab-size: 2; white-space: pre;
  scrollbar-width: thin; scrollbar-color: #3a2e22 transparent;
}
.c-com { color: #8a7a64; font-style: italic; }
.c-str { color: #a6d189; }
.c-kw { color: #f28b6c; }
.c-num { color: #f2b134; }
.c-fn { color: #7fc8d6; }
.c-const { color: #e6c77a; }
.caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 1px; vertical-align: text-bottom; background: var(--saffron); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.editor-status { display: flex; gap: 1.2rem; padding: .5rem 1rem; font-size: .7rem; color: rgba(233, 220, 198, .55); background: #211912; border-top: 1px solid rgba(255, 255, 255, .06); }
.editor-status span:nth-child(2) { margin-left: auto; }

.rangoli-stage { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.rangoli-frame {
  position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #2a1e13, #14100c 72%);
  box-shadow: 0 40px 80px -40px rgba(60, 30, 10, .55);
}
.rangoli-frame::after { content: ''; position: absolute; inset: 10px; border-radius: calc(var(--radius) - 8px); border: 1px dashed rgba(230, 199, 122, .2); pointer-events: none; }
#rangoli { width: 100%; height: 100%; animation: spin 140s linear infinite; }
.rangoli-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; }
.rangoli-controls label { font-size: .82rem; color: var(--muted); min-width: 7.5rem; }
.rangoli-controls output { color: var(--vermilion); font-weight: 500; }
.rangoli-controls input[type=range] { flex: 1 1 140px; accent-color: var(--saffron); }
.rangoli-controls .btn { background: var(--ink); color: var(--paper); }
.rangoli-controls .btn:hover { color: var(--ink); }
.palette { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .74rem; color: var(--muted); }
.palette li { display: flex; align-items: center; gap: .4rem; }
.palette li::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(20, 16, 12, .15); }

.craft-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line); padding-top: 2rem; }
.craft-facts b { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; color: var(--vermilion); }
.craft-facts span { display: block; margin-top: .5rem; font-size: .8rem; color: var(--muted); }
.view-source { margin-top: 2.2rem; font-size: .85rem; color: var(--muted); }
kbd { display: inline-block; font-family: var(--mono); font-size: .78rem; padding: .15rem .5rem; border-radius: 6px; background: var(--paper-2); box-shadow: inset 0 -2px 0 rgba(20, 16, 12, .18), 0 0 0 1px var(--line); color: var(--ink); }

.process { background: var(--paper-2); position: relative; }
.process::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 14 Q7 0 14 14 Q21 0 28 14' fill='none' stroke='%23c2412d' stroke-width='1.2'/%3E%3Ccircle cx='14' cy='4' r='1.6' fill='%23c9a24a'/%3E%3C/svg%3E"); background-repeat: repeat-x; opacity: .7; }
.process .step-dot { background: var(--paper-2); }

/* ---------- Toran (marigold garland) ---------- */
.contact { padding-top: clamp(9rem, 16vw, 12rem); }
.toran { position: absolute; top: 0; left: 0; right: 0; height: 190px; display: flex; justify-content: space-around; padding: 0 1%; pointer-events: none; z-index: 1; }
.toran-rope { position: absolute; left: 0; right: 0; top: 0; height: 12px; background: repeating-linear-gradient(90deg, #e8892b 0 10px, #f2b134 10px 20px); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.strand { position: relative; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: sway 4.2s ease-in-out var(--d) infinite alternate; padding-top: 8px; }
.strand::before { content: ''; position: absolute; top: 0; bottom: 20px; width: 1px; background: rgba(230, 199, 122, .5); }
.marigold { position: relative; width: 30px; height: 30px; margin-top: -4px; }
.marigold ellipse { fill: #e8892b; }
.marigold ellipse.in { fill: #f2a81d; }
.marigold .core { fill: #c25a12; }
.strand.short .marigold ellipse { fill: #f2b134; }
.strand.short .marigold ellipse.in { fill: #f7c95a; }
.mango { width: 16px; height: 38px; margin-top: -2px; }
.mango path { fill: #2f7a3a; }
.mango .vein { fill: none; stroke: #5fae5c; stroke-width: 1; }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); row-gap: 4.5rem; }
  .process-line { display: none; }
}
@media (max-width: 899px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: block; }
  .nav { padding: .5rem .5rem .5rem 1rem; }
  .hero { align-items: flex-end; }
  .hero-content { padding-bottom: 96px; }
  #hero3d.ready { opacity: .75; }
  .contact-grid { grid-template-columns: 1fr; }
  .craft-grid { grid-template-columns: 1fr; }
  .rangoli-stage { order: -1; }
  .editor-code { min-height: 0; max-height: 380px; }
  .craft-facts { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
  .hud { left: var(--gutter); right: auto; bottom: 22px; justify-content: flex-start; }
  .hud .hud-x { display: none; }
  .loader-boot { display: none; }
  .toran { height: 140px; }
  .marigold { width: 22px; height: 22px; }
  .stats { grid-template-columns: 1fr; gap: 2rem; }
  .work-head h2 { max-width: none; }
}
@media (max-width: 600px) {
  .service-grid, .process-list { grid-template-columns: 1fr; }
  .service { min-height: 0; }
  .service h3 { margin-top: 1.6rem; }
  .project-meta .visit { display: none; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .scroll-cue { display: none; }
  .eyebrow { font-size: .72rem; gap: .6rem; }
  .eyebrow i { width: 16px; }
  .form-actions .btn { flex: 1 1 100%; justify-content: center; }
  .contact-links small { width: 5.5rem; }
  .footer-row { flex-direction: column; text-align: center; align-items: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .loader { display: none; }
}
