/* ---------- Tokens ---------- */
:root {
  --paper: #efebe2;
  --sand: #ddd5c4;
  --ink: #1b1a18;
  --muted: #655f55;
  --accent: #2437a6;
  --accent-deep: #17236b;
  --line: rgba(27, 26, 24, .2);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --max: 1240px;
  --section: clamp(4.5rem, 10vw, 9rem);
  --ease: .25s ease;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.02; letter-spacing: -.01em; }
h2 { font-size: clamp(2.3rem, 5vw, 4rem); }
h3 { font-size: 1.7rem; line-height: 1.1; }
p { margin: 0 0 1em; }
ul, ol { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.section { padding-block: var(--section); }

/* ---------- Buttons and links ---------- */
.btn { display: inline-block; padding: .95rem 1.7rem; background: var(--accent); color: #fff; border: 1px solid var(--accent); font: 500 .98rem var(--sans); text-decoration: none; cursor: pointer; transition: background var(--ease), color var(--ease), border-color var(--ease); }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn-sm { padding: .5rem 1.1rem; font-size: .9rem; background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-sm:hover { background: var(--ink); color: var(--paper); }
.text-link { text-decoration: none; font-weight: 500; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: background-size var(--ease), color var(--ease); }
.text-link:hover { background-size: 0 1px; background-position: 100% 100%; color: var(--accent); }
.text-link.light:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; padding-block: 1.4rem; transition: padding var(--ease), background var(--ease), border-color var(--ease); border-bottom: 1px solid transparent; }
.site-header.is-scrolled { padding-block: .6rem; background: rgba(239, 235, 226, .95); border-color: var(--line); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.logo { font: 400 1.7rem/1 var(--serif); text-decoration: none; margin: 0; }
.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav ul { display: flex; gap: 2rem; }
.nav li a { text-decoration: none; font-size: .95rem; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; padding-bottom: 3px; transition: background-size var(--ease); }
.nav li a:hover { background-size: 100% 1px; }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; padding: 0; position: relative; cursor: pointer; z-index: 60; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform var(--ease), top var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(7rem, 14vw, 10rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 5rem); align-items: end; }
.tag { display: inline-block; border: 1px solid var(--line); padding: .35rem .8rem; font-size: .88rem; color: var(--muted); margin-bottom: 1.8rem; }
.hero h1 { font-size: clamp(3.2rem, 8.4vw, 7.4rem); line-height: .95; margin-bottom: 1.8rem; }
.lead { font-size: 1.2rem; max-width: 34em; color: var(--muted); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.6rem 2rem; margin-top: 2rem; }
.hero-visual { position: relative; margin: 0; }
.hero-visual svg { width: 100%; height: auto; }
.hero-note { position: absolute; left: -1.5rem; bottom: 2.5rem; background: var(--paper); border: 1px solid var(--ink); padding: .8rem 1.1rem; font-size: .88rem; line-height: 1.45; }
.facts-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: clamp(3rem, 7vw, 5.5rem) 0 0; border-top: 1px solid var(--ink); }
.facts-strip div { padding: 1.2rem 1.5rem 1.4rem 0; }
.facts-strip div + div { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.facts-strip dt { font-size: .85rem; color: var(--muted); }
.facts-strip dd { margin: .2rem 0 0; font-weight: 500; }

/* SVG fills */
.c-a { fill: var(--accent); } .c-d { fill: var(--ink); } .c-s { fill: var(--sand); } .c-l { fill: var(--paper); }
.hero-visual svg, .about-img svg { overflow: hidden; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 2rem; row-gap: 3rem; }
.about h2 { grid-column: 1 / 8; }
.about-text { grid-column: 8 / 13; align-self: end; color: var(--muted); }
.about-img { grid-column: 1 / 7; margin: 0; }
.about-img svg { width: 100%; height: auto; }
.statement { grid-column: 7 / 13; margin: 0; padding-left: 2rem; border-left: 3px solid var(--accent); align-self: start; margin-top: 4rem; }
.statement p { font: 400 clamp(1.8rem, 3.2vw, 2.7rem)/1.12 var(--serif); margin: 0; }
.about-facts { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-self: end; }
.about-facts li { border-top: 1px solid var(--ink); padding-top: .8rem; font-size: .95rem; color: var(--muted); line-height: 1.5; }
.about-facts strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: .3rem; }

/* ---------- Services ---------- */
.services { background: var(--sand); }
.section-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: end; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head p { color: var(--muted); margin: 0; }
.services-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.feature { background: var(--accent); color: #fff; padding: clamp(1.8rem, 4vw, 3rem); position: sticky; top: 6rem; }
.feature h3 { font-size: clamp(2.4rem, 4vw, 3.4rem); margin: 2.5rem 0 1rem; }
.feature p { color: rgba(255, 255, 255, .85); margin-bottom: 1.6rem; }
.icon { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-lg { width: 52px; height: 52px; }
.service-list li { display: grid; grid-template-columns: 34px 1fr 1.2fr; gap: 1.5rem; align-items: start; padding: 1.7rem 0; border-top: 1px solid var(--ink); transition: padding var(--ease), background var(--ease); }
.service-list li:last-child { border-bottom: 1px solid var(--ink); }
.service-list h3 { font-size: 1.6rem; transition: color var(--ease); }
.service-list p { margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.55; }
.service-list li:hover { padding-left: 1rem; }
.service-list li:hover h3, .service-list li:hover .icon { color: var(--accent); }

/* ---------- Approach / benefits ---------- */
.approach { background: var(--accent-deep); color: var(--paper); }
.approach h2 { max-width: 14em; margin-bottom: clamp(3rem, 7vw, 5rem); }
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; align-items: start; }
.benefits li { border-top: 1px solid rgba(239, 235, 226, .45); padding-top: 1.2rem; }
.benefits li:nth-child(2) { margin-top: 2.5rem; }
.benefits li:nth-child(3) { margin-top: 5rem; }
.benefits li:nth-child(4) { margin-top: 7.5rem; }
.num { display: block; font: italic 400 clamp(4.5rem, 8vw, 7rem)/1 var(--serif); margin-bottom: 1rem; color: var(--sand); }
.benefits h3 { font-size: 1.55rem; margin-bottom: .6rem; }
.benefits p { color: rgba(239, 235, 226, .78); font-size: .98rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 7vw, 6rem); }
.contact-info h2 { margin-bottom: 1.5rem; }
.contact-info > p { color: var(--muted); max-width: 26em; }
address { font-style: normal; margin: 2.5rem 0 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--ink); line-height: 1.6; }
address span { display: block; font: 400 1.5rem var(--serif); margin-bottom: .3rem; }
.mail { font: 400 clamp(1.4rem, 3vw, 2rem) var(--serif); color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; word-break: break-all; }
.mail:hover { color: var(--ink); }
.form { background: #f8f6f0; border: 1px solid var(--ink); padding: clamp(1.5rem, 4vw, 2.8rem); }
.field { margin-bottom: 1.4rem; }
.field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: .3rem; }
.field input, .field textarea { width: 100%; padding: .6rem 0; background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; font: inherit; color: var(--ink); resize: vertical; transition: border-color var(--ease); }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.field.invalid input, .field.invalid textarea { border-bottom-color: #a3261b; }
.error { display: block; min-height: 1.1em; margin-top: .3rem; font-size: .85rem; color: #a3261b; }
.form-status { margin: 1.2rem 0 0; font-size: .95rem; }
.form-status.ok { color: #1d6b3a; }
.form-status.fail { color: #a3261b; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--ink); padding-top: 3.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-about { color: var(--muted); max-width: 22em; margin-top: 1rem; }
.footer h4 { font: 600 .95rem var(--sans); margin: 0 0 .9rem; }
.footer li { margin-bottom: .45rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; padding-block: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* ---------- Motion ---------- */
.rise { animation: rise .7s ease both; }
.hero-copy .tag { animation-delay: .05s; } .hero h1 { animation-delay: .15s; } .lead { animation-delay: .3s; }
.actions { animation-delay: .4s; } .hero-visual { animation-delay: .25s; } .facts-strip { animation-delay: .55s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin-left: auto; }
  .about h2, .about-text, .about-img, .statement, .about-facts { grid-column: 1 / -1; }
  .statement { margin-top: 0; }
  .services-grid { grid-template-columns: 1fr; }
  .feature { position: static; }
  .section-head { grid-template-columns: 1fr; gap: 1.2rem; }
  .benefits { grid-template-columns: repeat(2, 1fr); gap: 3rem 2rem; }
  .benefits li:nth-child(n) { margin-top: 0; }
  .benefits li:nth-child(even) { margin-top: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .burger { display: block; }
  .nav { position: fixed; inset: 0; background: var(--paper); flex-direction: column; justify-content: center; align-items: flex-start; gap: 2.5rem; padding: 5rem var(--pad) 2rem; transform: translateY(-100%); visibility: hidden; transition: transform .35s ease, visibility .35s; }
  .nav.open { transform: none; visibility: visible; }
  .nav ul { flex-direction: column; gap: 1.2rem; }
  .nav li a { font: 400 2.6rem/1.1 var(--serif); }
  .btn-sm { padding: .8rem 1.5rem; font-size: 1rem; }
  .hero-note { left: .8rem; bottom: 1rem; }
  .facts-strip { grid-template-columns: 1fr; }
  .facts-strip div, .facts-strip div + div { padding: 1rem 0; border-left: 0; }
  .facts-strip div + div { border-top: 1px solid var(--line); }
  .about-facts { grid-template-columns: 1fr; }
  .service-list li { grid-template-columns: 34px 1fr; row-gap: .6rem; }
  .service-list p { grid-column: 2; }
  .benefits { grid-template-columns: 1fr; }
  .benefits li:nth-child(even) { margin-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
