:root {
  --bg: #f2f1eb;
  --ink: #17160f;
  --ink-soft: #4a4838;
  --line: #c9c6b8;
  --accent: #ff3388;
  --accent-rgb: 255, 51, 136;
  --paper: #ffffff;
  --font-heading: 'Nata Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
.brand,
h1.headline,
h2.section-title,
.work-name,
.practice-name,
.contact h2,
.about-text {
  font-family: var(--font-heading);
}
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
/* Top bar */
header.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  color: var(--ink);
}
.brand {
  display: flex;
  align-items: center;
  height: 20px;
}
.brand img.brand-logo-img {
  height: 20px;
  width: auto;
  display: block;
  filter: brightness(0);
  transition: all 0.3s;
}
.brand:hover img.brand-logo-img {
  filter: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink-soft);
  padding: 3px 6px;
  margin-bottom: -3px;
  background-color: var(--bg);
}
.lang-sep {
  color: var(--ink-soft);
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 1px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  transition: color 0.25s ease;
}
.lang-btn:hover {
  color: var(--accent);
}
.lang-btn.active {
  color: var(--ink);
  font-weight: 700;
}
.lang-btn.active:hover {
  color: var(--accent);
}
.menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  text-transform: lowercase;
  transition: color 0.25s ease;
}
.menu-btn:hover {
  color: var(--accent);
}
.menu-btn .hamburger {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 0;
  margin-top: 3px;
  transition: background 0.25s ease;
}
.menu-btn:hover .hamburger {
  background: var(--accent);
}
@media (max-width: 640px) {
  .nav-right {
    gap: 14px;
  }
}
/* Hero */
.hero {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 120px;
  padding-bottom: 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
#flowCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#heroParallax {
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--ink-soft);
}
h1.headline {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 1180px;
  color: var(--ink);
}
h1.headline em {
  font-style: normal;
  color: var(--ink-soft);
}
.headline-break {
  display: none;
}
@media (min-width: 641px) {
  .headline-break {
    display: unset;
  }
}
.hero-sub {
  margin-top: 34px;
  max-width: 900px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.hero-meta {
  margin-top: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.hero-meta .meta-rule {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--ink-soft);
}
.cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  color: var(--ink);
  border-radius: 999px;
  font-size: 14px;
  width: fit-content;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.cta-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
section {
  padding: 120px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-bottom: 64px;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin: 20px 0;
}
.section-count {
  padding-left: 40px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
h2.section-title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 16ch;
  line-height: 1.08;
}
h2.section-title .soft {
  color: var(--ink-soft);
}
.section-desc {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 18px;
}
/* Work list */
.work-item {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-left: none;
  border-right: none;
  border-bottom: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: inherit;
  margin: 0;
  color: inherit;
  cursor: pointer;
  transition: padding-left 0.3s ease;
}
.work-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.work-item:last-child {
  border-bottom: 1px solid var(--line);
}
.work-item:hover {
  padding-left: 14px;
}
.work-idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.work-name {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 500;
}
.work-desc {
  font-size: 13px;
  color: var(--ink-soft);
  grid-column: 2;
  margin-top: 6px;
}
.work-tags {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: right;
  white-space: nowrap;
}
.work-arrow {
  font-size: 18px;
  color: var(--ink-soft);
  transition: transform 0.25s ease, color 0.25s ease;
}
.work-item:hover .work-arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}
/* Timeline (Who We Are) */
.timeline {
  padding-top: 10px;
}
.timeline-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}
.timeline-label-top {
  margin-bottom: 28px;
}
.timeline-label-bottom {
  margin-top: 28px;
}
.timeline-track {
  position: relative;
}
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
}
.timeline-items {
  position: relative;
}
/* Each item is a 2-row grid: row 1 holds the dot + year (centered
     together on the same track so they always line up exactly, no
     matter the font's line-height), row 2 holds the title + description. */
.timeline-item {
  display: grid;
  grid-template-columns: 1fr 32px 1fr;
  grid-template-rows: auto auto;
  row-gap: 6px;
  position: relative;
}
.timeline-item + .timeline-item {
  margin-top: 56px;
}
.timeline-dot {
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  justify-self: center;
  width: 13px;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--bg);
  position: relative;
  z-index: 2;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.timeline-item:hover .timeline-dot {
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.15);
}
.timeline-year {
  grid-row: 1;
  align-self: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1;
}
.timeline-item.timeline-right .timeline-year {
  grid-column: 3;
  justify-self: start;
}
.timeline-item.timeline-left .timeline-year {
  grid-column: 1;
  justify-self: end;
}
.timeline-body {
  grid-row: 2;
  max-width: 440px;
}
.timeline-item.timeline-right .timeline-body {
  grid-column: 3;
  justify-self: start;
  text-align: left;
}
.timeline-item.timeline-left .timeline-body {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}
.timeline-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.timeline-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  position: relative;
}
.timeline-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 10px;
  line-height: 1;
  border-radius: 3px;
  vertical-align: middle;
  transform: translateY(-1px);
}
@media (max-width: 860px) {
  .timeline-label {
    text-align: left;
    padding-left: 38px;
  }
  .timeline-line {
    left: 12px;
    transform: none;
  }
  .timeline-item {
    grid-template-columns: 24px 1fr;
    column-gap: 18px;
  }
  .timeline-item + .timeline-item {
    margin-top: 40px;
  }
  .timeline-dot {
    grid-column: 1;
    justify-self: center;
  }
  .timeline-item.timeline-right .timeline-year,
  .timeline-item.timeline-left .timeline-year {
    grid-column: 2;
    justify-self: start;
  }
  .timeline-item.timeline-right .timeline-body,
  .timeline-item.timeline-left .timeline-body {
    grid-column: 2;
    justify-self: start;
    text-align: left;
    max-width: none;
  }
}
/* Practice grid */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.practice-card {
  background: var(--bg);
  padding: 34px 26px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.practice-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.practice-name {
  font-size: 18px;
  font-weight: 500;
  margin-top: 24px;
}
.practice-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
  line-height: 1.5;
}
/* How It Works — step timeline */
.steps-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 80px;
}
.steps-track::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.step-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  padding: 0 6px;
}
.step-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}
.step-item:first-child {
  align-items: flex-start;
  padding-left: 0;
}
.step-item:last-child {
  align-items: flex-end;
  padding-right: 0;
}
.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--bg);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.step-item.active .step-dot,
.step-item:hover .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.15);
}
.step-label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  transition: color 0.3s ease;
  white-space: nowrap;
}
.step-item.active .step-label,
.step-item:hover .step-label {
  color: var(--accent);
}
.about-text {
  max-width: 720px;
  margin: 88px auto 0;
  text-align: center;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.step-text {
  transition: color 0.3s ease;
  cursor: pointer;
}
.step-text.active {
  color: var(--accent);
}
/* Portfolio marquee */
#portfolio {
  padding-bottom: 0;
}
.marquee-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 64px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  cursor: grab;
  user-select: none;
}
.marquee-track.dragging {
  cursor: grabbing;
}
.marquee-group {
  display: flex;
  flex-shrink: 0;
}
.marquee-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  min-width: 200px;
  padding: 0 44px;
  border-left: 1px solid var(--line);
  flex-shrink: 0;
  margin: 30px 0;
}
.marquee-group:first-child .marquee-item:first-child {
  border-left: none;
}
.marquee-wrap::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
}
.marquee-logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 26px;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.marquee-item:hover .marquee-logo-text {
  opacity: 1;
}
@media (max-width: 640px) {
  .marquee-item {
    height: 90px;
    min-width: 150px;
    padding: 0 28px;
  }
  .marquee-logo-text {
    font-size: 17px;
  }
}
/* Contact */
.contact {
  background: var(--ink);
  color: var(--bg);
  border-radius: 28px;
  padding: 100px 60px;
  text-align: center;
}
.contact h2 {
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 16ch;
  margin: 0 auto;
}
.contact .section-desc {
  color: #b9b6a4;
  margin: 22px auto 0;
  text-align: center;
}
.contact-cta {
  display: inline-flex;
  margin-top: 44px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.25s ease, color 0.25s ease;
}
.contact-cta:hover {
  background: var(--accent);
  color: #fff;
}
.contact-alt {
  margin-top: 80px;
  font-family: var(--mono);
  font-size: 12px;
  color: #b9b6a4;
}
footer {
  padding: 40px 0 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
footer .links {
  display: flex;
  gap: 20px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand img {
  height: 14px;
  width: auto;
}
/* ---- Scroll animation system ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.16, 0.8, 0.24, 1), transform 0.9s cubic-bezier(0.16, 0.8, 0.24, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 0.8, 0.24, 1), transform 0.7s cubic-bezier(0.16, 0.8, 0.24, 1);
}
[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger].is-visible > *:nth-child(1) {
  transition-delay: 0.02s;
}
[data-reveal-stagger].is-visible > *:nth-child(2) {
  transition-delay: 0.09s;
}
[data-reveal-stagger].is-visible > *:nth-child(3) {
  transition-delay: 0.16s;
}
[data-reveal-stagger].is-visible > *:nth-child(4) {
  transition-delay: 0.23s;
}
[data-reveal-stagger].is-visible > *:nth-child(5) {
  transition-delay: 0.3s;
}
[data-reveal-stagger].is-visible > *:nth-child(6) {
  transition-delay: 0.37s;
}
.rule-grow {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1s cubic-bezier(0.16, 0.8, 0.24, 1);
}
.rule-grow.is-visible {
  transform: scaleX(1);
}
/* Hero entrance */
.eyebrow,
h1.headline,
.hero-sub,
.cta-pill,
.hero-meta {
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 0.9s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}
.eyebrow {
  animation-delay: 0.05s;
}
h1.headline {
  animation-delay: 0.15s;
}
.hero-sub {
  animation-delay: 0.32s;
}
.cta-pill {
  animation-delay: 0.44s;
}
.hero-meta {
  animation-delay: 0.54s;
}
@keyframes heroIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Parallax layers */
.hero {
  perspective: 1px;
  border-bottom: 1px solid #ddd;
}
#heroParallax {
  will-change: transform;
}
/* Scroll progress rail */
.progress-rail {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.progress-rail .seg {
  width: 2px;
  height: 28px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.progress-rail .seg::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0%;
  background: var(--ink);
  transition: height 0.2s linear, background 0.2s ease;
}
.progress-rail .seg.active::after {
  height: 100%;
}
.progress-rail .seg.passed::after {
  height: 100%;
}
.progress-rail .seg:hover::after {
  background: var(--accent);
  height: 100%;
}
@media (max-width: 860px) {
  .progress-rail {
    display: none;
  }
}
/* Work item extra scroll polish */
.work-item {
  transition: padding-left 0.3s ease, border-color 0.3s ease;
}
/* Practice card entrance handled by stagger, add subtle scale */
.practice-card {
  transition: transform 0.6s cubic-bezier(0.16, 0.8, 0.24, 1), opacity 0.6s cubic-bezier(0.16, 0.8, 0.24, 1);
}
/* ---- Fullscreen site menu ---- */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  visibility: hidden;
  pointer-events: none;
}
.site-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}
.site-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(0px);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 0.8, 0.24, 1), backdrop-filter 0.4s cubic-bezier(0.16, 0.8, 0.24, 1);
}
.site-menu.is-open .site-menu-backdrop {
  opacity: 1;
  backdrop-filter: blur(14px);
}
.site-menu-close {
  position: absolute;
  top: 28px;
  right: 32px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}
.site-menu.is-open .site-menu-close {
  opacity: 1;
  transform: translateY(0);
}
.site-menu-close span {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: background 0.25s ease, transform 0.3s ease;
}
.site-menu-close:hover span {
  background: var(--accent);
}
.site-menu-close:hover span:first-child {
  transform: rotate(0);
}
.site-menu-close:hover span:last-child {
  transform: rotate(0);
}
.site-menu-close span:first-child {
  transform: rotate(45deg);
}
.site-menu-close span:last-child {
  transform: rotate(-45deg);
}
.site-menu-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 0.8, 0.24, 1) 0.08s, transform 0.5s cubic-bezier(0.16, 0.8, 0.24, 1) 0.08s;
}
.site-menu.is-open .site-menu-inner {
  opacity: 1;
  transform: translateY(0);
}
.site-menu-label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.site-menu-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  row-gap: 24px;
  column-gap: 48px;
  max-width: 1000px;
}
.site-menu-item {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 46px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.25s ease;
}
.site-menu-item:hover {
  color: var(--accent);
}
.site-menu-num {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .site-menu-inner {
    gap: 36px;
  }
  .site-menu-list {
    row-gap: 16px;
    column-gap: 24px;
  }
  .site-menu-item {
    font-size: clamp(20px, 7vw, 32px);
  }
}
/* ---- Service detail modal ---- */
.service-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  visibility: hidden;
  pointer-events: none;
}
.service-modal.is-open {
  visibility: visible;
  pointer-events: auto;
}
.service-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(60, 58, 48, 0.35);
  backdrop-filter: blur(0px) grayscale(0) brightness(1);
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.16, 0.8, 0.24, 1), backdrop-filter 0.45s cubic-bezier(0.16, 0.8, 0.24, 1);
}
.service-modal.is-open .service-modal-backdrop {
  opacity: 1;
  backdrop-filter: blur(9px) grayscale(0.4) brightness(0.82);
}
/* Cross-grid lines marking the panel's edges — only exist while the
     modal is open, positioned in JS to match the panel's live bounds
     so they stay exact through the entrance animation and on resize. */
.service-modal-line {
  position: fixed;
  background: var(--line);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.service-modal.is-open .service-modal-line {
  opacity: 1;
}
.service-modal-line-top {
  top: 0;
  left: 0;
  width: 100vw;
  height: 1px;
}
.service-modal-line-bottom {
  top: 0;
  left: 0;
  width: 100vw;
  height: 1px;
}
.service-modal-line-left {
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
}
.service-modal-line-right {
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
}
.service-modal-panel {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg);
  padding: 72px 32px;
  box-shadow: 0 30px 80px rgba(23, 22, 15, 0.18);
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 0.8, 0.24, 1), opacity 0.4s cubic-bezier(0.16, 0.8, 0.24, 1);
}
.service-modal.is-open .service-modal-panel {
  transform: translateY(0);
  opacity: 1;
}
.service-modal-close {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-modal-close span {
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: background 0.25s ease, transform 0.3s ease;
}
.service-modal-close:hover span {
  background: var(--accent);
}
.service-modal-close:hover span:first-child {
  transform: rotate(0);
}
.service-modal-close:hover span:last-child {
  transform: rotate(0);
}
.service-modal-close span:first-child {
  transform: rotate(45deg);
}
.service-modal-close span:last-child {
  transform: rotate(-45deg);
}
.service-modal-num,
.service-modal-tag,
.service-modal-title,
.service-modal-rule,
.service-modal-detail,
.service-modal-cta {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.16, 0.8, 0.24, 1), transform 0.5s cubic-bezier(0.16, 0.8, 0.24, 1);
}
.service-modal.is-open .service-modal-num {
  transition-delay: 0.1s;
}
.service-modal.is-open .service-modal-tag {
  transition-delay: 0.15s;
}
.service-modal.is-open .service-modal-title {
  transition-delay: 0.2s;
}
.service-modal.is-open .service-modal-rule {
  transition-delay: 0.28s;
}
.service-modal.is-open .service-modal-detail {
  transition-delay: 0.34s;
}
.service-modal.is-open .service-modal-cta {
  transition-delay: 0.42s;
}
.service-modal.is-open .service-modal-num,
.service-modal.is-open .service-modal-tag,
.service-modal.is-open .service-modal-title,
.service-modal.is-open .service-modal-rule,
.service-modal.is-open .service-modal-detail,
.service-modal.is-open .service-modal-cta {
  opacity: 1;
  transform: translateY(0);
}
.service-modal-num {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 18px;
}
.service-modal-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.service-modal-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 22px;
  max-width: 80%;
}
.service-modal-rule {
  width: 48px;
  height: 2px;
  background: var(--ink);
  margin-bottom: 22px;
}
.service-modal-detail {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 100%;
}
.service-modal-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  transition: color 0.25s ease;
}
.service-modal-cta:hover {
  color: var(--accent);
  text-decoration: underline;
}
body.modal-open {
  overflow: hidden;
}
@media (max-width: 640px) {
  .service-modal {
    padding: 12px;
  }
  .service-modal-panel {
    padding: 56px 24px;
  }
  .service-modal-close {
    right: 24px;
    top: 20px;
  }
  .service-modal-num {
    font-size: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-stagger] > *,
  .rule-grow,
  .eyebrow,
  h1.headline,
  .hero-sub,
  .cta-pill,
  .hero-meta,
  .service-modal-backdrop,
  .service-modal-panel,
  .service-modal-line,
  .service-modal-num,
  .service-modal-tag,
  .service-modal-title,
  .service-modal-rule,
  .service-modal-detail,
  .service-modal-cta,
  .site-menu-backdrop,
  .site-menu-close,
  .site-menu-inner {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    backdrop-filter: blur(6px) !important;
  }
}
@media (max-width: 860px) {
  .practice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .work-item {
    grid-template-columns: 40px 1fr;
    row-gap: 6px;
  }
  .work-tags,
  .work-arrow {
    display: none;
  }
  .contact {
    padding: 70px 28px;
    border-radius: 20px;
  }
  footer {
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }
  footer .links {
    margin: 10px 0 0 37px;
  }
}
@media (max-width: 480px) {
  .practice-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}
