:root {
  --ink: #17191c;
  --ink-soft: #4b5158;
  --paper: #f8f7f3;
  --white: #ffffff;
  --line: #d9dadd;
  --blue: #1778b5;
  --red: #e6322a;
  --yellow: #f5bf12;
  --olive: #71851c;
  --blue-soft: #eaf3f8;
  --yellow-soft: #fff6d9;
  --red-soft: #fbe9e7;
  --max: 1440px;
  --pad: clamp(20px, 4vw, 72px);
  --radius: 22px;
  --shadow: 0 24px 70px rgba(17, 25, 32, .08);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 200;
  padding: 10px 16px; background: var(--ink); color: white; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(23,25,28,.1);
  background: rgba(248,247,243,.88);
  backdrop-filter: blur(16px);
}
.nav-wrap {
  width: min(100%, var(--max)); margin: auto; padding: 12px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { width: clamp(190px, 19vw, 265px); }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); font-size: .92rem; }
.nav-links a { position: relative; }
.nav-links a:not(.button)::after {
  content: ""; position: absolute; left: 0; bottom: -7px; width: 100%; height: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: right; transition: transform .25s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 9px; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 5px 0; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--ink);
  font-weight: 650; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: var(--blue); border-color: var(--blue); }
.button-accent { background: var(--yellow); border-color: var(--yellow); }
.button-ghost { background: transparent; }
.button-small { min-height: 38px; padding: 0 17px; font-size: .86rem; }

.container { width: min(100%, var(--max)); margin: auto; padding-inline: var(--pad); }
.section { padding: clamp(78px, 10vw, 150px) 0; position: relative; }
.section-tight { padding: clamp(62px, 8vw, 105px) 0; }
.section-white { background: var(--white); }
.section-blue { background: var(--blue-soft); }
.section-ink { background: var(--ink); color: white; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  text-transform: uppercase; letter-spacing: .13em; font-size: .73rem; font-weight: 800;
}
.eyebrow::before { content: ""; width: 34px; height: 3px; background: var(--yellow); }
.display {
  margin: 0; max-width: 1100px; font-size: clamp(3.2rem, 7.4vw, 8.6rem); line-height: .91;
  letter-spacing: -.065em; font-weight: 710;
}
.h1-project { font-size: clamp(3rem, 7vw, 7.4rem); line-height: .93; letter-spacing: -.055em; margin: 0; }
.h2 { margin: 0; font-size: clamp(2.15rem, 4.7vw, 5.4rem); line-height: .98; letter-spacing: -.045em; font-weight: 680; }
.h3 { margin: 0; font-size: clamp(1.35rem, 2.2vw, 2.15rem); line-height: 1.12; letter-spacing: -.025em; }
.lead { font-size: clamp(1.12rem, 1.8vw, 1.55rem); color: var(--ink-soft); max-width: 780px; }
.section-ink .lead { color: rgba(255,255,255,.72); }
.muted { color: var(--ink-soft); }

.hero { min-height: calc(100svh - 80px); display: grid; align-items: center; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -12vw; bottom: -18vw; width: 45vw; aspect-ratio: 1;
  border: clamp(35px, 6vw, 92px) solid var(--blue); border-radius: 50%; opacity: .055;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr); gap: clamp(42px, 7vw, 120px); align-items: end; }
.hero-copy { position: relative; z-index: 2; }
.hero .display span { color: var(--blue); }
.hero-intro { margin: 34px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; max-width: 1080px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-mark { position: relative; min-height: 430px; }
.shape { position: absolute; filter: saturate(.95); }
.shape-triangle { width: 58%; aspect-ratio: 1; left: 0; top: 3%; background: var(--blue); clip-path: polygon(50% 0, 100% 100%, 0 100%); animation: drift 9s ease-in-out infinite; }
.shape-circle { width: 46%; aspect-ratio: 1; right: 5%; top: 12%; border-radius: 50%; background: var(--red); animation: drift 7s ease-in-out -1s infinite reverse; }
.shape-square { width: 38%; aspect-ratio: 1; left: 34%; bottom: 3%; background: var(--yellow); animation: drift 11s ease-in-out -2s infinite; }
.shape-cross::before, .shape-cross::after { content: ""; position: absolute; background: var(--olive); }
.shape-cross { width: 34%; aspect-ratio: 1; right: 0; bottom: 11%; animation: rotateFloat 16s linear infinite; }
.shape-cross::before { left: 38%; top: 0; width: 24%; height: 100%; }
.shape-cross::after { left: 0; top: 38%; width: 100%; height: 24%; }
@keyframes drift { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(3deg); } }
@keyframes rotateFloat { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin-top: clamp(56px, 8vw, 110px); }
.stat { padding: 28px 24px 0 0; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: clamp(18px, 3vw, 42px); }
.stat strong { display: block; font-size: clamp(2rem, 3.2vw, 3.6rem); letter-spacing: -.05em; }
.stat span { color: var(--ink-soft); font-size: .94rem; }

.section-head { display: grid; grid-template-columns: .75fr 1.25fr; gap: 40px; align-items: start; margin-bottom: clamp(42px, 7vw, 92px); }
.section-head .lead { margin: 10px 0 0; }

.case-grid { display: grid; gap: 24px; }
.case-card {
  min-height: 580px; display: grid; grid-template-columns: 1.06fr .94fr; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.case-card:nth-child(even) .case-image { order: 2; }
.case-card:nth-child(even) .case-content { order: 1; }
.case-image { display: grid; place-items: center; padding: clamp(22px, 5vw, 70px); background: #f3f5f5; overflow: hidden; }
.case-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.case-card:hover .case-image img { transform: scale(1.025); }
.case-content { padding: clamp(34px, 5vw, 74px); display: flex; flex-direction: column; justify-content: space-between; }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.case-content p { color: var(--ink-soft); font-size: 1.04rem; max-width: 560px; }
.text-link { display: inline-flex; gap: 10px; align-items: center; font-weight: 750; margin-top: 24px; }
.text-link::after { content: "↗"; transition: transform .2s ease; }
.text-link:hover::after { transform: translate(3px,-3px); }

.value-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 8vw, 120px); align-items: start; }
.value-points { border-top: 1px solid rgba(255,255,255,.22); }
.value-row { display: grid; grid-template-columns: 72px 1fr; gap: 22px; padding: 27px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.value-row strong { color: var(--yellow); font-size: .88rem; }
.value-row p { margin: 0; color: rgba(255,255,255,.75); }

.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 3.6vw, 48px); background: var(--white); min-height: 440px; display: flex; flex-direction: column; }
.service-card.featured { background: var(--yellow-soft); border-color: #e5cb65; }
.service-card .number { font-size: .8rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--blue); }
.service-card .price { margin: 30px 0 4px; font-size: clamp(2.6rem, 4vw, 4.7rem); letter-spacing: -.06em; line-height: 1; }
.service-card .price small { font-size: .92rem; letter-spacing: 0; color: var(--ink-soft); }
.service-card ul { margin: 22px 0 34px; padding: 0; list-style: none; color: var(--ink-soft); }
.service-card li { padding: 8px 0; border-bottom: 1px solid rgba(23,25,28,.09); }
.service-card .button { margin-top: auto; }

.method-grid { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.method-item { counter-increment: step; padding: 30px clamp(18px, 3vw, 38px) 0 0; }
.method-item + .method-item { border-left: 1px solid var(--line); padding-left: clamp(18px, 3vw, 38px); }
.method-item::before { content: "0" counter(step); display: block; margin-bottom: 38px; color: var(--blue); font-weight: 800; }
.method-item p { color: var(--ink-soft); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 40px; }
.filter { border: 1px solid var(--line); background: transparent; padding: 10px 15px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: .84rem; }
.filter.active, .filter:hover { background: var(--ink); color: white; border-color: var(--ink); }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .28s ease, box-shadow .28s ease; }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-thumb { aspect-ratio: 4/3; overflow: hidden; background: #eef0f0; display: grid; place-items: center; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover img { transform: scale(1.035); }
.project-copy { padding: 22px; }
.project-copy h3 { margin: 0 0 8px; font-size: 1.18rem; letter-spacing: -.02em; }
.project-copy p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.project-copy .project-cat { display: block; margin-top: 17px; color: var(--blue); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.project-card[hidden] { display: none; }

.about-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(46px, 9vw, 140px); align-items: center; }
.about-copy p { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--ink-soft); max-width: 780px; }
.about-portrait { background: var(--yellow-soft); border-radius: 50% 50% 12px 12px; min-height: 480px; display: grid; place-items: end center; padding: 30px; overflow: hidden; }
.about-portrait img { max-height: 420px; filter: contrast(1.2); }
.capabilities { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.capabilities span { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; font-size: .83rem; }

.faq { max-width: 980px; margin: auto; }
details { border-top: 1px solid var(--line); padding: 23px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 750; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--blue); }
details[open] summary::after { content: "–"; }
details p { color: var(--ink-soft); max-width: 760px; }

.contact-panel { display: grid; grid-template-columns: 1.35fr .65fr; gap: 42px; align-items: end; }
.contact-links { display: grid; gap: 10px; }
.contact-links a, .contact-placeholder { font-size: clamp(1.25rem, 2.1vw, 2rem); font-weight: 700; }
.contact-links a:hover { color: var(--yellow); }
.footer { border-top: 1px solid rgba(255,255,255,.2); padding: 30px 0; }
.footer-grid { display: flex; justify-content: space-between; gap: 28px; color: rgba(255,255,255,.62); font-size: .83rem; }
.footer a:hover { color: white; }

/* Project page */
.project-hero { padding: clamp(76px, 10vw, 150px) 0 70px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.project-intro-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 50px; align-items: end; margin-top: 42px; }
.project-intro-grid .lead { margin: 0; }
.project-services { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.project-stage { padding: clamp(35px, 6vw, 90px); background: #edf0f0; border-radius: var(--radius); min-height: min(72vw, 880px); display: grid; place-items: center; overflow: hidden; }
.project-stage img { max-height: 760px; width: 100%; object-fit: contain; }
.project-story { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.story-block { border-top: 2px solid var(--ink); padding-top: 22px; }
.story-block p { color: var(--ink-soft); }
.next-project { display: grid; grid-template-columns: 1fr 1fr; min-height: 390px; }
.next-copy { padding: clamp(40px, 7vw, 100px); display: flex; flex-direction: column; justify-content: space-between; background: var(--yellow); }
.next-image { background: #eceeee; display: grid; place-items: center; padding: 38px; overflow: hidden; }
.next-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.next-project:hover .next-image img { transform: scale(1.03); }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1040px) {
  .hero-grid, .section-head, .value-grid, .about-grid, .contact-panel, .project-intro-grid { grid-template-columns: 1fr; }
  .hero-mark { min-height: 300px; width: min(460px, 75vw); }
  .hero-intro { grid-template-columns: 1fr; }
  .case-card { grid-template-columns: 1fr; }
  .case-card:nth-child(even) .case-image, .case-card:nth-child(even) .case-content { order: initial; }
  .case-image { min-height: 430px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .service-card:last-child { grid-column: 1 / -1; min-height: 330px; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .method-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .method-item:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 30px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .project-services { justify-content: flex-start; }
  .project-story { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --pad: 20px; --radius: 16px; }
  .nav-wrap { padding-block: 10px; }
  .logo { width: 190px; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none; position: fixed; left: 0; right: 0; top: 71px; padding: 24px var(--pad) 30px;
    background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links .button { width: 100%; }
  .hero { min-height: auto; padding-top: 42px; }
  .display { font-size: clamp(3.1rem, 15.5vw, 5.6rem); }
  .hero-mark { min-height: 260px; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; margin-top: 22px; }
  .section-head { gap: 18px; }
  .case-card { min-height: auto; }
  .case-image { min-height: 300px; }
  .service-grid, .portfolio-grid { grid-template-columns: 1fr; }
  .service-card:last-child { grid-column: auto; }
  .method-grid { grid-template-columns: 1fr; }
  .method-item + .method-item, .method-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .method-item:nth-child(n+2) { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
  .about-portrait { min-height: 390px; }
  .footer-grid { flex-direction: column; }
  .project-stage { min-height: 390px; padding: 18px; }
  .next-project { grid-template-columns: 1fr; }
  .next-image { min-height: 310px; order: -1; }
}

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