/* Viro Software — navy stage, yellow mark, white page.
   Navy carries structure and the dark moments (hero, contact, footer), white
   carries reading, yellow is the signature: it fills buttons and chips and
   throws one hard offset shadow behind whatever the page wants you to open.
   Yellow never sets type on white; anything written on yellow is navy. */

:root {
    color-scheme: light;

    --page: #ffffff;
    --page-alt: #eaeff7;
    --surface: #ffffff;
    --surface-sunk: #f3f6fb;

    --navy: #0b1d3a;
    --navy-soft: #1a3563;
    --navy-deep: #07142a;
    --navy-wash: #e9eff9;

    --ink: #0b1d3a;
    --ink-2: #3d4f6c;
    --muted: #667792;

    --line: #d9e0ec;
    --line-strong: #b9c6db;

    --brand: #ffc81f;
    --brand-deep: #f2b705;
    --brand-wash: #fff4cc;
    --brand-edge: #0b1d3a;

    --ok: #0f7a5f;

    --ff-head: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ff: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ff-alt: "Space Grotesk", "Cairo", system-ui, sans-serif;

    --fs-xs: 0.8rem;
    --fs-sm: 0.9rem;
    --fs-base: 1rem;
    --fs-md: 1.08rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.55rem;

    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 72px;

    /* One corner radius for the whole site. The old size and pill tokens
       stay as aliases so no rule needs to know which one it uses. */
    --r: 16px;
    --r-sm: var(--r);
    --r-md: var(--r);
    --r-lg: var(--r);
    --r-pill: var(--r);

    --nav-h: 68px;

    --shadow-sm: 0 1px 2px rgba(11, 29, 58, .06);
    --shadow-md: 0 8px 24px rgba(11, 29, 58, .08);
    --shadow-lg: 0 18px 44px rgba(11, 29, 58, .16);
    --shadow-brand: 4px 4px 0 var(--navy);
    --offset: 6px 6px 0 var(--brand);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink-2);
    font-family: var(--ff);
    font-size: var(--fs-base);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    margin: 0;
    color: var(--ink);
    font-family: var(--ff-head);
    line-height: 1.3;
    text-wrap: balance;
    font-weight: 700;
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
    border-radius: var(--r);
}

.hero :focus-visible,
.section-contact :focus-visible,
.site-footer :focus-visible {
    outline-color: #fff;
}

.container {
    width: min(1180px, 100% - 40px);
    margin-inline: auto;
}

.section {
    padding-block: clamp(64px, 8vw, 112px);
    position: relative;
}

.section-portfolio,
.section-services,
.section-faq {
    background: var(--surface);
}

.section-about,
.section-posts,
.section-testimonials {
    background: var(--surface-sunk);
}

.section-calculator {
    background: var(--navy-wash);
}

.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex: none;
}

.icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Reveal only once the script is alive. Without the body class the content
   stays visible, so a script failure costs the animation, not the page. */
.reveal {
    transition: opacity .55s ease, transform .55s ease;
}

body.hero-ready .reveal:not(.show) {
    opacity: 0;
    transform: translateY(18px);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    body.hero-ready .reveal:not(.show) {
        opacity: 1;
        transform: none;
    }
}

/* The old glow-and-grid backdrop is gone; the markup stays on pages that
   still carry it. */
.site-backdrop {
    display: none;
}

/* ---- Buttons ----------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 12px 26px;
    border: 2px solid var(--navy);
    border-radius: var(--r-pill);
    font-family: var(--ff-head);
    font-weight: 600;
    font-size: var(--fs-sm);
    line-height: 1.5;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
    text-align: center;
}

.btn-primary {
    background: var(--brand);
    color: var(--navy);
    box-shadow: 4px 4px 0 var(--navy);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--navy);
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--navy);
}

.btn-ghost {
    background: transparent;
    color: var(--navy);
}

.btn-ghost:hover {
    background: var(--navy);
    color: #fff;
}


/* ---- Navigation -------------------------------------------------------- */

.top-nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    margin-inline: auto;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    height: var(--nav-h);
    color: #fff;
}

/* Full-bleed bar behind a container-wide row. */
.top-nav::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline: -100vmax;
    z-index: -1;
    background: var(--navy);
    border-block-end: 1px solid rgba(255, 255, 255, .08);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-family: var(--ff-head);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    white-space: nowrap;
}

.brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: auto;
}

.nav-links a {
    position: relative;
    padding: 8px 12px;
    font-family: var(--ff-head);
    font-size: .84rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .78);
    transition: color .16s ease;
    border-radius: var(--r-pill);
}

.nav-links a::after {
    content: "";
    position: absolute;
    inset-inline: 12px;
    inset-block-end: 2px;
    height: 3px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links a[href="privacy.html"] {
    display: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.lang-switch {
    display: inline-flex;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: var(--r-pill);
}

.lang-btn {
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-family: var(--ff-head);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, .78);
    transition: background .16s ease, color .16s ease;
}

.lang-btn.active {
    background: var(--brand);
    color: var(--navy);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--r);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .25s ease, opacity .25s ease;
}

/* Static nav on the project and legal pages: no toggle, no overlay. */
.nav-links-static {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    flex-direction: row !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    height: auto !important;
}

/* ---- Hero -------------------------------------------------------------- */

.hero {
    position: relative;
    background: var(--navy);
    color: #fff;
    padding-block-start: var(--nav-h);
}

/* Home: a navy stage cut to a V — the V of Viro — inside a yellow field. */
.hero-home {
    background: var(--brand);
    padding-block-end: 14px;
}

.hero-stage {
    background: var(--navy);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 72px), 50% 100%, 0 calc(100% - 72px));
    padding-block-end: 72px;
}

.hero-shell {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    align-items: center;
    gap: clamp(32px, 6vw, 80px);
    padding-block: clamp(40px, 6vw, 88px) clamp(32px, 4vw, 56px);
    position: relative;
}

.hero-copy {
    order: -1;
}

.hero-copy h1 {
    color: #fff;
    font-size: clamp(2.1rem, 4.5vw, 3.6rem);
    line-height: 1.22;
    font-weight: 700;
}

/* script.js splits the headline into two blocks at the accent word. The two
   lines carry different weight and size, not just a color change, so the
   hierarchy reads even in grayscale. */
.hero-copy .title-line,
.hero-copy .accent-line {
    display: block;
}

.hero-copy .title-line {
    font-weight: 500;
    opacity: .85;
}

.hero-copy .accent-line {
    margin-block-start: .12em;
    color: var(--brand);
    font-size: 1.1em;
    font-weight: 800;
    letter-spacing: -.01em;
}

.hero-text {
    margin-block-start: var(--sp-5);
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(255, 255, 255, .78);
    max-width: 54ch;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    margin-block-start: var(--sp-6);
}

.hero .btn-primary {
    border-color: var(--brand);
    box-shadow: 4px 4px 0 rgba(255, 255, 255, .85);
}

.hero .btn-primary:hover {
    box-shadow: 6px 6px 0 #fff;
}

.hero .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
}

.hero .btn-ghost:hover {
    background: #fff;
    border-color: #fff;
    color: var(--navy);
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-6);
    margin: var(--sp-7) 0 0;
    padding: var(--sp-4) 0 0;
    list-style: none;
    border-block-start: 1px solid rgba(255, 255, 255, .18);
    font-family: var(--ff-head);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: rgba(255, 255, 255, .86);
}

.hero-facts li {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.hero-facts li::before {
    content: "";
    width: 9px;
    height: 9px;
    background: var(--brand);
    flex: none;
}

.hero-visual-frame {
    position: relative;
    z-index: 0;
    aspect-ratio: 4 / 3.3;
    background: var(--navy-soft);
    box-shadow: -22px 22px 0 var(--brand);
    border-radius: var(--r-lg);
    overflow: hidden;
}

html[dir="ltr"] .hero-visual-frame {
    box-shadow: 22px 22px 0 var(--brand);
}

.hero-visual-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-visual-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11, 29, 58, .5), rgba(11, 29, 58, 0) 34%);
    pointer-events: none;
}

.hero-logo-wall {
    position: absolute;
    z-index: 1;
    inset-block-end: var(--sp-4);
    inset-inline-start: var(--sp-4);
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 8px 14px 8px 10px;
    background: var(--brand);
    color: var(--navy);
}

.hero-logo-wall img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.hero-logo-wall-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-family: var(--ff-head);
}

.hero-logo-wall-copy strong {
    font-size: .95rem;
}

.hero-logo-wall-copy span {
    font-size: .7rem;
    font-weight: 500;
}

.hero-beam,
.hero-scroll-indicator {
    display: none;
}

/* Hero app showcase: four real product screenshots crossfading in the same
   frame that used to hold one static illustration. */
.hero-app-shot {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: heroAppFade 16s infinite;
}

.hero-app-shot-1 { animation-delay: 0s; }
.hero-app-shot-2 { animation-delay: 4s; }
.hero-app-shot-3 { animation-delay: 8s; }
.hero-app-shot-4 { animation-delay: 12s; }

@keyframes heroAppFade {
    0%, 3% { opacity: 0; }
    6%, 21% { opacity: 1; }
    24%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-app-shot {
        animation: none;
        opacity: 0;
    }

    .hero-app-shot-1 {
        opacity: 1;
    }
}

/* Stats bar: the proof, one scroll past the pitch. Sits on the brand yellow
   so it reads as part of the hero stage, not a separate section. */
.hero-stats-bar {
    background: var(--brand);
    border-block-end: 2px solid var(--navy);
}

.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-block: var(--sp-4);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
    padding-inline: var(--sp-3);
}

.hero-stat + .hero-stat {
    border-inline-start: 1px solid rgba(11, 29, 58, .25);
}

.hero-stat strong {
    font-family: var(--ff-head);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.hero-stat span {
    font-size: var(--fs-sm);
    color: var(--navy);
    opacity: .78;
}

/* Project and legal pages: a straight navy header with a yellow rule. */
.hero-compact {
    padding-block-start: calc(var(--nav-h) + var(--sp-7));
    padding-block-end: var(--sp-7);
    border-block-end: 8px solid var(--brand);
}

.hero-compact h1 {
    color: #fff;
}

.hero-compact .hero-text {
    color: rgba(255, 255, 255, .78);
    max-width: 62ch;
}

.hero-compact .section-label {
    color: var(--brand);
}

.hero-compact .section-label::before {
    background: var(--brand);
}

.hero-compact .policy-updated,
.hero-compact .project-updated {
    color: rgba(255, 255, 255, .6);
}

.hero-compact .btn-primary {
    border-color: var(--brand);
}


/* ---- Section headings -------------------------------------------------- */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    margin-block-end: var(--sp-3);
    font-family: var(--ff-head);
    font-size: .9rem;
    font-weight: 600;
    color: var(--navy-soft);
}

.section-label::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--brand);
    outline: 2px solid var(--navy);
    outline-offset: -2px;
    flex: none;
}

.section h2,
.section-heading-centered {
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
    line-height: 1.25;
}

.section-text {
    margin-block-start: var(--sp-4);
    max-width: 60ch;
    color: var(--ink-2);
}

.section-label-centered,
.section-heading-centered,
.section-text-centered {
    text-align: start;
}

.section-underline {
    display: none;
}

/* ---- About ------------------------------------------------------------- */

.about-copy {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    column-gap: clamp(32px, 6vw, 88px);
    align-items: start;
}

.about-copy h2 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.about-copy .section-text,
.about-copy .stats {
    grid-column: 2;
}

.about-copy .section-label {
    display: none;
}

.about-copy h2 {
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: 1.2;
}

.about-copy .section-text {
    margin-block-start: 0;
    font-size: var(--fs-md);
}

/* The figures sit on one ruled line, not in boxes. */
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-block-start: var(--sp-6);
    border-block-start: 2px solid var(--navy);
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--sp-4) var(--sp-4) 0 0;
}

.stat-card + .stat-card {
    padding-inline-start: var(--sp-4);
    border-inline-start: 1px solid var(--line-strong);
}

.stat-card strong {
    font-family: var(--ff-head);
    font-size: clamp(2.2rem, 4.4vw, 3.3rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.stat-card span {
    font-size: var(--fs-sm);
    color: var(--muted);
}

/* ---- Services ---------------------------------------------------------- */

.services-reference .section-label {
    margin-block-end: var(--sp-3);
}

.service-list {
    margin-block-start: var(--sp-7);
    border-block-start: 2px solid var(--navy);
}

.service-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-5) var(--sp-4);
    border-block-end: 1px solid var(--line-strong);
    transition: background .18s ease;
}

.service-row:hover {
    background: var(--brand-wash);
}

.service-row-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    background: var(--navy);
    color: var(--brand);
    font-size: 1.35rem;
    transition: transform .18s ease, box-shadow .18s ease;
    border-radius: var(--r);
}

.service-row:hover .service-row-icon {
    transform: translate(-3px, -3px);
    box-shadow: 4px 4px 0 var(--brand);
}

.service-row h3 {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.service-row p {
    color: var(--ink-2);
    max-width: 52ch;
}


/* ---- Portfolio --------------------------------------------------------- */

.portfolio-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-6);
    align-items: end;
    margin-block-end: var(--sp-6);
}

.portfolio-head .section-text {
    margin-block-start: 0;
    justify-self: end;
}

.sector-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-block-end: var(--sp-6);
}

.sector-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1.5px solid var(--navy);
    border-radius: var(--r-pill);
    font-family: var(--ff-head);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--navy);
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.sector-chip:hover {
    background: var(--brand-wash);
}

.sector-chip.is-active {
    background: var(--navy);
    color: #fff;
}

.sector-count {
    font-size: var(--fs-xs);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.sector-chip.is-active .sector-count {
    color: var(--brand);
}

/* The stage is only a container: both the static sync and renderProjects()
   put the cards inside a .project-grid, so the grid lives there. */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sp-6) var(--sp-5);
}

/* The first project is the one the page leads with: it takes two columns and
   lays its image beside its words. */
.project-grid:not(.is-collapsed) > :first-child {
    grid-column: span 2;
}

.project-card-link {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 2px solid var(--navy);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    height: 100%;
}

.project-card-link:hover {
    transform: translate(-3px, -3px);
    box-shadow: var(--offset);
}

.project-grid:not(.is-collapsed) > :first-child.project-card-link {
    flex-direction: row;
}

.project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-media {
    flex: 1.1;
    border-block-end: 0;
    border-inline-end: 2px solid var(--navy);
}

.project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-media img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 260px;
}

.project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-body {
    flex: 1;
    padding: var(--sp-6);
    justify-content: center;
}

.project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-title {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-text {
    -webkit-line-clamp: 5;
}

.project-card-media {
    display: block;
    background: var(--navy-wash);
    border-block-end: 2px solid var(--navy);
}

.project-card-media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.project-card-body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    padding: var(--sp-5);
    flex: 1;
}

.project-card-sector {
    align-self: flex-start;
    padding: 1px 10px;
    background: var(--brand);
    font-family: var(--ff-head);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--navy);
}

.project-card-title {
    font-family: var(--ff-head);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
}

.project-card-text {
    font-size: var(--fs-sm);
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-updated {
    font-size: var(--fs-xs);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.project-card-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-block-start: auto;
    padding-block-start: var(--sp-3);
}

.project-card-store {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 10px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--navy-soft);
}

/* Static cards rendered by sync-static-content.py before the script runs.
   They carry the same hooks the script reads back, so they are styled to
   match the live card rather than given a look of their own. */
.project-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}

.project-card-link > .project-card {
    padding: 0;
    border: 0;
    background: none;
}

.project-card > h3 {
    order: 2;
    padding-inline: var(--sp-5);
    padding-block-start: var(--sp-4);
    font-size: var(--fs-lg);
    line-height: 1.35;
}

.project-description {
    order: 3;
    padding: 0 var(--sp-5);
    font-size: var(--fs-sm);
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card > .project-card-updated {
    order: 4;
    padding: 0 var(--sp-5) var(--sp-5);
}

.project-images {
    order: 1;
    background: var(--navy-wash);
    border-block-end: 2px solid var(--navy);
}

.project-images:empty {
    display: none;
}

.project-images img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}


.project-testimonial,
.project-card-quote {
    order: 4;
    margin: 0;
    padding: var(--sp-4);
    border-block-start: 1px solid var(--line);
    background: var(--surface-sunk);
}

.project-testimonial blockquote,
.project-card-testimonial {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--ink-2);
}

.project-testimonial figcaption {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-block-start: var(--sp-3);
}

.project-card-client,
.project-testimonial figcaption strong {
    font-size: var(--fs-sm);
    color: var(--ink);
}

.project-card-client-role,
.project-testimonial figcaption span span {
    display: block;
    font-size: var(--fs-xs);
    color: var(--muted);
}

.client-logo,
.project-card-client-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: var(--r);
    background: var(--surface);
    padding: 3px;
    border: 1px solid var(--line);
}

.store-links,
.store-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
}

.store-row-label {
    font-size: var(--fs-xs);
    color: var(--muted);
}

.store-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--navy);
}

.store-link:hover {
    border-color: var(--brand-edge);
    background: var(--brand-wash);
}


/* ---- Posts ------------------------------------------------------------- */

.posts-showcase {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
    gap: clamp(32px, 6vw, 88px);
    align-items: start;
}

.posts-intro {
    order: -1;
    position: sticky;
    inset-block-start: calc(var(--nav-h) + 28px);
}

.posts-cta {
    margin-block-start: var(--sp-5);
}

/* News as a ledger: date in the margin, title and text beside it. */
.posts-grid {
    border-block-start: 2px solid var(--navy);
}

.post-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    column-gap: var(--sp-5);
    padding: var(--sp-5) 0;
    border-block-end: 1px solid var(--line-strong);
}

.post-card > * {
    grid-column: 2;
}

.post-card time,
.post-card .post-card-footer {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    padding-block-start: 4px;
    font-family: var(--ff-head);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.post-card h3 {
    font-size: var(--fs-lg);
}

.post-card p {
    margin-block-start: var(--sp-2);
    color: var(--ink-2);
    font-size: var(--fs-sm);
}

.post-card .post-image {
    grid-row: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 2px solid var(--navy);
    border-radius: var(--r-md);
    margin-block-end: var(--sp-3);
}

/* ---- FAQ --------------------------------------------------------------- */

.faq-shell {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr);
    gap: clamp(32px, 6vw, 88px);
    align-items: start;
}

.faq-intro {
    position: sticky;
    inset-block-start: calc(var(--nav-h) + 28px);
}

.intro-card {
    margin-block-start: var(--sp-6);
    padding: var(--sp-5);
    background: var(--brand);
    border: 2px solid var(--navy);
    box-shadow: 6px 6px 0 var(--navy);
}

.intro-card strong {
    font-family: var(--ff-head);
    font-size: var(--fs-lg);
    color: var(--navy);
}

.intro-card p {
    margin-block: var(--sp-2) var(--sp-4);
    color: var(--navy);
}

.intro-card .btn-ghost {
    border-color: var(--navy);
    color: var(--navy);
}

.intro-card .btn-ghost:hover {
    background: var(--navy);
    color: #fff;
}

.faq-list {
    border-block-start: 2px solid var(--navy);
}

.faq-item {
    border-block-end: 1px solid var(--line-strong);
    border-radius: var(--r-md);
}

.faq-item summary {
    position: relative;
    padding: var(--sp-4) 40px var(--sp-4) 0;
    font-family: var(--ff-head);
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 0;
    translate: 0 -50%;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: var(--navy);
    color: var(--brand);
    font-family: var(--ff-head);
    font-size: 1.25rem;
    line-height: 1;
    transition: background .16s ease, color .16s ease;
}

.faq-item[open] summary::after {
    content: "\2212";
    background: var(--brand);
    color: var(--navy);
}

.faq-item p {
    padding: 0 40px var(--sp-5) 0;
    color: var(--ink-2);
    max-width: 62ch;
}

/* ---- Contact ----------------------------------------------------------- */

.section-contact {
    background: var(--navy);
    color: rgba(255, 255, 255, .8);
}

.section-contact h2,
.section-contact .section-heading-centered {
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.section-contact .section-label {
    color: var(--brand);
}

.section-contact .section-label::before {
    outline-color: var(--brand);
}

.section-contact .section-text {
    color: rgba(255, 255, 255, .78);
}

.contact-divider {
    display: none;
}

.contact-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-4);
    margin: var(--sp-7) 0 0;
    padding: 0;
    list-style: none;
}

.contact-board li {
    display: flex;
}

.contact-board li:has(a[href*="wa.me"]) {
    order: -1;
}

.contact-item-wide {
    grid-column: 1 / -1;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    width: 100%;
    padding: var(--sp-4) var(--sp-5);
    border: 1.5px solid rgba(255, 255, 255, .22);
    border-radius: var(--r-md);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.contact-card:hover {
    transform: translate(-3px, -3px);
    border-color: var(--brand);
    box-shadow: 5px 5px 0 var(--brand);
}

.contact-card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: none;
    background: var(--brand);
    color: var(--navy);
    font-size: 1.2rem;
}

.contact-card-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.contact-card-copy strong {
    font-family: var(--ff-head);
    font-size: var(--fs-md);
    color: #fff;
}

.contact-card-copy span {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, .7);
}

/* WhatsApp is the way most clients start, so it is the one filled card. */
.contact-card[href*="wa.me"] {
    background: var(--brand);
    border-color: var(--brand);
}

.contact-card[href*="wa.me"] .contact-card-icon {
    background: var(--navy);
    color: var(--brand);
}

.contact-card[href*="wa.me"] strong,
.contact-card[href*="wa.me"] span {
    color: var(--navy);
}

.contact-card[href*="wa.me"]:hover {
    box-shadow: 5px 5px 0 #fff;
    border-color: #fff;
}

/* ---- Footer ------------------------------------------------------------ */

.site-footer {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, .7);
    padding-block: var(--sp-7) var(--sp-5);
    border-block-start: 8px solid var(--brand);
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
    padding-block-end: var(--sp-6);
    border-block-end: 1px solid rgba(255, 255, 255, .14);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    color: #fff;
}

.footer-brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.footer-brand strong {
    display: block;
    font-family: var(--ff-head);
    font-size: var(--fs-lg);
    color: #fff;
}

.footer-brand span {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, .62);
}

.footer-manifesto {
    max-width: 44ch;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, .7);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding-block-start: var(--sp-5);
    font-size: var(--fs-sm);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
}

.footer-social {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: var(--r);
    color: #fff;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.footer-social:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--navy);
}

.footer-link {
    color: rgba(255, 255, 255, .8);
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-underline-offset: 4px;
}

.footer-link:hover {
    color: #fff;
}

/* The project and legal pages use a plainer footer. */
footer:not(.site-footer) {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, .7);
    padding-block: var(--sp-6);
    border-block-start: 8px solid var(--brand);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
}

.footer-copy {
    font-size: var(--fs-sm);
}


/* ---- Cost estimator ---------------------------------------------------- */

.section-calculator {
    background:
        linear-gradient(180deg, var(--page-alt), var(--page));
}

.calc-shell {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: clamp(28px, 5vw, 56px);
    align-items: start;
}

.calc-intro h2 {
    font-size: clamp(1.5rem, 3.2vw, 2rem);
}

.intro-points {
    list-style: none;
    margin: var(--sp-5) 0 0;
    padding: 0;
    display: grid;
    gap: var(--sp-2);
}

.intro-points li {
    position: relative;
    padding-inline-start: 28px;
    font-size: var(--fs-sm);
    color: var(--ink-2);
}

.intro-points li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: .62em;
    width: 14px;
    height: 7px;
    border-left: 2.5px solid var(--brand-deep);
    border-bottom: 2.5px solid var(--brand-deep);
    transform: rotate(-45deg);
}

.calc-panel {
    padding: clamp(18px, 3vw, 28px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}

.calc-group + .calc-group {
    margin-block-start: var(--sp-5);
}

.calc-legend {
    margin: 0 0 var(--sp-3);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.calc-options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
}

.calc-option {
    padding: 9px 16px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-pill);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.calc-option:hover {
    border-color: var(--navy);
}

.calc-option.is-active {
    background: var(--brand);
    border-color: var(--brand-edge);
    color: var(--navy);
}

/* The result sits on navy so the yellow figure has somewhere to be loud. */
.calc-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--sp-4);
    align-items: center;
    margin-block-start: var(--sp-6);
    padding: var(--sp-5);
    background: var(--navy);
    border-radius: var(--r-md);
}

.calc-figure-label {
    display: block;
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, .66);
}

.calc-figure-value {
    display: block;
    margin-block-start: 2px;
    font-family: var(--ff-alt);
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 700;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    text-align: start;
}

.calc-figure-value.is-text {
    font-family: var(--ff);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.5;
    color: #ffffff;
    direction: inherit;
}

.calc-cta {
    grid-column: 1 / -1;
    justify-self: stretch;
}


/* ---- Testimonials ------------------------------------------------------ */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: var(--sp-4);
    margin-block-start: var(--sp-6);
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-5);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: var(--sp-5);
    height: 3px;
    border-radius: var(--r-pill);
    background: var(--brand);
}

.testimonial-card blockquote {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--ink-2);
}

.testimonial-card figcaption {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-block-start: auto;
}

.testimonial-project {
    font-size: var(--fs-xs);
    color: var(--muted);
}


/* ---- Project detail and legal pages ------------------------------------ */

.legal-hero h1,
.hero-compact h1 {
    font-size: clamp(1.7rem, 4.4vw, 2.6rem);
}

.project-updated {
    margin-block-start: var(--sp-3);
    font-size: var(--fs-sm);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-block-start: var(--sp-5);
}

.legal-card {
    padding: clamp(20px, 4vw, 36px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.legal-card h2 {
    margin-block-start: var(--sp-5);
    font-size: var(--fs-lg);
}

.legal-card h2:first-child {
    margin-block-start: 0;
}

.legal-card p {
    margin-block-start: var(--sp-3);
    color: var(--ink-2);
}

.policy-list {
    margin: var(--sp-3) 0 0;
    padding-inline-start: var(--sp-5);
    color: var(--ink-2);
}

.policy-list li {
    margin-block-start: var(--sp-2);
}

.policy-updated {
    margin-block-start: var(--sp-5);
    font-size: var(--fs-sm);
    color: var(--muted);
}

.work-detail {
    max-width: 760px;
    margin-inline: auto;
}

.work-detail p {
    margin-block-start: var(--sp-4);
    color: var(--ink-2);
}

.work-detail-image {
    margin-block-start: var(--sp-5);
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

/* ---- Loading and empty states ------------------------------------------ */

.skeleton,
.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-4);
    display: grid;
    gap: var(--sp-3);
}

.skeleton-media,
.skeleton-line,
.skeleton-title {
    border-radius: var(--r-sm);
    background: linear-gradient(90deg, var(--surface-sunk), var(--page-alt), var(--surface-sunk));
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.skeleton-media {
    aspect-ratio: 16 / 10;
}

.skeleton-title {
    height: 18px;
    width: 70%;
}

.skeleton-line {
    height: 11px;
}

.skeleton-line.short {
    width: 48%;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-media,
    .skeleton-line,
    .skeleton-title {
        animation: none;
    }
}

.empty-state {
    grid-column: 1 / -1;
    padding: var(--sp-7) var(--sp-5);
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-md);
}


/* ---- Retuned estimator, testimonials and legal pages ------------------ */

.calc-panel {
    background: var(--surface);
    border: 2px solid var(--navy);
    border-radius: var(--r-md);
    box-shadow: 8px 8px 0 var(--brand);
}

.calc-chip,
.calc-option,
.calc-pill {
    border-radius: var(--r-pill);
}

.calc-result {
    border-radius: var(--r-md);
}

.testimonial-card {
    border: 2px solid var(--navy);
    border-radius: var(--r-md);
    box-shadow: none;
}

.legal-card {
    border: 2px solid var(--navy);
    border-radius: var(--r-lg);
    box-shadow: 8px 8px 0 var(--brand);
}

.work-detail-image {
    border: 2px solid var(--navy);
    border-radius: var(--r-lg);
    box-shadow: 8px 8px 0 var(--brand);
}


/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 1040px) {
    .nav-links a {
        padding: 8px 8px;
        font-size: var(--fs-xs);
    border-radius: var(--r-pill);
}

    .nav-links a::after {
        inset-inline: 8px;
    }

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-grid:not(.is-collapsed) > :first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    :root {
        --nav-h: 62px;
    }

    .nav-toggle {
        display: flex;
        order: 3;
        margin-inline-start: auto;
    border-radius: var(--r);
}

    .nav-actions {
        order: 2;
    }

    .nav-links {
        position: fixed;
        inset-block-start: 0;
        inset-inline-end: 0;
        z-index: 60;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: min(310px, 86vw);
        height: 100dvh;
        margin: 0;
        padding: 84px var(--sp-5) var(--sp-5);
        background: var(--navy);
        border-inline-start: 4px solid var(--brand);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 12px 14px;
        font-size: var(--fs-base);
        border-block-end: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--r-pill);
}

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(255, 255, 255, .08);
        color: var(--brand);
    }

    .nav-links a[href="privacy.html"] {
        display: block;
    }

    body.nav-menu-open {
        overflow: hidden;
    }

    /* Below .top-nav, never above it: the panel lives inside that fixed bar,
       whose own z-index makes a stacking context the panel cannot escape. */
    body.nav-menu-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 40;
        background: rgba(7, 20, 42, .6);
    }

    .hero-shell,
    .about-reference,
    .posts-showcase,
    .calc-shell,
    .faq-shell,
    .portfolio-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-stage {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 50% 100%, 0 calc(100% - 40px));
        padding-block-end: 40px;
    }

    .hero-visual-frame {
        box-shadow: -14px 14px 0 var(--brand);
    border-radius: var(--r-lg);
}

    html[dir="ltr"] .hero-visual-frame {
        box-shadow: 14px 14px 0 var(--brand);
    }

    .hero-visual {
        margin-inline: 14px;
    }

    .about-copy {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-copy h2,
    .about-copy .section-text,
    .about-copy .stats {
        grid-column: 1;
        grid-row: auto;
    }

    .about-copy .section-text {
        margin-block-start: var(--sp-4);
    }

    .portfolio-head .section-text {
        justify-self: start;
    }

    .posts-intro,
    .faq-intro {
        position: static;
    }

    .service-row {
        grid-template-columns: 52px minmax(0, 1fr);
        row-gap: var(--sp-2);
        padding-inline: 0;
    }

    .service-row p {
        grid-column: 2;
    }
}

@media (max-width: 700px) {
    .project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-grid:not(.is-collapsed) > :first-child.project-card-link {
        flex-direction: column;
    }

    .project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-media {
        border-inline-end: 0;
        border-block-end: 2px solid var(--navy);
    }

    .project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-media img {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .project-grid:not(.is-collapsed) > :first-child.project-card-link .project-card-body {
        padding: var(--sp-5);
    }
}

@media (max-width: 560px) {
    .container {
        width: min(1180px, 100% - 32px);
    }

    .brand span {
        display: none;
    }

    .stats {
        grid-template-columns: minmax(0, 1fr);
        border-block-start: 0;
    }

    .stat-card,
    .stat-card + .stat-card {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        padding: var(--sp-3) 0;
        border-inline-start: 0;
        border-block-start: 1px solid var(--line-strong);
    }

    .stat-card:first-child {
        border-block-start: 2px solid var(--navy);
    }

    .post-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-card > *,
    .post-card time,
    .post-card .post-card-footer {
        grid-column: 1;
        grid-row: auto;
    }

    .post-card .post-card-footer {
        order: -1;
        padding-block-end: var(--sp-2);
    }

    .testimonials-grid,
    .contact-board {
        grid-template-columns: minmax(0, 1fr);
    }

    .calc-result {
        grid-template-columns: minmax(0, 1fr);
        text-align: start;
    border-radius: var(--r-md);
}

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-cta .btn {
        flex: 1 1 100%;
    }
}

@media print {
    .top-nav,
    .sector-filter,
    .calc-cta {
        display: none !important;
    }

    body {
        background: #ffffff;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Legal and project pages carry a plain row of links, so the drawer toggle
   has nothing to open; keep the row compact on small screens instead. */
.top-nav:has(.nav-links-static) .nav-toggle {
    display: none !important;
}

@media (max-width: 900px) {
    .nav-links-static {
        margin-inline-start: auto;
        gap: 2px !important;
    }

    .nav-links-static a {
        padding: 8px 10px !important;
        font-size: .85rem !important;
        white-space: nowrap;
        border-block-end: 0 !important;
    }

    /* script.js clears .active on load, so match the current page by href. */
    .nav-links-static a.active,
    .nav-links-static a[href$="privacy.html"] {
        display: none !important;
    }
}

@media (max-width: 560px) {
    .top-nav:has(.nav-links-static) .brand span {
        display: none;
    }
}

/* The stand-in illustration has its glyph near the top; keep it in frame when a card crops it to 16:10. */
.project-card-media img[src*="header-bg"],
.project-images img[src*="header-bg"] {
    object-position: center 38%;
}


/* Portfolio: four projects first, the rest behind a button. */
.project-grid.is-collapsed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-grid.is-collapsed > :nth-child(n+5) {
    display: none;
}

.portfolio-more {
    display: flex;
    justify-content: center;
    margin-block-start: var(--sp-7);
}

.portfolio-more[hidden] {
    display: none;
}

@media (max-width: 700px) {
    .project-grid.is-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .portfolio-more .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile: one-tap WhatsApp, always in reach. */
.wa-float {
    display: none;
}

@media (max-width: 700px) {
    .wa-float {
        position: fixed;
        inset-inline-end: 16px;
        inset-block-end: 16px;
        z-index: 40;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 18px;
        background: var(--brand);
        color: var(--navy);
        border: 2px solid var(--navy);
        border-radius: var(--r);
        box-shadow: 4px 4px 0 var(--navy);
        font-family: var(--ff-head);
        font-weight: 700;
        font-size: var(--fs-sm);
        text-decoration: none;
    }

    .wa-float .icon {
        font-size: 1.25rem;
    }
}

/* Privacy policy: a readable column and a three-line summary up front. */
.legal-card.container {
    max-width: 860px;
}

.policy-summary {
    margin-block-end: var(--sp-6);
    padding: var(--sp-4) var(--sp-5);
    background: var(--brand-wash);
    border: 2px solid var(--navy);
    border-radius: var(--r);
}

.policy-summary-title {
    margin: 0 0 var(--sp-2);
    font-family: var(--ff-head);
    font-weight: 800;
    color: var(--navy);
}

.legal-card .policy-summary ul {
    margin: 0;
    padding-inline-start: var(--sp-5);
    color: var(--ink);
}

.policy-summary li {
    margin-block-start: var(--sp-1);
}
