/* ==========================================================
   Tegania Solutions — styles
   ========================================================== */

:root {
  --paper: #f3f0e9;
  --paper-2: #ebe7dd;
  --ink: #121110;
  --ink-2: #1c1a18;
  --muted: #6d685f;
  --line: rgba(18, 17, 16, 0.12);
  --accent: #ff4b2b;
  --accent-ink: #ffffff;
  --on-dark: #f3f0e9;
  --on-dark-muted: #9a958b;
  --line-dark: rgba(243, 240, 233, 0.12);

  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 1320px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; }
p { margin: 0; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -60px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 8px;
  transition: top .2s;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  position: relative;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: .98rem; letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .5s var(--ease), color .35s var(--ease), border-color .3s;
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--accent { --bg: var(--accent); --fg: var(--accent-ink); }
.btn--ink { --bg: var(--ink); --fg: var(--paper); }
.btn--ink::before { background: var(--accent); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line); }
.btn--ghost:hover { color: var(--paper); border-color: var(--ink); }
.btn--sm { padding: .7rem 1.15rem; font-size: .9rem; }
.btn--block { width: 100%; justify-content: center; }
.section--dark .btn--accent::before { background: var(--paper); }
.section--dark .btn--accent:hover { color: var(--ink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem var(--gutter);
  transition: background .4s var(--ease), backdrop-filter .4s, padding .4s var(--ease), border-color .4s, transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(243, 240, 233, 0.78);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-color: var(--line);
  padding-block: .7rem;
}
.nav.is-hidden { transform: translateY(-100%); }

.brand { display: flex; align-items: center; gap: .65rem; margin-right: auto; }
.brand__mark { width: 30px; height: 30px; fill: var(--ink); transition: transform .6s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.05); }
.brand__dot { fill: var(--accent); }
.brand__name { font-weight: 700; font-size: 1.12rem; letter-spacing: -0.03em; line-height: 1; display: flex; flex-direction: column; }
.brand__sub { font-family: var(--mono); font-weight: 400; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.nav__links { display: flex; gap: .3rem; }
.nav__links a {
  position: relative; padding: .45rem .8rem; border-radius: 999px; font-size: .93rem; font-weight: 500;
  transition: background .25s;
}
.nav__links a:hover { background: rgba(18,17,16,.06); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); transform: translateX(-50%);
}

.nav__toggle {
  display: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.nav__toggle span { width: 18px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--paper);
  display: flex; align-items: flex-end;
  padding: 6rem var(--gutter) 3rem;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; gap: .3rem; width: 100%; }
.mobile-menu a {
  font-size: clamp(2.2rem, 10vw, 3.5rem); font-weight: 600; letter-spacing: -0.04em;
  border-bottom: 1px solid var(--line); padding: .5rem 0;
  opacity: 0; transform: translateY(20px);
  animation: menuIn .6s var(--ease) forwards;
}
.mobile-menu a:nth-child(2) { animation-delay: .05s; }
.mobile-menu a:nth-child(3) { animation-delay: .1s; }
.mobile-menu a:nth-child(4) { animation-delay: .15s; }
.mobile-menu a:nth-child(5) { animation-delay: .2s; }
.mobile-menu a.accent { color: var(--accent); border: 0; }
@keyframes menuIn { to { opacity: 1; transform: none; } }

/* ---------- Layout ---------- */
.section { padding: clamp(5rem, 11vw, 9rem) var(--gutter); max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; }
.section--dark {
  max-width: none;
  background: var(--ink); color: var(--on-dark);
  --line: var(--line-dark);
  --muted: var(--on-dark-muted);
}
.section--dark > * { max-width: var(--max); margin-inline: auto; }

.section__head { display: grid; gap: 1.4rem; margin-bottom: clamp(3rem, 7vw, 5rem); max-width: 980px; }
.section__head h2, .studio h2, .contact__title {
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
}
.section__head h2 em, .studio h2 em, .contact__title em { color: var(--accent); }

.label, .eyebrow {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem .85rem .45rem .7rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); background: rgba(255,255,255,.4);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: 8rem var(--gutter) 4rem;
  max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
}
.hero__copy { display: grid; gap: 1.8rem; justify-items: start; }
.hero__title { font-size: clamp(2.7rem, 6vw, 5.6rem); font-weight: 600; letter-spacing: -0.05em; line-height: .95; }
.hero__title .line { display: block; white-space: nowrap; }
.hero__title em { color: var(--accent); font-size: 1.08em; padding-right: .04em; }
.hero__title .muted { color: transparent; -webkit-text-stroke: 1.2px var(--ink); }
.hero__lede { max-width: 520px; font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Design ↔ Code split */
.split {
  --pos: 50%;
  position: relative; margin: 0;
  aspect-ratio: 5 / 4.4;
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 40px 80px -30px rgba(18,17,16,.35), 0 0 0 1px var(--line);
  user-select: none; touch-action: pan-y;
  cursor: ew-resize;
}
.split__layer { position: absolute; inset: 0; }
.split__code {
  background: #151413; color: #d8d3c8;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  padding: clamp(3rem, 5vw, 3.6rem) clamp(1.2rem, 3vw, 2rem) 1.2rem;
  overflow: hidden;
}
.split__code pre { margin: 0; font-family: var(--mono); font-size: clamp(.62rem, .9vw, .8rem); line-height: 1.7; white-space: pre; }
.split__code .c { color: #6f6a60; }
.split__code .t { color: #ff7a5f; }
.split__code .a { color: #9cc4ff; }
.split__code .s { color: #c8e68a; }
.split__code .k { color: #f3c969; }

.split__design { display: grid; place-items: center; padding: clamp(1rem, 3vw, 2rem); background:
  radial-gradient(120% 80% at 100% 0%, #ffd9cf 0%, transparent 55%),
  radial-gradient(90% 70% at 0% 100%, #dfe7ff 0%, transparent 60%),
  var(--paper-2);
}
.split__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: var(--accent); pointer-events: none;
}
.split__knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(255,75,43,.7);
  transition: transform .3s var(--ease);
}
.split:hover .split__knob { transform: translate(-50%, -50%) scale(1.08); }
.split__knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.split__tag {
  position: absolute; top: 1rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .7rem; border-radius: 999px; pointer-events: none;
}
.split__tag--l { left: 1rem; background: rgba(255,255,255,.08); color: #d8d3c8; border: 1px solid rgba(255,255,255,.12); }
.split__tag--r { right: 1rem; background: rgba(255,255,255,.7); color: var(--ink); border: 1px solid var(--line); }
.split__range {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize;
}
.split:has(.split__range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Mock website inside split */
.mock {
  width: 100%; max-width: 520px; background: #fffdf8; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 50px -20px rgba(18,17,16,.35), 0 0 0 1px rgba(18,17,16,.06);
  font-size: clamp(.55rem, .85vw, .78rem);
}
.mock__bar { display: flex; align-items: center; gap: 5px; padding: .7em 1em; background: #f1ede4; border-bottom: 1px solid rgba(18,17,16,.06); }
.mock__bar i { width: 8px; height: 8px; border-radius: 50%; background: #d9d3c6; }
.mock__bar span { margin-left: auto; margin-right: auto; font-family: var(--mono); font-size: .9em; color: #9a958b; background: #fff; padding: .2em 1.2em; border-radius: 6px; }
.mock__body { padding: 1.4em 1.8em 1.8em; display: grid; gap: 1.6em; }
.mock__nav { display: flex; gap: 1.4em; align-items: center; color: #6d685f; }
.mock__nav b { color: var(--ink); margin-right: auto; font-size: 1.1em; }
.mock__pill { background: var(--ink); color: #fff; padding: .3em .9em; border-radius: 99px; }
.mock__hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4em; align-items: center; }
.mock__hero small { font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-size: .85em; }
.mock__hero h3 { font-size: 2.6em; letter-spacing: -0.04em; margin: .25em 0 .5em; line-height: .98; }
.mock__hero h3 em { color: var(--accent); }
.mock__btn { display: inline-block; background: var(--ink); color: #fff; padding: .6em 1.2em; border-radius: 99px; font-weight: 600; }
.mock__art { position: relative; aspect-ratio: 1; border-radius: 12px; background: linear-gradient(160deg, #ffb59f, #ff4b2b); overflow: hidden; }
.mock__art span { position: absolute; border-radius: 50%; background: rgba(255,255,255,.85); }
.mock__art span:nth-child(1) { width: 46%; height: 46%; left: 14%; top: 18%; }
.mock__art span:nth-child(2) { width: 30%; height: 30%; right: 12%; bottom: 14%; background: #121110; }
.mock__art span:nth-child(3) { width: 14%; height: 14%; right: 22%; top: 16%; background: #ffe4dc; }
.mock__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8em; }
.mock__row span { height: 3.4em; border-radius: 8px; background: #f1ede4; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  padding: 1.4rem 0; background: var(--paper);
}
.marquee__track {
  display: flex; gap: 2.2rem; width: max-content; align-items: center;
  animation: marquee 38s linear infinite;
  font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; white-space: nowrap;
}
.marquee__track span:nth-of-type(even) { font-family: var(--serif); font-style: italic; font-weight: 400; }
.marquee__track i { font-style: normal; color: var(--accent); font-size: .7em; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Services ---------- */
.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: s; }
.service { border-bottom: 1px solid var(--line); position: relative; }
.service::before {
  content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: bottom;
  transition: transform .6s var(--ease); z-index: -1;
}
.service__row {
  width: 100%; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 4rem 1fr auto 3rem; align-items: center; gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.2rem) .5rem;
  transition: padding .5s var(--ease);
}
.service__num { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.service__name { font-size: clamp(1.6rem, 3.8vw, 3.2rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; transition: transform .5s var(--ease), color .3s; }
.service__tags { font-family: var(--mono); font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.service__icon { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); justify-self: end; transition: background .4s, border-color .4s, transform .5s var(--ease); }
.service__icon::before, .service__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%);
  transition: transform .5s var(--ease);
}
.service__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.service__row:hover .service__name { transform: translateX(10px); }
.service__row:hover .service__icon { background: var(--accent); border-color: var(--accent); color: #fff; }
.service.is-open .service__icon { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(180deg); }
.service.is-open .service__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.service.is-open .service__name { color: var(--accent); }

.service__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.service.is-open .service__panel { grid-template-rows: 1fr; }
.service__inner {
  overflow: hidden; display: grid; grid-template-columns: 4rem 1.3fr 1fr; gap: 1.5rem;
  padding-inline: .5rem;
}
.service__inner::before { content: ""; }
.service__inner p { font-size: 1.12rem; color: var(--muted); padding-bottom: 2.4rem; max-width: 560px; }
.service__inner ul { list-style: none; margin: 0; padding: 0 0 2.4rem; display: grid; gap: .55rem; }
.service__inner li { display: flex; gap: .7rem; align-items: baseline; font-weight: 500; }
.service__inner li::before { content: "→"; color: var(--accent); }

/* ---------- Principles (dark) ---------- */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.principle {
  position: relative; padding: clamp(1.6rem, 3vw, 2.4rem); display: grid; gap: 1rem; align-content: start;
  background: var(--ink); min-height: 320px;
}
.spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255,75,43,.16), transparent 60%);
}
.spot:hover::before { opacity: 1; }
.principle__glyph { width: 52px; height: 52px; margin-bottom: auto; }
.principle__glyph svg { width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.principle h3 { font-size: 1.45rem; letter-spacing: -0.03em; margin-top: 3rem; }
.principle p { color: var(--on-dark-muted); font-size: .98rem; }

/* ---------- Process ---------- */
.process { position: relative; display: grid; grid-template-columns: 2px 1fr; gap: clamp(1.5rem, 4vw, 4rem); }
.process__rail { position: relative; background: var(--line); border-radius: 2px; }
.process__fill { position: absolute; inset: 0 0 auto 0; height: var(--progress, 0%); background: var(--accent); border-radius: 2px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); }
.step { display: grid; grid-template-columns: minmax(120px, 0.6fr) 1.4fr; gap: 1.5rem; align-items: start; }
.step__num {
  font-size: clamp(3.4rem, 8vw, 7rem); font-weight: 600; letter-spacing: -0.06em; line-height: .85;
  color: transparent; -webkit-text-stroke: 1.2px var(--muted);
  transition: color .5s, -webkit-text-stroke-color .5s;
}
.step.is-active .step__num { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.step h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: .7rem; }
.step p { color: var(--muted); max-width: 520px; font-size: 1.05rem; }
.step__time { display: inline-block; margin-top: 1rem; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; }

/* ---------- Studio ---------- */
.studio { padding-top: 0; }
.studio__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: end; padding-top: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--line); }
.studio__grid .label { margin-bottom: 1.4rem; }
.studio__text { display: grid; gap: 1.2rem; font-size: 1.15rem; color: var(--muted); }
.studio__text p:first-child { color: var(--ink); font-size: 1.3rem; line-height: 1.45; }

.commit { margin-top: clamp(3.5rem, 8vw, 6rem); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.commit__item { padding: 2rem 1.5rem 0 0; display: grid; gap: .6rem; align-content: start; }
.commit__item + .commit__item { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.commit__big { font-size: clamp(2.8rem, 5.5vw, 4.6rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.commit__big sup { font-size: .4em; color: var(--accent); vertical-align: top; margin-left: 2px; position: relative; top: .3em; }
.commit__item > span:last-child { color: var(--muted); font-size: .95rem; max-width: 220px; }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; }
.contact::after {
  content: ""; position: absolute; width: 60vw; height: 60vw; right: -20vw; top: -25vw; max-width: none;
  background: radial-gradient(circle, rgba(255,75,43,.22), transparent 60%); pointer-events: none;
}
.contact__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.contact__intro { display: grid; gap: 1.6rem; position: sticky; top: 7rem; }
.contact__intro > p:not(.label) { color: var(--on-dark-muted); font-size: 1.1rem; max-width: 440px; }
.contact__title { font-size: clamp(2.8rem, 6.4vw, 5.6rem); }
.contact__mail {
  justify-self: start; font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 500; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line-dark); padding-bottom: .3rem; display: inline-flex; gap: .5rem;
  transition: color .3s, border-color .3s;
}
.contact__mail span { transition: transform .4s var(--ease); }
.contact__mail:hover { color: var(--accent); border-color: var(--accent); }
.contact__mail:hover span { transform: translate(3px, -3px); }

.form { display: grid; gap: 1.1rem; background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: 22px; padding: clamp(1.4rem, 3vw, 2.4rem); }
.chips { border: 0; padding: 0; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips legend { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--on-dark-muted); margin-bottom: .9rem; padding: 0; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line-dark); font-size: .92rem; font-weight: 500;
  transition: background .25s, border-color .25s, color .25s;
}
.chips label:hover span { border-color: var(--on-dark-muted); }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--on-dark);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-dark);
  padding: 1.6rem 0 .7rem; border-radius: 0; resize: vertical;
  transition: border-color .3s;
  appearance: none; -webkit-appearance: none;
}
.field select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239a958b' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; }
.field select option { color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field label {
  position: absolute; left: 0; top: 1.6rem; color: var(--on-dark-muted); pointer-events: none;
  transform-origin: left top; transition: transform .35s var(--ease), color .3s;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field label.is-static {
  transform: translateY(-1.25rem) scale(.78); color: var(--on-dark-muted);
}
.field input:focus + label, .field textarea:focus + label { color: var(--accent); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff6b6b; }
.form .btn { margin-top: .8rem; }
.form__status { min-height: 1.4em; font-size: .95rem; color: var(--on-dark-muted); }
.form__status:empty { min-height: 0; }
.form__privacy { font-size: .82rem; color: var(--on-dark-muted); display: flex; gap: .5rem; align-items: baseline; }
.form__privacy::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-1px); }
.form__status.is-ok { color: #7ee2a1; }
.form__status.is-err { color: #ff8a8a; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--on-dark); padding: 0 var(--gutter) 2rem; overflow: hidden; }
.footer__word {
  font-size: clamp(5rem, 22vw, 22rem); font-weight: 700; letter-spacing: -0.07em; line-height: 1; padding-bottom: .12em;
  text-align: center; margin: 0 0 2rem;
  background: linear-gradient(180deg, #2a2724 10%, var(--ink) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none; padding-top: 2rem;
}
.footer__row { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; font-size: .9rem; color: var(--on-dark-muted); border-top: 1px solid var(--line-dark); padding-top: 1.5rem; }
.footer__row nav { display: flex; gap: 1.5rem; }
.footer__row a:hover { color: var(--accent); }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.hero__title .line.reveal { transform: translateY(60%); clip-path: inset(0 0 100% 0); transition: opacity .9s var(--ease), transform 1.1s var(--ease), clip-path 1.1s var(--ease); transition-delay: var(--d, 0s); }
.hero__title .line.reveal.is-in { transform: none; clip-path: inset(-10% -5% -20% -5%); }
.no-js .reveal { opacity: 1; transform: none; clip-path: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .principles { grid-template-columns: repeat(2, 1fr); }
  .service__tags { display: none; }
  .service__row { grid-template-columns: 3rem 1fr 3rem; }
  .service__inner { grid-template-columns: 3rem 1fr; }
  .service__inner ul { grid-column: 2; }
  .service__inner p { padding-bottom: 1rem; }
}

@media (max-width: 900px) {
  .nav__links, .nav .btn { display: none; }
  .nav__toggle { display: flex; }
  .hero { grid-template-columns: 1fr; padding-top: 7.5rem; min-height: auto; }
  .split { aspect-ratio: 5 / 4.6; }
  .studio__grid, .contact__grid { grid-template-columns: 1fr; }
  .contact__intro { position: static; }
  .commit { grid-template-columns: repeat(2, 1fr); }
  .commit__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .commit__item { padding-bottom: 2rem; }
  .step { grid-template-columns: 1fr; gap: .4rem; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .principles { grid-template-columns: 1fr; }
  .principle { min-height: 0; }
  .principle h3 { margin-top: 1.2rem; }
  .service__row { grid-template-columns: 2.2rem 1fr 2.75rem; gap: .8rem; padding-inline: 0; }
  .service__inner { grid-template-columns: 1fr; padding-inline: 0; }
  .service__inner::before { display: none; }
  .service__inner ul { grid-column: 1; }
  .service__icon { width: 38px; height: 38px; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .split__tag { top: .7rem; }
  .split__tag--l { left: .7rem; } .split__tag--r { right: .7rem; }
  .split__code pre { font-size: .58rem; }
  .commit { grid-template-columns: 1fr; }
  .commit__item + .commit__item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .commit__item { padding: 1.5rem 0; }
  .process { grid-template-columns: 2px 1fr; gap: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .hero__title .line.reveal { opacity: 1; transform: none; clip-path: none; }
  .marquee__track { animation: none; }
}

/* dark sections: keep heads left-aligned with the content grid */
.section--dark > .section__head { max-width: var(--max); }
.section--dark > .section__head h2 { max-width: 980px; }

/* hero headline: scale with phone width, never force sideways scroll */
.hero__copy { min-width: 0; }
@media (max-width: 900px) {
  .hero__title { font-size: min(11vw, 4.6rem); }
  .eyebrow { font-size: .7rem; }
}
@media (max-width: 340px) {
  .hero__title .line { white-space: normal; }
}

/* ==========================================================
   Responsive refinements — more breathing room on small screens
   ========================================================== */
:root { --gutter: clamp(1.35rem, 5.5vw, 3.5rem); }

/* Tablet */
@media (max-width: 900px) {
  .hero { padding-top: 7rem; gap: 3rem; }
  .split { aspect-ratio: 16 / 11; }
  .section__head { margin-bottom: 3rem; }

  /* Process: number beside the step, not stacked on top of it */
  .step { grid-template-columns: 4.5rem 1fr; gap: 1.25rem; }
  .step__num { font-size: 3.4rem; line-height: .9; }
  .step h3 { margin-bottom: .55rem; }
}

/* Phones */
@media (max-width: 600px) {
  .hero { padding-top: 6.25rem; padding-bottom: 3rem; gap: 2.75rem; }
  .hero__copy { gap: 1.5rem; }
  .hero__title { line-height: 1; }
  .hero__title .muted { -webkit-text-stroke-width: 1px; }
  .hero__lede { font-size: 1.02rem; line-height: 1.6; }
  .hero__cta { width: 100%; flex-direction: column; align-items: stretch; gap: .35rem; }
  .hero__cta .btn--accent { justify-content: center; }
  .hero__cta .btn--ghost {
    border: 0; background: none; align-self: center; padding: .75rem 1rem;
    text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
  }
  .hero__cta .btn--ghost::before { display: none; }
  .hero__cta .btn--ghost:hover { color: var(--accent); }
  .split { aspect-ratio: 1 / 1; border-radius: 18px; }

  .section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .section__head { gap: 1rem; margin-bottom: 2.5rem; }
  .section__head h2, .studio h2 { font-size: clamp(1.95rem, 8.2vw, 2.5rem); line-height: 1.08; letter-spacing: -0.035em; }
  .contact__title { font-size: clamp(2.4rem, 11vw, 3rem); line-height: 1.02; }

  .marquee { padding: 1.1rem 0; }
  .marquee__track { font-size: 1.35rem; gap: 1.6rem; }

  /* Services: drop the number column so names get the full width */
  .service__num { display: none; }
  .service__row { grid-template-columns: 1fr 2.75rem; padding-block: 1.35rem; }
  .service__name { font-size: clamp(1.4rem, 6.4vw, 1.75rem); }
  .service__row:hover .service__name { transform: none; }
  .service__inner p { font-size: 1rem; padding-bottom: 1.1rem; }
  .service__inner ul { padding-bottom: 1.75rem; gap: .5rem; }

  .principle { padding: 1.6rem 1.4rem 1.8rem; gap: .7rem; }
  .principle__glyph { width: 44px; height: 44px; margin-bottom: .4rem; }
  .principle h3 { margin-top: .6rem; font-size: 1.3rem; }

  .steps { gap: 2.6rem; }
  .step { grid-template-columns: 3.2rem 1fr; gap: 1rem; }
  .step__num { font-size: 2.6rem; }
  .step h3 { font-size: 1.5rem; }
  .step p { font-size: 1rem; }
  .step__time { margin-top: .8rem; }

  .studio__grid { gap: 1.75rem; padding-top: 4rem; }
  .studio__text { font-size: 1rem; gap: 1rem; }
  .studio__text p:first-child { font-size: 1.12rem; line-height: 1.55; }

  /* Commitments: 2 x 2 grid instead of a long column */
  .commit { grid-template-columns: 1fr 1fr; margin-top: 3rem; }
  .commit__item, .commit__item + .commit__item { padding: 1.4rem 1rem 1.4rem 0; border-left: 0; border-top: 0; }
  .commit__item:nth-child(even) { padding-left: 1rem; padding-right: 0; border-left: 1px solid var(--line); }
  .commit__item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .commit__big { font-size: 2.5rem; }
  .commit__item > span:last-child { font-size: .85rem; line-height: 1.45; }

  .contact__grid { gap: 2.5rem; }
  .contact__intro { gap: 1.25rem; }
  .contact__intro > p:not(.label) { font-size: 1rem; }
  .form { padding: 1.4rem 1.25rem 1.5rem; border-radius: 18px; }

  .footer__word { margin-bottom: 1.25rem; }
  .footer__row { flex-direction: column; align-items: flex-start; gap: 1rem; padding-bottom: .5rem; }
  .footer__row nav { gap: 1.4rem; }
}

/* Very small phones */
@media (max-width: 360px) {
  .hero__title { font-size: 2.35rem; }
  .commit__big { font-size: 2.1rem; }
}

/* Outlined hero line reads thin on small screens: use solid warm grey there */
@media (max-width: 900px) {
  .hero__title .muted, .hero__title .muted.reveal { color: #b3ada3; -webkit-text-stroke: 0; }
}
