/* =====================================================================
   AVSPMC — LAYOUT & COMPONENTS
   Colours and fonts are set in tokens.css. Edit that file first.
   ===================================================================== */

/* ---- Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue); }
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--blue);
  margin: 0;
  text-wrap: balance;
}
h3 { font-weight: 400; letter-spacing: -0.005em; }
p { margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.15em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--blue); color: var(--white); padding: 10px 16px; }
.skip-link:focus { top: 12px; color: var(--white); }

.wrap { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section-tight { padding: calc(var(--section-y) * 0.6) 0; }
.surface { background: var(--surface); }

/* ---- Sample notice -------------------------------------------------- */
.sample-notice {
  background: var(--blue-soft); color: var(--blue-deep);
  font-size: var(--fs-xs); line-height: 1.4; text-align: center;
  padding: 7px var(--gutter);
}

/* ---- Links & buttons ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 26px;
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid var(--blue); border-radius: var(--radius);
  background: var(--blue); color: var(--white);
  text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s;
}
.btn:hover { background: var(--blue-deep); color: var(--white); }
.btn-line { background: transparent; color: var(--blue); }
.btn-line:hover { background: var(--blue); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.text-link {
  display: inline-block; font-weight: 600; font-size: var(--fs-sm); color: var(--blue);
  text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 0.35em;
  transition: text-decoration-color .2s;
}
.text-link:hover { text-decoration-color: var(--blue); }

/* ---- Header --------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 80px; }
.logo { display: inline-flex; align-items: baseline; text-decoration: none; color: var(--blue); line-height: 1; }
.logo:hover { color: var(--blue); }
.logo-word { font-family: var(--font-sans); font-size: 1.3rem; letter-spacing: 0.16em; }
.logo-word b { font-weight: 700; }
.logo-word span { font-weight: 300; }
.logo-light { color: var(--footer-strong); }
.logo-light:hover { color: var(--footer-strong); }

.site-nav ul { display: flex; gap: clamp(20px, 2.6vw, 40px); list-style: none; margin: 0; padding: 0; }
.site-nav a { font-size: var(--fs-sm); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px;
    background: none; border: 0; color: var(--blue); font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer;
    text-decoration: underline; text-underline-offset: 0.3em;
  }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 28px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 300; color: var(--blue); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); font-weight: 500; }
}

/* ---- Home hero ------------------------------------------------------ */
.hero { padding: clamp(40px, 6vw, 88px) 0 calc(var(--section-y) * 0.5); }
.hero h1 { font-size: var(--fs-2xl); max-width: 17ch; }
.hero-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end; }
.hero-intro p { font-size: var(--fs-md); color: var(--muted); }
.hero-media { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(16px, 2.5vw, 32px); margin-top: clamp(40px, 5vw, 64px); align-items: start; }
.hero-media img { width: 100%; object-fit: cover; }
.hero-media .tall { aspect-ratio: 4 / 5; margin-top: clamp(32px, 7vw, 112px); }
.hero-media .wide { aspect-ratio: 3 / 2; }
@media (max-width: 800px) {
  .hero-intro { grid-template-columns: 1fr; }
  .hero-media { grid-template-columns: 1fr 1.6fr; }
}

/* One orchestrated entrance: the two hero photos rise in, then rest. */
.reveal { animation: reveal 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.reveal-2 { animation-delay: .18s; }
@keyframes reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---- Lead paragraph (practice intro) ------------------------------- */
.lead-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 24px clamp(32px, 6vw, 96px); }
.lead-grid h2 { font-size: var(--fs-md); font-family: var(--font-sans); font-weight: 600; color: var(--ink); letter-spacing: 0; }
.lead { font-family: var(--font-serif); font-weight: 300; font-size: var(--fs-lg); line-height: 1.45; color: var(--ink); max-width: 42ch; }
.lead strong { font-weight: 500; color: var(--blue); }
.lead + .text-link { margin-top: 28px; }
@media (max-width: 800px) { .lead-grid { grid-template-columns: 1fr; } }

/* ---- Section head row ---------------------------------------------- */
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; margin-bottom: clamp(32px, 5vw, 64px); }
.head-row h2 { font-size: var(--fs-xl); }

/* ---- Selected work -------------------------------------------------- */
.work-feature img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.work-pair { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(48px, 7vw, 96px); align-items: start; }
.work-pair .project:first-child img { aspect-ratio: 4 / 5; }
.work-pair .project:last-child { margin-top: clamp(0px, 12vw, 180px); }
.work-pair .project:last-child img { aspect-ratio: 4 / 3; }
@media (max-width: 700px) { .work-pair { grid-template-columns: 1fr; } .work-pair .project:last-child { margin-top: 0; } }

.project img { width: 100%; object-fit: cover; background: var(--surface); }
.project-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: 18px; }
.project-caption h3 { font-size: var(--fs-lg); }
.project-caption p { color: var(--muted); font-size: var(--fs-sm); margin: 6px 0 0; }
.project-meta { font-size: var(--fs-sm); color: var(--muted); text-align: right; }
.status { display: block; font-weight: 600; }
.status-done { color: var(--on-track); }
.status-ongoing { color: var(--in-progress); }
@media (max-width: 520px) { .project-meta { text-align: left; } }

/* ---- Services overview (home) -------------------------------------- */
.split-media { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split-media > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; position: sticky; top: 120px; }
.split-media h2 { font-size: var(--fs-xl); margin-bottom: 20px; }
.split-media .intro { color: var(--muted); margin-bottom: 36px; }
@media (max-width: 860px) { .split-media { grid-template-columns: 1fr; } .split-media > img { position: static; aspect-ratio: 16 / 10; } }

.service-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.service-rows li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.service-rows h3 { font-size: var(--fs-md); }
.service-rows p { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 560px) { .service-rows li { grid-template-columns: 1fr; } }

/* ---- Who we work for ----------------------------------------------- */
.columns-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(32px, 5vw, 72px); }
.columns-3 h3 { font-size: var(--fs-lg); margin-bottom: 12px; }
.columns-3 p { color: var(--muted); }
@media (max-width: 860px) { .columns-3 { grid-template-columns: 1fr; } }

/* ---- Testimonial --------------------------------------------------- */
.testimonial { max-width: 980px; margin: 0; }
.testimonial blockquote { margin: 0; }
.testimonial p { font-family: var(--font-serif); font-weight: 300; font-size: var(--fs-xl); line-height: 1.3; color: var(--blue); max-width: 30ch; }
.testimonial figcaption { margin-top: 28px; font-size: var(--fs-sm); color: var(--muted); }
.testimonial figcaption b { display: block; color: var(--ink); font-weight: 600; }

/* ---- Full-bleed photo ---------------------------------------------- */
.bleed img { width: 100%; height: clamp(280px, 48vw, 640px); object-fit: cover; }

/* ---- Closing contact block ----------------------------------------- */
.closing { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end; }
.closing h2 { font-size: var(--fs-xl); max-width: 16ch; }
.closing p { color: var(--muted); margin-top: 16px; }
.direct { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.direct li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.direct span { display: block; font-size: var(--fs-xs); color: var(--muted); }
.direct a { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 300; color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.direct a:hover { text-decoration: underline; }
@media (max-width: 860px) { .closing { grid-template-columns: 1fr; } }

/* ---- Inner page intro ---------------------------------------------- */
.page-intro { padding: clamp(56px, 8vw, 112px) 0 clamp(40px, 6vw, 80px); }
.page-intro h1 { font-size: var(--fs-2xl); max-width: 16ch; }
.page-intro .intro-text { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; }
.page-intro p { font-size: var(--fs-md); color: var(--muted); }
.crumb { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 28px; }
.crumb a { color: var(--muted); }
.page-image img { width: 100%; height: clamp(240px, 42vw, 560px); object-fit: cover; }
@media (max-width: 800px) { .page-intro .intro-text { grid-template-columns: 1fr; } }

/* ---- Services page ------------------------------------------------- */
.service-detail { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 16px clamp(32px, 6vw, 96px); padding: clamp(32px, 4vw, 48px) 0; border-top: 1px solid var(--line); }
.service-detail h2 { font-size: var(--fs-lg); font-weight: 400; }
.service-detail p { font-size: var(--fs-md); line-height: 1.55; }
.service-detail ul { columns: 2; column-gap: 40px; margin: 20px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.service-detail li { margin-bottom: 6px; break-inside: avoid; }
@media (max-width: 800px) { .service-detail { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .service-detail ul { columns: 1; } }

.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: stage; }
.stages li { counter-increment: stage; padding: 20px 24px 0 0; border-top: 1px solid var(--blue); }
.stages li::before { content: counter(stage); display: block; font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 300; color: var(--blue); margin-bottom: 12px; }
.stages h3 { font-size: var(--fs-md); margin-bottom: 8px; }
.stages p { font-size: var(--fs-sm); color: var(--muted); }
@media (max-width: 960px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 0; } }
@media (max-width: 520px) { .stages { grid-template-columns: 1fr; } }

.text-block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 24px clamp(32px, 6vw, 96px); }
.text-block h2 { font-size: var(--fs-xl); }
.text-block p { font-size: var(--fs-md); line-height: 1.6; }
@media (max-width: 800px) { .text-block { grid-template-columns: 1fr; } }

/* ---- Resources ------------------------------------------------------ */
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.resource { display: flex; flex-direction: column; padding: clamp(28px, 4vw, 44px) clamp(0px, 3vw, 40px) clamp(28px, 4vw, 44px) 0; border-bottom: 1px solid var(--line); }
.resource:nth-child(even) { padding-left: clamp(24px, 3vw, 40px); border-left: 1px solid var(--line); }
.resource-kind { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }
.resource-kind b { color: var(--blue); font-weight: 600; }
.resource h2 { font-size: var(--fs-lg); font-weight: 400; margin-bottom: 10px; }
.resource ul { color: var(--muted); font-size: var(--fs-sm); margin: 14px 0 24px; }
.resource li { margin-bottom: 4px; }
.resource .btn { align-self: flex-start; margin-top: auto; }
.resource-done { font-size: var(--fs-sm); color: var(--on-track); margin: 10px 0 0; min-height: 1.4em; }
@media (max-width: 760px) {
  .resource-grid { grid-template-columns: 1fr; }
  .resource:nth-child(even) { padding-left: 0; border-left: 0; }
}

.download-dialog { width: min(440px, calc(100% - 32px)); border: 0; border-radius: var(--radius); padding: 32px 28px 28px; color: var(--ink); background: var(--white); box-shadow: 0 24px 64px rgba(14, 34, 64, 0.25); }
.download-dialog::backdrop { background: rgba(14, 34, 64, 0.55); }
.download-dialog h2 { font-size: var(--fs-lg); margin: 4px 0 8px; }
.download-dialog .field { margin-top: 18px; }
.dl-kind { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.dl-lead { color: var(--muted); font-size: var(--fs-sm); }
.dialog-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.download-dialog form { position: relative; }
.download-dialog .form-actions { margin-top: 20px; }

/* Home page teaser */
.teaser { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px clamp(32px, 6vw, 96px); align-items: start; }
.teaser h2 { font-size: var(--fs-xl); }
.teaser ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.teaser li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.teaser li a { font-family: var(--font-serif); font-size: var(--fs-md); color: var(--blue); text-decoration: none; }
.teaser li a:hover { text-decoration: underline; }
.teaser li span { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
@media (max-width: 800px) { .teaser { grid-template-columns: 1fr; } }

/* ---- Shared bits for content pages ---------------------------------- */
.muted-loading { color: var(--muted); }
.project h3 a { text-decoration: none; color: inherit; }
.project h3 a:hover { text-decoration: underline; }
.project-photo-link { display: block; }
.case-link { display: inline-block; margin-left: 8px; font-weight: 600; color: var(--blue); }

.tool-banner { display: grid; gap: 4px; padding: 24px 28px; margin-bottom: clamp(32px, 5vw, 56px); background: var(--blue-soft); text-decoration: none; color: var(--ink); border-radius: var(--radius); }
.tool-banner:hover { color: var(--ink); filter: brightness(0.97); }
.tool-banner .resource-kind { margin: 0; }
.tool-title { font-family: var(--font-serif); font-size: var(--fs-lg); color: var(--blue); }
.tool-text { color: var(--muted); font-size: var(--fs-sm); }

/* ---- Case study ----------------------------------------------------- */
.case-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 0 clamp(40px, 6vw, 72px); padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.case-facts dt { font-size: var(--fs-sm); color: var(--muted); }
.case-facts dd { margin: 4px 0 0; font-family: var(--font-serif); font-size: var(--fs-md); color: var(--blue); }
.case-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(32px, 6vw, 96px); }
.case-body h2, .case-results-title { font-size: var(--fs-lg); margin-bottom: 12px; }
.case-body p { font-size: var(--fs-md); line-height: 1.6; }
.case-results-title { margin-top: clamp(48px, 7vw, 88px); }
.figures.case-results { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 56px); }
.figures.case-results dd { font-size: var(--fs-xl); }
@media (max-width: 800px) { .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .case-body, .figures.case-results { grid-template-columns: 1fr; } }

/* ---- Insights ------------------------------------------------------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px clamp(24px, 3vw, 40px); }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 18px; }
.post-card h2 { font-size: var(--fs-lg); font-weight: 400; margin: 6px 0 10px; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }
.post-card p { color: var(--muted); font-size: var(--fs-sm); }
.post-date { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.article-title { font-size: var(--fs-xl); max-width: 24ch; margin-bottom: 16px; }
.article-body { max-width: 680px; font-size: var(--fs-md); line-height: 1.7; }
.article-body h2 { font-size: var(--fs-lg); font-weight: 400; margin: 40px 0 12px; }
.article-body h3 { font-size: var(--fs-md); margin: 28px 0 8px; }
.article-body p, .article-body li { max-width: none; }
.article-body ul, .article-body ol { margin: 0 0 1em; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--blue); }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

/* ---- Careers -------------------------------------------------------- */
.jobs { border-top: 1px solid var(--line); }
.job { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 40px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.job h3 { font-size: var(--fs-lg); margin-bottom: 6px; }
.job p { color: var(--muted); }
.job dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.job dt { font-size: var(--fs-xs); color: var(--muted); }
.job dd { margin: 2px 0 0; font-size: var(--fs-sm); }
.form-title { font-size: var(--fs-xl); margin-bottom: 24px; }
@media (max-width: 760px) { .job { grid-template-columns: 1fr; } }

/* ---- Estimator ------------------------------------------------------ */
.estimator { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.estimator #estimate-form .field { margin-bottom: 22px; }
.estimate-result { background: var(--surface); padding: clamp(24px, 4vw, 40px); }
.estimate-result:focus { outline: none; }
.estimate-result dl { display: grid; gap: 24px; margin: 0; }
.estimate-result dt { font-size: var(--fs-sm); color: var(--muted); }
.estimate-result dd { margin: 4px 0 0; font-family: var(--font-serif); font-weight: 300; font-size: var(--fs-xl); color: var(--blue); line-height: 1.15; }
.est-sub { font-size: var(--fs-sm); color: var(--muted); margin: 4px 0 0; }
.est-note { font-size: var(--fs-sm); color: var(--muted); margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.estimate-lead { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.estimate-lead h2 { font-size: var(--fs-lg); margin-bottom: 6px; }
.estimate-lead > p { color: var(--muted); margin-bottom: 20px; }
@media (max-width: 860px) { .estimator { grid-template-columns: 1fr; } }

/* ---- FAQ ------------------------------------------------------------ */
.faq { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font-family: var(--font-serif); font-size: var(--fs-md); color: var(--blue); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font-family: var(--font-sans); font-size: 24px; font-weight: 300; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 40px 22px 0; color: var(--ink); }
.faq a { color: var(--blue); }

/* ---- Floating WhatsApp / Call (phones only) ------------------------- */
.quick-contact { display: none; }
@media (max-width: 900px) {
  .quick-contact { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(14, 34, 64, 0.08); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .quick-contact a { display: flex; align-items: center; justify-content: center; min-height: 46px; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; border-radius: var(--radius); }
  .qc-whatsapp { background: var(--whatsapp); color: #FFFFFF; }
  .qc-whatsapp:hover { color: #FFFFFF; }
  .qc-call { border: 1px solid var(--blue); color: var(--blue); }
  body.has-quick-contact { padding-bottom: 66px; }
}

/* ---- Legal text (privacy policy) ------------------------------------ */
.legal { max-width: 760px; }
.legal h2 { font-size: var(--fs-lg); margin: 48px 0 14px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }

/* ---- Sectors page -------------------------------------------------- */
.feature-row { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 32px clamp(32px, 6vw, 96px); align-items: center; padding: clamp(40px, 6vw, 80px) 0; }
.feature-row:nth-child(even) > img { order: 2; }
.feature-row > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.feature-row h2 { font-size: var(--fs-xl); margin-bottom: 8px; }
.feature-row .who { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 20px; }
.feature-row ul { color: var(--muted); font-size: var(--fs-sm); margin: 20px 0 24px; }
.feature-row li { margin-bottom: 4px; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } .feature-row:nth-child(even) > img { order: 0; } }

/* ---- Projects page ------------------------------------------------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: clamp(32px, 5vw, 56px); }
.filter-bar button {
  min-height: 40px; padding: 6px 16px; font: inherit; font-size: var(--fs-sm);
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.filter-bar button:hover { border-color: var(--blue); }
.filter-bar button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.filter-count { margin: 0 0 0 auto; font-size: var(--fs-sm); color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 80px) clamp(24px, 4vw, 56px); }
.project-grid .project img { aspect-ratio: 3 / 2; }
.project[hidden] { display: none; }
.project-facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 14px 0 0; font-size: var(--fs-sm); }
.project-facts div { display: flex; gap: 6px; }
.project-facts dt { color: var(--muted); }
.project-facts dd { margin: 0; }
@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; } }

/* ---- About page ---------------------------------------------------- */
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 0; }
.figures div { border-top: 1px solid var(--blue); padding-top: 18px; }
.figures dd { margin: 0; font-family: var(--font-serif); font-weight: 300; font-size: var(--fs-xl); color: var(--blue); line-height: 1; }
.figures dt { margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); }
.figures div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
@media (max-width: 800px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 6vw, 96px); }
.values h3 { font-size: var(--fs-lg); margin-bottom: 10px; }
.values p { color: var(--muted); }
@media (max-width: 700px) { .values { grid-template-columns: 1fr; } }

.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.people li { border-top: 1px solid var(--line); padding-top: 16px; }
.people b { display: block; font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-md); color: var(--blue); }
.people span { display: block; font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
@media (max-width: 900px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Contact page -------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px clamp(40px, 7vw, 112px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 28px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 4px; }
.field .hint { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 0;
  font: inherit; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--muted); border-radius: 0;
}
select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea { min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--blue); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
[aria-invalid="true"] { border-bottom: 2px solid var(--alert); }
.field-error { color: var(--alert); font-size: var(--fs-sm); margin-top: 6px; }
.field-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.form-note { font-size: var(--fs-sm); color: var(--muted); margin-top: 16px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 20px; padding: 16px 18px; background: var(--surface); border-left: 2px solid var(--on-track); }
.contact-aside h2 { font-size: var(--fs-lg); margin-bottom: 20px; }
.contact-aside dl { margin: 0; border-top: 1px solid var(--line); }
.contact-aside div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-aside dt { font-size: var(--fs-xs); color: var(--muted); }
.contact-aside dd { margin: 4px 0 0; font-family: var(--font-serif); font-size: var(--fs-md); color: var(--blue); overflow-wrap: anywhere; }
.contact-aside dd a { text-decoration: none; }
.contact-aside dd a:hover { text-decoration: underline; }
.contact-aside .btn { margin-top: 28px; width: 100%; }

/* ---- Footer ------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: clamp(56px, 7vw, 96px) 0 32px; font-size: var(--fs-sm); }
.site-footer a { color: var(--footer-strong); text-decoration: none; }
.site-footer a:hover { color: var(--footer-strong); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.footer-brand p { margin-top: 18px; max-width: 32ch; }
.footer-col h2 { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--footer-strong); letter-spacing: 0; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 24px; font-size: var(--fs-xs); }
.footer-base p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* =====================================================================
   MODERN TOUCHES
   Every effect below is progressive: browsers that don't support it,
   and visitors who ask their device for reduced motion, get the plain
   site. Nothing here hides content until JavaScript runs.
   ===================================================================== */

/* Smooth cross-fade between pages (Chrome, Edge; others load normally). */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }

/* Smart header: tucks away on scroll down, returns on scroll up. */
.site-header { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 30px var(--shadow); }
.site-header.is-hidden { transform: translateY(-100%); }

/* Headline rises in word by word (one moment per page). */
.split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .12em; margin-bottom: -.12em; }
.split .w > span { display: inline-block; transform: translateY(105%); animation: word-up .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
@keyframes word-up { to { transform: none; } }
.hero-intro > div { animation: fade-in .8s .55s both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.hero-media .wide { animation: reveal 1.1s .18s cubic-bezier(.2, .7, .2, 1) both, settle-slow 2.4s .18s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes settle-slow { from { scale: 1.06; } to { scale: 1; } }

/* Project photos: framed, gentle zoom on hover, case-study badge. */
.photo-frame { position: relative; display: block; overflow: hidden; background: var(--surface); }
.photo-frame img { transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.project:hover .photo-frame img, .project:focus-within .photo-frame img { transform: scale(1.045); }
.cs-badge { position: absolute; left: 14px; bottom: 14px; padding: 5px 11px; background: var(--badge-bg); color: var(--blue); font-size: var(--fs-xs); font-weight: 600; border-radius: 999px; pointer-events: none; }
.post-card > a:first-child { display: block; overflow: hidden; margin-bottom: 18px; }
.post-card > a:first-child img { margin: 0; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.post-card:hover > a:first-child img { transform: scale(1.045); }

/* Buttons and links: crisper feedback. */
.btn { transition: background-color .2s, color .2s, transform .15s ease; }
.btn:active { transform: translateY(1px); }
.text-link { transition: text-decoration-color .25s, color .2s; }

/* Loading placeholders that shimmer instead of "Loading…". */
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--line) 45%, var(--surface) 90%); background-size: 220% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 2px; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.sk-img { aspect-ratio: 3 / 2; margin-bottom: 18px; }
.sk-hero { height: clamp(240px, 42vw, 560px); }
.sk-line { height: 14px; margin: 10px 0; }
.sk-title { height: 30px; width: 70%; margin: 12px 0 16px; }
.sk-short { width: 45%; }

/* Reading progress bar on articles (shown only where supported). */
.reading-progress { display: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Scroll-driven effects: CSS only, no JavaScript, no layout shift. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .page-image, .bleed { overflow: hidden; }
    .page-image img, .bleed img, .work-feature .photo-frame img {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    @keyframes settle { from { scale: 1.12; } to { scale: 1; } }

    .stages li { position: relative; border-top-color: var(--line); }
    .stages li::after {
      content: ""; position: absolute; top: -1px; left: 0; right: 24px; height: 2px; background: var(--blue);
      transform-origin: left center; animation: grow-x linear both; animation-timeline: view(); animation-range: entry 30% cover 50%;
    }
    @keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

    .reading-progress {
      display: block; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: var(--blue);
      transform-origin: left center; animation: grow-x linear both; animation-timeline: scroll(root);
    }
  }
}

/* ---- Reduced motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .split .w > span { transform: none !important; }
  .site-header.is-hidden { transform: none; }
}

/* ---- Dark mode details ---------------------------------------------- */
.photo-frame img, .page-image img, .bleed img, .feature-row > img, .hero-media img, .split-media > img, .post-card img, .ba img { filter: var(--img-filter); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 12px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--blue); cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.theme-toggle:hover { border-color: var(--blue); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.header-inner .site-nav { margin-left: auto; }
@media (max-width: 900px) {
  .theme-toggle { margin-left: auto; margin-right: 8px; order: 1; }
  .nav-toggle { order: 2; }
}

/* ---- Before / after slider (case studies) ---------------------------- */
.ba { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface); --pos: 50%; user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: var(--pos); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25); pointer-events: none; display: flex; align-items: center; justify-content: center; color: #16325C; font-size: 16px; letter-spacing: 2px; }
.ba-label { position: absolute; top: 14px; padding: 4px 10px; border-radius: 999px; background: var(--badge-bg); color: var(--blue); font-size: var(--fs-xs); font-weight: 600; pointer-events: none; }
.ba-label.before { left: 14px; }
.ba-label.after { right: 14px; }
.ba input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; min-height: 0; border: 0; }
.ba input[type=range]:focus-visible + .ba-line + .ba-knob { outline: 2px solid var(--blue); outline-offset: 3px; }
.ba-caption { font-size: var(--fs-sm); color: var(--muted); margin-top: 10px; }

/* ---- Client logo strip (home) --------------------------------------- */
.clients-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.clients-head h2 { font-size: var(--fs-lg); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: clamp(40px, 6vw, 88px); width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - clamp(20px, 3vw, 44px))); } }
.client { display: flex; align-items: center; height: 56px; flex: none; }
.client img { max-height: 44px; max-width: 160px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.client:hover img { filter: none; opacity: 1; }
:root[data-theme="dark"] .client img { filter: grayscale(1) invert(1) brightness(1.4); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .client img { filter: grayscale(1) invert(1) brightness(1.4); } }
.client span { font-family: var(--font-serif); font-size: var(--fs-md); color: var(--muted); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { flex-wrap: wrap; width: auto; }
  .marquee-track [aria-hidden="true"] { display: none; }
}
