/* ==========================================================================
   kean.css — shared look for every page.
   Fonts, type scale, hero email field, scroll-reveal, selected-work shelf,
   "What I do" list and the contact flow are carried over from the water site
   (water-port.vercel.app). Colors are the clean white / ink palette of this site.
   Load AFTER styles.css so these tokens win.
   ========================================================================== */

/* ---------- Fonts (self-hosted, same files as the water site) ---------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --display: "Instrument Serif", "Times New Roman", serif;
  --body: "Inter Tight Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* clean white from this site */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f4;
  --fg: #1f1f1f;
  --text: #1f1f1f;
  --muted: #666666;
  --line: rgba(31, 31, 31, 0.16);
  --accent: #1f1f1f;
  --on-accent: #ffffff;
  --accent-text: #4e5d72;
  --error: #b3261e;

  --regular: 400;
  --medium: 550;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 0.2s;
  --slow: 0.6s;
  --gutter: clamp(20px, 4vw, 64px);
  --radius-small: 10px;
}

/* ---------- Base type (sizes from the water site) ---------- */
html {
  background: #fff;
  -webkit-text-size-adjust: 100%;
}
body {
  background: #fff;
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: var(--regular);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
}
h1 {
  font-size: clamp(3rem, 7.4vw, 8.5rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.hero-title,
.projects-title {
  font-size: clamp(2.6rem, 4.6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.98;
  text-shadow: none;
}
h2,
.section-title,
.final-cta-card h2 {
  font-size: clamp(2.25rem, 4.4vw, 4.5rem);
  letter-spacing: -0.015em;
  line-height: 1;
}
h3 {
  font-family: var(--body);
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: var(--medium);
  letter-spacing: -0.01em;
}
p {
  text-wrap: pretty;
}
strong {
  font-weight: var(--medium);
}
.section-title::after {
  display: none;
}
.section-text {
  font-size: var(--step-m, 17px);
}
.logo {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}
.nav-links a {
  font-size: 0.9375rem;
}
.hero-kicker,
.eyebrow,
.case-label,
.proof-kicker,
.proof-step {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}
.sr-only {
  clip-path: inset(50%);
  white-space: nowrap;
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: hidden;
}
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 4px;
}
.header {
  background: rgba(255, 255, 255, 0.86);
}
.wrap {
  width: 100%;
  padding-inline: var(--gutter);
  margin-inline: auto;
}

/* Buttons pick up the water pill look */
.btn {
  font-family: var(--body);
  font-weight: var(--medium);
  border-radius: 999px;
}

/* ---------- Hero: keep the original card, water-site fonts ---------- */
.hero {
  align-items: center;
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px 5% 48px;
}
.hero-content {
  width: 100%;
  max-width: 860px;
  padding: clamp(28px, 4vw, 52px) clamp(22px, 4vw, 56px) clamp(26px, 3.4vw, 44px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-kicker {
  margin-bottom: 1.4rem;
  padding: 0.4rem 1rem;
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  letter-spacing: 0.08em;
  text-shadow: none;
}
.hero-title {
  max-width: 13em;
  margin: 0 auto 1.1rem;
}
.hero-subtitle {
  max-width: 44ch;
  margin: 0 auto;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.5;
  text-shadow: none;
}
.hero .email-start {
  width: min(100%, 440px);
  margin: clamp(26px, 3vw, 36px) auto 0;
}
.hero .hero-trust {
  margin-top: clamp(26px, 3vw, 36px);
  margin-bottom: 0;
  justify-content: center;
}
@media (max-width: 768px) {
  .hero {
    padding: 104px 16px 40px;
  }
  .hero-content {
    border-radius: 18px;
  }
  .hero-title {
    font-size: clamp(2.3rem, 9vw, 3rem);
    line-height: 1;
    max-width: 12em;
  }
}

/* ---------- Hero email field + submit (water site, "line" style) ---------- */
.email-start {
  position: relative;
  display: flex;
  width: min(100%, 520px);
  margin: 1.4rem auto 0.4rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(31, 31, 31, 0.55);
  border-radius: 0;
  transition: border-color var(--fast) var(--ease);
}
.email-start:focus-within {
  border-bottom-color: var(--fg);
}
.email-start input,
.email-start input:hover,
.email-start input:focus-visible {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  padding: 0 4px;
  font: inherit;
  font-size: 1.125rem;
  text-align: left;
  color: var(--fg);
  background: transparent;
  border: 0;
  outline: none;
}
.email-start input::placeholder {
  color: #4a4f57;
}
.email-start button {
  display: inline-flex;
  align-items: center;
  padding: 0 4px 0 16px;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: color var(--fast) var(--ease);
}
.email-start button:hover {
  color: var(--accent-text);
}
.email-start button svg {
  transition: transform var(--fast) var(--ease);
}
.email-start button:hover svg {
  transform: translateX(3px);
}
.email-start-error {
  position: absolute;
  top: calc(100% + 8px);
  left: 4px;
  font-size: 0.9375rem;
  color: var(--error);
}

/* ---------- Scroll reveal (water site) ---------- */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  [data-reveal].in {
    opacity: 1;
    transform: none;
  }
  html:not([data-ready]) [data-reveal] {
    animation: kshow 1ms 3s forwards;
  }
}
@keyframes kshow {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes krise {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes kfade {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Shared helpers ---------- */
.mono,
.kicker {
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: 0.75rem;
}
.block {
  padding-top: clamp(72px, 10vw, 150px);
  text-align: left;
}
.block-title {
  padding-bottom: 20px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-text);
  font-weight: var(--medium);
}

/* ---------- Selected work shelf (scrolling work, water site) ---------- */
.shelf {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px) clamp(24px, 4vw, 64px);
  margin-top: clamp(32px, 5vw, 56px);
}
.shelf li:nth-child(2n) {
  transform: translateY(clamp(64px, 10vw, 160px));
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .shelf li:nth-child(2n)[data-reveal]:not(.in) {
    transform: translateY(calc(clamp(64px, 10vw, 160px) + 24px));
  }
}
.shelf-item {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
.shelf-frame {
  display: block;
  aspect-ratio: 16 / 10;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  container-type: inline-size;
}
.shelf-frame img {
  width: 100%;
  height: auto;
  transition: transform 1.2s var(--ease);
}
.shelf-name {
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.8vw, 2.75rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  transition: color var(--fast) var(--ease);
}
.shelf-kind {
  font-size: 1rem;
  color: var(--muted);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .shelf-item:hover .shelf-frame img {
    transition: transform 7s linear;
    transform: translateY(calc(62.5cqw - 100%));
  }
}
.shelf-item:hover .shelf-name {
  color: var(--accent-text);
}
.shelf-all {
  display: inline-block;
  margin-top: calc(clamp(64px, 10vw, 160px) + 40px);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 5px;
}
.shelf-all:hover {
  color: var(--accent-text);
}
@media (max-width: 719px) {
  .shelf {
    grid-template-columns: 1fr;
  }
  .shelf li:nth-child(2n),
  .shelf li:nth-child(2n)[data-reveal]:not(.in) {
    transform: none;
  }
  .shelf-all {
    margin-top: 40px;
  }
}

/* ---------- What I do (water site) ---------- */
.svc {
  position: relative;
}
.svc ol {
  list-style: none;
  border-top: 1px solid var(--fg);
}
.svc li {
  border-bottom: 1px solid var(--line);
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.svc-row {
  display: grid;
  grid-template-columns: 56px 1.2fr 1fr 32px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 22px 12px;
  text-align: left;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: padding var(--fast) var(--ease), color var(--fast) var(--ease);
}
.svc-num {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.svc-name {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.4vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}
.svc-line {
  font-size: 1rem;
  color: var(--muted);
}
.svc-go {
  align-self: center;
  color: var(--muted);
  opacity: 0;
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.svc-preview {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 300px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 24px 60px rgba(31, 31, 31, 0.22);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.svc-preview.on {
  opacity: 1;
}
.svc-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.svc-preview img.on {
  opacity: 1;
}
@media (hover: hover) {
  .svc li:hover {
    background: var(--accent);
    color: var(--on-accent);
  }
  .svc li:hover .svc-num,
  .svc li:hover .svc-line,
  .svc li:hover .svc-go,
  .svc li:hover .svc-name {
    color: var(--on-accent);
  }
  .svc li:hover .svc-go {
    opacity: 1;
    transform: translateX(4px);
  }
  .svc-row:hover {
    padding-left: 24px;
  }
}
@media (hover: none) {
  .svc-preview {
    display: none;
  }
  .svc-go {
    opacity: 1;
  }
}
@media (max-width: 899px) {
  .svc-row {
    grid-template-columns: 40px 1fr 24px;
    padding-inline: 4px;
  }
  .svc-line {
    display: none;
  }
}

/* ---------- Testimonials ribbon (water site) ---------- */
.ribbon {
  margin-top: clamp(32px, 5vw, 56px);
  padding-block: 32px;
  border-top: 1px solid var(--fg);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6% 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6% 94%, transparent);
}
.ribbon-track {
  display: flex;
  gap: clamp(48px, 7vw, 120px);
  width: max-content;
  padding-left: var(--gutter);
  animation: kribbon 70s linear infinite;
}
.ribbon:hover .ribbon-track {
  animation-play-state: paused;
}
.ribbon-item {
  display: grid;
  align-content: space-between;
  gap: 22px;
  width: min(78vw, 560px);
  margin: 0;
}
.ribbon-item blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  letter-spacing: -0.01em;
  line-height: 1.08;
}
.ribbon-item figcaption {
  color: var(--muted);
}
@keyframes kribbon {
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon-track {
    width: auto;
    flex-wrap: wrap;
    row-gap: 40px;
    padding-inline: var(--gutter);
    animation: none;
  }
  .ribbon-item[aria-hidden] {
    display: none;
  }
}

/* ---------- Footer (water site "pf") ---------- */
footer.pf {
  margin-top: clamp(88px, 11vw, 160px);
  padding: 0;
  text-align: left;
  color: var(--fg);
  background: #fff;
  border-top: 1px solid var(--fg);
  font-size: 1rem;
}
.pf a {
  text-decoration: none;
}
.pf-hello {
  display: grid;
  grid-template-columns: 200px 1fr minmax(220px, 280px);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding-block: clamp(56px, 7vw, 100px);
}
.pf-photo {
  max-width: 200px;
}
.pf-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  transform: rotate(-2.5deg);
  box-shadow: 0 18px 40px rgba(16, 16, 20, 0.12);
  transition: transform var(--slow) var(--ease);
}
.pf-photo:hover img {
  transform: rotate(1deg) scale(1.02);
}
.pf-big {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 2.8vw, 2.75rem);
  line-height: 1.1;
}
.pf-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  font-size: 1.0625rem;
}
.pf .pf-contact a {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color var(--fast) var(--ease);
}
.pf .pf-contact a:hover {
  text-decoration-color: var(--accent-text);
}
.pf-hire {
  margin-top: 26px;
}
.pf-now {
  padding: 22px;
  border-radius: 22px;
  background: var(--surface-2);
}
.pf-time {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(3rem, 4vw, 4rem);
  line-height: 1;
}
.pf-now .mono {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.status-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1e8e4e;
}
.pf-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
}
.foot-col h2 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--muted);
}
.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.foot-col a {
  display: inline-block;
  padding: 3px 0;
  font-size: 0.96875rem;
  transition: color var(--fast) var(--ease);
}
.foot-col a:hover,
.pf-legal a:hover {
  color: var(--accent-text);
}
.pf-name {
  margin: 0;
  padding-inline: var(--gutter);
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(4rem, 16.5vw, 19rem);
  letter-spacing: -0.03em;
  line-height: 0.82;
  text-align: center;
  white-space: nowrap;
}
.pf-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 18px 28px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.pf-legal span {
  display: flex;
  gap: 20px;
}
@media (max-width: 1023px) {
  .pf-hello {
    grid-template-columns: 160px 1fr;
  }
  .pf-now {
    grid-column: 1 / -1;
  }
  .pf-links {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 719px) {
  .pf-hello {
    grid-template-columns: 1fr;
  }
  .pf-photo {
    width: 140px;
  }
}

/* Images with width/height attributes need height:auto or the attribute height wins */
.case-study-image {
  height: auto;
}

/* ---------- Contrast: the old a:link { color: inherit } rule beat button text colors ---------- */
a.nav-hire:link,
a.nav-hire:visited,
a.slab-cta-primary:link,
a.slab-cta-primary:visited {
  color: var(--on-accent);
}
a.slab-cta:not(.slab-cta-primary):link,
a.slab-cta:not(.slab-cta-primary):visited {
  color: var(--fg);
}

/* ---------- Work page: featured case studies, slabs, more-work grid ---------- */
.work-section-head {
  text-align: left;
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) max(24px, var(--gutter)) 0;
}
.work-section-head p {
  margin-top: 14px;
  color: var(--muted);
  max-width: 60ch;
}
.work-slabs {
  background: #fff;
}
.slab {
  display: grid;
  align-items: center;
  gap: clamp(36px, 7vw, 100px);
  padding: clamp(72px, 9vw, 130px) max(24px, calc((100% - 1220px) / 2));
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.slab[data-side="left"] {
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
}
.slab[data-side="right"] {
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
}
.slab[data-side="right"] .slab-inner {
  order: 2;
}
.slab[data-side="right"] .slab-shot {
  order: 1;
}
.slab-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 490px;
}
.slab-cat {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.slab-title {
  font-size: clamp(2.25rem, 4.4vw, 4.5rem);
}
.slab-copy {
  max-width: 470px;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}
.slab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.slab-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  font: inherit;
  font-weight: var(--medium);
  font-size: 1rem;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.slab-cta:hover {
  border-color: var(--fg);
}
.slab-cta-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.slab-cta-primary:hover {
  background: var(--accent-text);
  border-color: var(--accent-text);
}
.slab-shot {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  box-shadow: 0 5px 18px rgba(31, 31, 31, 0.05);
  transition: box-shadow 0.45s ease;
}
.slab-shot:hover {
  box-shadow: 0 16px 36px rgba(31, 31, 31, 0.13);
}
.slab-shot img {
  display: block;
  width: 100%;
  height: auto;
  transition: scale 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slab-shot:hover img,
.slab-shot:focus-visible img {
  scale: 1.025;
}

.work-more {
  padding: clamp(72px, 9vw, 120px) max(24px, calc((100% - 1220px) / 2)) clamp(80px, 10vw, 132px);
  text-align: left;
}
.work-more-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.work-more-sub {
  color: var(--muted);
  margin-bottom: 4px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 32px 24px;
}
.cell {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-width: 0;
}
.cell-shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.cell-shot img {
  display: block;
  width: 100%;
  height: auto;
  transition: scale 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cell:hover .cell-shot,
.cell:focus-within .cell-shot {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(31, 31, 31, 0.12);
}
.cell:hover .cell-shot img {
  scale: 1.025;
}
.cell-name {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  line-height: 1.1;
  transition: color var(--fast) var(--ease);
}
.cell-kind {
  display: block;
  font-size: 0.9375rem;
  color: var(--muted);
}
.cell:hover .cell-name {
  color: var(--accent-text);
}
@media (max-width: 900px) {
  .slab,
  .slab[data-side="right"],
  .slab[data-side="left"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }
  .slab[data-side="right"] .slab-inner,
  .slab[data-side="right"] .slab-shot {
    order: initial;
  }
  .slab-inner {
    max-width: 680px;
  }
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .work-more-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Contact flow (water site "lead" panel) ---------- */
.lead {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  justify-content: flex-end;
  background: rgba(20, 22, 28, 0.45);
  animation: kfade 0.25s var(--ease) both;
  text-align: left;
}
.lead-panel {
  --lfg: #1f1f1f;
  --lmuted: #5a5f68;
  --lline: rgba(31, 31, 31, 0.2);
  --laccent: #1f1f1f;
  --lon: #fff;
  --laccent-text: #4e5d72;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: min(660px, 100%);
  height: 100%;
  padding: 24px clamp(22px, 4vw, 52px) 36px;
  overflow: hidden auto;
  color: var(--lfg);
  background: #fff;
  font-family: var(--body);
  animation: klead-in 0.45s var(--ease) both;
  transition: background-color 3s var(--ease);
}
.lead-panel.milk {
  background: #f6f6f4;
}
@keyframes klead-in {
  0% {
    opacity: 0;
    transform: translateX(48px);
  }
}
.topo {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}
.lead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lead-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--lmuted);
}
.lead-steps li {
  display: flex;
  align-items: center;
  gap: 7px;
}
.lead-steps span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 1px solid var(--lline);
  border-radius: 50%;
}
.lead-steps li.now {
  color: var(--lfg);
}
.lead-steps li.now span {
  background: var(--lfg);
  border-color: var(--lfg);
  color: #fff;
}
.lead-steps li.done span {
  background: var(--laccent-text);
  border-color: var(--laccent-text);
  color: #fff;
}
.lead-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  background: #fff;
  border: 1px solid var(--lline);
  border-radius: 50%;
  cursor: pointer;
  color: inherit;
  transition: transform var(--fast) var(--ease);
}
.lead-panel.milk .lead-close {
  background: transparent;
}
.lead-close:hover {
  transform: rotate(90deg);
}
.lead-body {
  margin-top: auto;
  padding-top: 48px;
  animation: krise 0.42s var(--ease) both;
}
.lead-body h2 {
  max-width: 15ch;
  font-size: clamp(2.25rem, 4.4vw, 3.75rem);
}
.lead-sub {
  margin-top: 12px;
  font-size: 1.0625rem;
  color: var(--lmuted);
}
.lead-body input[type="text"],
.lead-body input[type="email"],
.lead-body input[type="tel"],
.lead-body textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 10px 14px;
  font: inherit;
  font-weight: var(--regular);
  color: var(--lfg);
  background: #fff;
  border: 1px solid var(--lline);
  border-radius: 10px;
  transition: border-color var(--fast) var(--ease);
}
.lead-body input::placeholder,
.lead-body textarea::placeholder {
  color: var(--lmuted);
}
.lead-body input:hover,
.lead-body textarea:hover {
  border-color: var(--lmuted);
}
.lead-body input:focus-visible,
.lead-body textarea:focus-visible {
  outline: 2px solid var(--laccent-text);
  outline-offset: -1px;
  border-color: var(--laccent-text);
}
.lead-body .lead-big,
.lead-body .lead-big:hover,
.lead-body .lead-big:focus-visible {
  min-height: 0;
  margin-top: 32px;
  padding: 6px 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--lfg);
  border-radius: 0;
  outline: none;
}
.lead-body .lead-big:focus-visible {
  border-bottom-color: var(--laccent-text);
}
.lead-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 26px;
}
.lead-tiles button {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  line-height: 1.3;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--lline);
  border-radius: 14px;
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.lead-tiles button:hover {
  border-color: var(--lfg);
}
.lead-tiles button:active {
  transform: scale(0.98);
}
.lead-tiles button.on {
  background: var(--laccent);
  border-color: var(--laccent);
  color: var(--lon);
}
.lead-tile-num {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}
.lead-budget {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}
.lead-budget legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: var(--medium);
}
.lead-budget div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lead-budget button {
  min-height: 44px;
  padding: 0 18px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: inherit;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--lline);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.lead-budget button:hover {
  border-color: var(--lfg);
}
.lead-budget button.on {
  background: var(--laccent);
  border-color: var(--laccent);
  color: var(--lon);
}
.req {
  margin-left: 3px;
  font-weight: var(--regular);
  color: var(--laccent-text);
}
.lead-over {
  display: block;
  margin-top: 30px;
}
.lead-over-title {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.1;
}
.lead-over textarea {
  margin-top: 10px;
}
.lead-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 26px;
}
.lead-fields label {
  display: block;
  font-size: 0.9375rem;
  font-weight: var(--medium);
}
.lead-fields .wide {
  grid-column: 1 / -1;
}
.lead-fields .trap {
  position: absolute;
  left: -9999px;
}
.lead-error {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.9375rem;
  color: var(--error);
}
.lead-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.lead-next,
.lead-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  font: inherit;
  font-weight: var(--medium);
  color: inherit;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.lead-next {
  background: var(--laccent);
  color: var(--lon);
  border: 0;
}
.lead-next:hover {
  background: var(--laccent-text);
}
.lead-next:active {
  transform: scale(0.97);
}
.lead-next:disabled {
  opacity: 0.6;
}
.lead-back {
  background: transparent;
  border: 1px solid var(--lline);
}
.lead-back:hover {
  border-color: var(--lfg);
}
.lead-done img {
  width: 96px;
  height: 96px;
  margin-bottom: 20px;
  object-fit: cover;
  border-radius: 50%;
}
.lead-done h2:focus {
  outline: none;
}
.lead-alt {
  margin-top: 18px;
}
.lead-alt a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 639px) {
  .lead-tiles,
  .lead-fields {
    grid-template-columns: 1fr;
  }
  .lead-steps li:not(.now) {
    gap: 0;
    font-size: 0;
  }
  .lead-actions {
    justify-content: stretch;
  }
  .lead-actions > * {
    flex: 1;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lead,
  .lead-panel,
  .lead-body {
    animation: none;
  }
  .shelf-frame img,
  .slab-shot img,
  .cell-shot img {
    transition: none;
  }
}

/* ---------- Header: links next to the logo; phone + "Hire me" at the far right (water site) ---------- */
.nav {
  align-items: center;
  min-height: 48px;
}
.nav-links {
  align-items: center;
  margin-right: auto;
  margin-left: clamp(24px, 4vw, 56px);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 22px);
}
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--fg);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: color var(--fast) var(--ease);
}
.header-phone:hover {
  color: var(--accent-text);
}
.nav-hire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9375rem;
  font-weight: var(--medium);
  line-height: 1;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  text-decoration: none;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.nav-hire:hover {
  background: var(--accent-text);
  color: var(--on-accent);
}
.nav-hire:active {
  transform: scale(0.97);
}
@media (max-width: 768px) {
  .header-actions {
    margin-left: auto;
    margin-right: 0.6rem;
    gap: 12px;
  }
  .header-phone span {
    display: none;
  }
  .header-phone {
    width: 40px;
    height: 40px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
  }
}

/* ---------- Anything marked hidden stays hidden, whatever its display rule ---------- */
[hidden] {
  display: none !important;
}

/* ---------- No purple visited links: match the unvisited a:link rule in styles.css ---------- */
a:visited {
  color: inherit;
}
