:root {
  --ink: #101010;
  --paper: #f2f0ea;
  --white: #ffffff;
  --blue: #1057ff;
  --muted: #6b6b66;
  --line: rgba(16, 16, 16, .18);
  --shell: 1440px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.nav-open { overflow: hidden; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
address { font-style: normal; }
svg { display: block; }

.shell {
  width: min(calc(100% - 64px), var(--shell));
  margin-inline: auto;
}

.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-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 86px;
  color: var(--white);
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.site-header.scrolled,
.legal-page .site-header {
  color: var(--ink);
  background: rgba(242, 240, 234, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  color: inherit;
  text-decoration: none;
}
.brand-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid currentColor;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: -.04em;
}
.brand-text { display: grid; gap: 2px; }
.brand-text strong { font-size: .94rem; letter-spacing: -.02em; }
.brand-text span { font-size: .63rem; text-transform: uppercase; letter-spacing: .12em; opacity: .66; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  position: relative;
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.site-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 -7px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease;
}
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-call {
  justify-self: end;
  padding: 13px 17px;
  border: 1px solid currentColor;
  color: inherit;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .02em;
}
.nav-toggle { display: none; }

.hero {
  color: var(--white);
  background: var(--ink);
}
.hero-layout {
  min-height: 820px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  padding-top: 86px;
}
.hero-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 82px 7vw 66px 0;
  border-right: 1px solid rgba(255,255,255,.18);
}
.section-label {
  margin: 0;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .17em;
}
.hero h1 {
  max-width: 950px;
  margin: 80px 0;
  font-size: clamp(5rem, 9vw, 9.8rem);
  line-height: .82;
  letter-spacing: -.075em;
  font-weight: 900;
}
.hero h1 span { color: var(--blue); }
.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 520px) auto;
  align-items: end;
  gap: 42px;
}
.hero-bottom p {
  margin: 0;
  color: rgba(255,255,255,.66);
  font-size: 1.05rem;
  line-height: 1.65;
}
.primary-link {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  min-width: 220px;
  padding: 18px 0;
  border-bottom: 1px solid var(--white);
  color: var(--white);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.primary-link span { font-size: 1.15rem; transition: transform .2s ease; }
.primary-link:hover span { transform: translate(4px,-4px); }
.hero-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 70px 0 66px 46px;
}
.technical-mark { width: 100%; max-width: 320px; }
.technical-mark svg { width: 100%; overflow: visible; }
.technical-mark path,
.technical-mark circle {
  fill: none;
  stroke: rgba(255,255,255,.45);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.technical-mark .water-path {
  stroke: var(--blue);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 18;
  animation: flow 1.2s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -20; } }
.hero-contact { display: grid; gap: 13px; font-size: .84rem; line-height: 1.55; }
.hero-contact > span { color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; }
.hero-contact a { width: max-content; text-underline-offset: 4px; }

.services { padding: 150px 0; }
.section-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 10vw;
}
.section-intro { position: sticky; top: 130px; align-self: start; }
.section-intro h2,
.contact h2 {
  margin: 36px 0 28px;
  font-size: clamp(3.4rem, 5.8vw, 6.7rem);
  line-height: .9;
  letter-spacing: -.065em;
}
.section-intro > p:last-child {
  max-width: 310px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.service-list { border-top: 1px solid var(--ink); }
.service-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  padding: 34px 0 40px;
  border-bottom: 1px solid var(--line);
}
.service-number { padding-top: 8px; color: var(--blue); font-size: .72rem; font-weight: 900; }
.service-row h3 { margin: 0 0 10px; font-size: clamp(2rem, 3.5vw, 4.3rem); letter-spacing: -.055em; line-height: 1; }
.service-row p { max-width: 700px; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }

.about { padding: 140px 0; color: var(--white); background: var(--blue); }
.about-layout {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 330px;
  gap: 6vw;
  align-items: start;
}
.section-label.light { color: rgba(255,255,255,.72); }
.about blockquote {
  margin: 0;
  font-size: clamp(3rem, 5.5vw, 6.3rem);
  line-height: .93;
  letter-spacing: -.06em;
  font-weight: 900;
}
.about-copy { display: grid; gap: 22px; padding-top: 8px; }
.about-copy p { margin: 0; color: rgba(255,255,255,.74); line-height: 1.7; }

.contact { padding: 145px 0 110px; }
.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 10vw; }
.contact-actions { border-top: 1px solid var(--ink); }
.contact-line {
  display: grid;
  grid-template-columns: 95px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.contact-line span { padding-top: 7px; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.contact-line strong { font-size: clamp(1.45rem, 2.6vw, 3.2rem); letter-spacing: -.045em; line-height: 1.1; overflow-wrap: anywhere; }
.contact-line i { font-style: normal; font-size: 1.35rem; transition: transform .2s ease; }
a.contact-line:hover i { transform: translate(5px,-5px); }

.site-footer { padding: 24px 0; color: rgba(255,255,255,.65); background: var(--ink); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .72rem; }
.footer-inner nav { display: flex; gap: 22px; }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--white); }

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

/* Legal pages */
.legal-page { background: var(--paper); }
.legal-page .header-call { display: none; }
.legal-hero { padding: 175px 0 70px; color: var(--white); background: var(--ink); }
.legal-hero h1 { margin: 48px 0 16px; font-size: clamp(4rem, 8vw, 8rem); line-height: .85; letter-spacing: -.07em; }
.legal-hero p:last-child { margin: 0; color: rgba(255,255,255,.6); }
.legal-content { padding: 90px 0 120px; }
.legal-card { max-width: 880px; }
.legal-card section { padding: 30px 0; border-bottom: 1px solid var(--line); }
.legal-card section:first-child { border-top: 1px solid var(--ink); }
.legal-card h2 { margin: 0 0 16px; font-size: 1.4rem; letter-spacing: -.03em; }
.legal-card h3 { margin: 24px 0 10px; }
.legal-card p, .legal-card li { color: #4f4f4b; line-height: 1.7; }
.legal-card a { text-underline-offset: 4px; }
.legal-note { margin-top: 36px; padding: 18px 0; border-top: 2px solid var(--blue); color: var(--ink) !important; }

@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; }
}

@media (max-width: 1040px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .section-grid { grid-template-columns: 300px 1fr; gap: 7vw; }
  .about-layout { grid-template-columns: 120px 1fr; }
  .about-copy { grid-column: 2; max-width: 680px; }
}

@media (max-width: 820px) {
  .shell { width: min(calc(100% - 34px), var(--shell)); }
  .site-header { height: 72px; }
  .header-inner { grid-template-columns: 1fr auto; }
  .header-call { display: none; }
  .nav-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-content: center;
    gap: 6px;
    border: 1px solid currentColor;
    color: inherit;
    background: transparent;
  }
  .nav-toggle span:not(.sr-only) { display: block; width: 19px; height: 1px; background: currentColor; transition: transform .2s ease; }
  .nav-toggle[aria-expanded="true"] span:not(.sr-only):first-of-type { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:not(.sr-only):last-of-type { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav {
    position: fixed;
    inset: 72px 0 auto;
    display: grid;
    gap: 0;
    padding: 18px 17px 26px;
    color: var(--ink);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 18px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
  .site-nav a::after { display: none; }
  .hero-layout { min-height: auto; grid-template-columns: 1fr; padding-top: 72px; }
  .hero-main { min-height: 700px; padding: 58px 0 50px; border-right: 0; }
  .hero h1 { margin: 62px 0; font-size: clamp(4rem, 17vw, 7rem); }
  .hero-bottom { grid-template-columns: 1fr; align-items: start; }
  .primary-link { width: min(100%, 320px); }
  .hero-side { min-height: 480px; padding: 56px 0 50px; border-top: 1px solid rgba(255,255,255,.18); }
  .technical-mark { max-width: 300px; }
  .services, .about, .contact { padding: 105px 0; }
  .section-grid, .contact-layout { grid-template-columns: 1fr; gap: 72px; }
  .section-intro { position: static; }
  .section-intro > p:last-child { max-width: 520px; }
  .about-layout { grid-template-columns: 1fr; gap: 44px; }
  .about-copy { grid-column: auto; }
}

@media (max-width: 560px) {
  .brand-symbol { width: 38px; height: 38px; }
  .brand-text strong { font-size: .86rem; }
  .brand-text span { font-size: .56rem; }
  .hero-main { min-height: 620px; }
  .hero h1 { letter-spacing: -.065em; }
  .service-row { grid-template-columns: 42px 1fr; gap: 12px; }
  .service-row h3 { font-size: 2.5rem; }
  .contact-line { grid-template-columns: 1fr auto; gap: 12px; }
  .contact-line span { grid-column: 1 / -1; }
  .contact-line strong { font-size: 1.6rem; }
  .contact-line.static { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .legal-hero { padding-top: 145px; }
}
