:root {
    /* Section palette: three section backgrounds plus text, border and accent colours */
    --navy: #0A1230;
    --white: #FFFFFF;
    --tint: #F3F8FD;
    --ink: #0B1632;
    --body: #3B4A63;
    --muted: #5B6B85;
    --line: #E1E8F2;
    --blue: #0A6AB8;
    --blue-hover: #085896;
    --sky: #2FB0FF;

    /* Legacy aliases, used only outside sections (header, footer, mobile nav, modal) */
    --bg-dark: #0F1A3D;
    --bg-light: #0F1A3D;
    --primary-text: #FFFFFF;
    --secondary-text: #C9D3E8;
    --border-color: rgba(255, 255, 255, 0.12);
    --purple-start: var(--sky);
    --purple-end: var(--blue);

    --dur-med: 0.6s;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --container-max: 1200px;
    --container-pad: clamp(1rem, 5vw, 2rem);
    --section-pad: clamp(5rem, 10vw, 8rem);
    --fs-h1: clamp(2.25rem, 5vw, 3.5rem);
    --fs-h2: clamp(1.75rem, 3.2vw, 2.5rem);
    --fs-h3: 1.25rem;
    --fs-stat: clamp(2rem, 3vw, 2.25rem);
    --fs-body: 1rem;
    --fs-lead: 1.0625rem;
    --fs-small: 0.875rem;
    --fs-tagline: 0.875rem;
    --fs-card-title: 1.0625rem;

    --mobile-nav-padding-top-logo: 2rem;
    --mobile-nav-header-padding-bottom: 2.5rem;
    --mobile-nav-item-horizontal-padding: 1rem;
    --mobile-nav-divider-to-first-item: 2rem;
    --mobile-nav-item-vertical-gap: 2rem;
    --mobile-nav-link-gap: 1rem;
    --mobile-nav-social-gap: 1.5rem;
    --mobile-nav-footer-margin-top: 1.5rem;
    --mobile-nav-footer-padding-bottom: 15rem;
}

/* ========== SECTION THEMES ========== */
/* One class per section: flat background plus the text/border/accent variables
   used by every heading, paragraph, label, card, border and icon inside it. */
.on-dark {
    background: var(--navy);
    color: #fff;
    --h: #fff;
    --t: #C9D3E8;
    --m: #9FB0CE;
    --card: #0F1A3D;
    --bd: rgba(255, 255, 255, 0.12);
    --accent: var(--sky);
    --primary-text: #fff;
    --secondary-text: #C9D3E8;
    --border-color: rgba(255, 255, 255, 0.12);
    --bg-dark: #0F1A3D;
    --bg-light: #0F1A3D;
    --purple-start: var(--sky);
    --purple-end: var(--blue);
}

.on-light {
    background: var(--white);
    color: var(--body);
    --h: var(--ink);
    --t: var(--body);
    --m: var(--muted);
    --card: var(--tint);
    --bd: var(--line);
    --accent: var(--blue);
    --primary-text: var(--ink);
    --secondary-text: var(--body);
    --border-color: var(--line);
    --bg-dark: var(--tint);
    --bg-light: var(--tint);
    --purple-start: var(--blue);
    --purple-end: var(--blue-hover);
}

.on-tint {
    background: var(--tint);
    color: var(--body);
    --h: var(--ink);
    --t: var(--body);
    --m: var(--muted);
    --card: #fff;
    --bd: var(--line);
    --accent: var(--blue);
    --primary-text: var(--ink);
    --secondary-text: var(--body);
    --border-color: var(--line);
    --bg-dark: #fff;
    --bg-light: #fff;
    --purple-start: var(--blue);
    --purple-end: var(--blue-hover);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

@keyframes infinite-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes pulseDot {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(47,176,255, 0.55);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(47,176,255, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(47,176,255, 0);
    }
}

@keyframes softFloatIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sweep {
    0% { transform: rotate(45deg); }
    100% { transform: rotate(405deg); }
}

@keyframes pulseCore {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.8; }
}

.slice-anim { transform-origin: 50px 50px; animation: sweep 5s linear infinite; }
.core-anim { transform-origin: 50px 50px; animation: pulseCore 2.5s ease-in-out infinite; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    background-color: var(--navy);
    color: var(--body);
    overflow-x: hidden;
    position: relative;
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-text);
    font-weight: 700;
    line-height: 1.25;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
h1 { font-size: var(--fs-h1); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
h4, .logo, .btn,
nav a,
button,
.main-nav a,
.mobile-nav-links a,
.mobile-submenu a { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    position: relative;
    z-index: 1;
}

/* Grid/dot texture and glow layer deleted: sections are flat.
   The one glow that stays sits behind the hero photo (see .hero-photo::before). */

.section-eyebrow {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--purple-start);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.pill-badge {
    display: inline-block;
    border: 1px solid var(--line);
    color: var(--ink);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.on-dark .pill-badge {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.reveal {
    opacity: 0;
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; }
.reveal-up { transform: translateY(20px); }
.reveal-up.is-visible { transform: translateY(0); }

.section-heading {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.section-heading h2 {
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.section-heading p,
.section-heading .section-subtitle {
    margin-top: 1rem;
}

.main-header {
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform var(--dur-med) var(--ease);
}

.main-header.is-hidden {
    transform: translateY(-100%);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-img { height: 40px; width: auto; display: block; }
@media (max-width: 600px) { .logo-img { height: 34px; } }
.footer-brand .logo-img { height: 40px; }

.logo svg {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: none;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 992px) { .nav-links { display: flex; } }

.nav-links > li {
    position: relative;
}

.nav-links a {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-links a:hover { color: var(--primary-text); }

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--navy);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    min-width: 200px;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
    margin-top: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.nav-links > li:hover .dropdown,
.nav-links > li:focus-within .dropdown,
.nav-links > li.open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown li {
    list-style: none;
}

.dropdown a {
    padding: 0.75rem 1.5rem;
    display: block;
    color: var(--secondary-text);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown a:hover {
    color: var(--primary-text);
    background-color: rgba(11,127,214, 0.1);
    border-left-color: var(--purple-start);
}

.nav-links .dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-links > li:hover .dropdown-icon,
.nav-links > li:focus-within .dropdown-icon,
.nav-links > li.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown a:focus-visible {
    color: var(--primary-text);
    background-color: rgba(11,127,214, 0.1);
    border-left-color: var(--purple-start);
    outline: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cta-button {
    display: none;
    background-color: var(--blue);
    color: #fff;
    border: 1px solid var(--blue);
    min-height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 992px) { .cta-button { display: inline-flex; } }

.cta-button:hover {
    background-color: var(--blue-hover);
    border-color: var(--blue-hover);
}

.hamburger-btn {
    display: block;
    background: none;
    border: none;
    color: var(--primary-text);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1100;
}

@media (min-width: 992px) { .hamburger-btn { display: none; } }

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    overflow-y: auto;
    transform: translateY(-100%);
    transition:
        transform var(--dur-med) var(--ease),
        opacity var(--dur-med) var(--ease),
        visibility 0s linear var(--dur-med);
}

body.mobile-nav-open .mobile-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mobile-nav-padding-top-logo) var(--mobile-nav-item-horizontal-padding) var(--mobile-nav-header-padding-bottom);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    width: 100%;
}

.mobile-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.mobile-nav-logo svg {
    width: 40px;
    height: 40px;
    display: block;
}

.mobile-nav-close-btn {
    background: none;
    border: none;
    color: var(--primary-text);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: color 0.2s ease;
    transform: translateY(2px);
}

.mobile-nav-close-btn:hover {
    color: var(--purple-start);
}

.mobile-nav-links {
    list-style: none;
    width: 100%;
    margin: var(--mobile-nav-divider-to-first-item) 0 0 0;
    padding: 0 var(--mobile-nav-item-horizontal-padding);
    flex: 1 1 auto;
}

.mobile-nav-links li {
    margin-bottom: var(--mobile-nav-item-vertical-gap);
    width: 100%;
    border: none;
}

.mobile-nav-links li:not(:last-child) {
    border-bottom: none;
}

.mobile-nav-links a {
    color: var(--primary-text);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--mobile-nav-link-gap);
    padding: 0;
    border-radius: 0;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--purple-start);
    background-color: transparent;
}

.mobile-nav-links a i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: var(--secondary-text);
}

.has-submenu.open > a i {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    padding-left: 0.25rem;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition:
        max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.6s ease,
        transform 0.6s ease;
}

.mobile-submenu,
.mobile-submenu li,
.mobile-submenu a {
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-align: left !important;
}

.has-submenu.open .mobile-submenu {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
}

.mobile-submenu li {
    margin-bottom: 0.25rem;
    border: none;
}

.mobile-submenu a {
    font-size: 0.9375rem;
    font-weight: 400;
    padding: 0.5rem 0;
    color: var(--secondary-text);
    display: block;
    transition: color 0.3s ease;
    justify-content: flex-start;
}

.mobile-submenu a:hover {
    color: var(--primary-text);
    background-color: transparent;
}

.mobile-nav-footer {
    margin-top: var(--mobile-nav-footer-margin-top);
    padding-bottom: var(--mobile-nav-footer-padding-bottom);
    padding-left: var(--mobile-nav-item-horizontal-padding);
    padding-right: var(--mobile-nav-item-horizontal-padding);
    display: flex;
    justify-content: flex-start;
    border-top: none;
}

.mobile-nav-footer .footer-socials {
    display: flex;
    gap: var(--mobile-nav-social-gap);
}

.mobile-nav-footer .footer-socials a {
    color: var(--secondary-text);
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--dur-med) var(--ease);
}

.mobile-nav-footer .footer-socials a:hover {
    color: var(--primary-text);
    background-color: var(--purple-end);
    border-color: var(--purple-end);
}

/* Section spacing: identical on every section, 88px desktop / 56px phones */
section {
    padding: 56px 0;
}
@media (min-width: 769px) {
    section { padding: 88px 0; }
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 1s var(--ease) forwards;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background-color: rgba(11,127,214,.10);
    border: 1px solid rgba(11,127,214,.30);
    padding: .45rem .9rem;
    border-radius: 999px;
    font-size: .875rem;
    color: var(--purple-start);
    margin-bottom: 2rem;
}

.hero-badge .pulse-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: var(--purple-start);
    animation: pulseDot 1.8s ease-in-out infinite;
    flex: 0 0 auto;
}

.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: var(--fs-tagline);
    letter-spacing: .08em;
    text-transform: none;
    font-weight: 400;
    color: var(--purple-start);
    opacity: .92;
}

.hero-heading {
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    max-width: 900px;
    margin-bottom: 1.5rem;
}

.hero-subheading {
    font-size: var(--fs-lead);
    color: var(--secondary-text);
    max-width: 34rem;
    margin-bottom: 2.5rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.btn,
button.btn,
a.btn {
    min-height: 40px;
    width: auto;
    padding: 0 20px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    text-decoration: none;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
}

/* Hero buttons: one step up from the standard button */
.hero-actions .btn {
    min-height: 44px;
    padding: 0 22px;
    font-size: 0.9375rem;
}

/* Phones: hero buttons stack (or sit side by side on wider phones), never above 44px */
@media (max-width: 768px) {
    .hero-actions { flex-wrap: wrap; }
    .hero-actions .btn { flex: 1 1 100%; min-height: 44px; }
}
@media (min-width: 576px) and (max-width: 768px) {
    .hero-actions .btn { flex: 1 1 calc(50% - 6px); }
}
/* Very small phones: keep every label on one line (no wrap, no overflow) */
@media (max-width: 400px) {
    .btn { font-size: 0.8125rem; padding: 0 14px; }
    .hero-actions .btn { font-size: 0.875rem; padding: 0 16px; }
}

.btn-primary {
    background-color: var(--blue);
    color: #fff;
    border: 1px solid var(--blue);
}

.btn-primary:hover {
    background-color: var(--blue-hover);
    border-color: var(--blue-hover);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
    background-color: transparent;
    border-color: #fff;
}

/* Secondary button on white / tint sections: ink border and ink label */
.on-light .btn-secondary,
.on-tint .btn-secondary {
    color: var(--ink);
    border-color: var(--ink);
}

.on-light .btn-secondary:hover,
.on-tint .btn-secondary:hover {
    background-color: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

/* Our stack: its own section, directly after the hero, with its own tint
   background so it no longer shares the hero navy. */
.stack-section {
    background: var(--tint);
    padding: 44px 0;
}
@media (min-width: 768px) {
    .stack-section { padding: 56px 0; }
}
@media (min-width: 1024px) {
    .stack-section { padding: 80px 0; }
}
.stack-section .section-heading {
    max-width: 620px;
    margin: 0 auto 2.5rem auto;
}
.stack-section .section-eyebrow {
    text-transform: none;
    letter-spacing: 0.04em;
    color: var(--blue);
    margin-bottom: 0.75rem;
}
.stack-section .section-heading h2 {
    margin: 0;
    color: var(--ink);
}
.stack-section .section-subtitle {
    margin: 0.75rem 0 0 0;
    color: var(--body);
    font-size: var(--fs-body);
}
.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 16px;
}
@media (min-width: 560px) {
    .stack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .stack-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .stack-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.stack-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 124px;
    padding: 24px;
    background: #fff;
    border: 1px solid #E1E8F2;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.stack-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    color: var(--blue);
}
.stack-logo i,
.stack-logo img { display: block; }
.stack-name {
    display: block;
    max-width: 100%;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--body);
    overflow-wrap: break-word;
}
@media (hover: hover) {
    .stack-card:hover {
        transform: translateY(-2px);
        border-color: #0A6AB8;
        box-shadow: 0 8px 20px rgba(11, 22, 50, 0.10);
    }
}
@media (prefers-reduced-motion: reduce) {
    .stack-card { transition: none; }
    .stack-card:hover { transform: none; }
}

/* Section backgrounds and divider lines removed: every section carries
   .on-dark / .on-light / .on-tint instead (flat colour, no borders). */

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    grid-template-areas:
        "content"
        "visual"
        "actions";
}

.about-content { grid-area: content; }
.about-visual  { grid-area: visual; }
.about-actions { grid-area: actions; }

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        grid-template-areas:
            "content visual"
            "actions visual";
    }
}

.about-content .section-heading {
    margin-bottom: 1.5rem;
    text-align: left;
}

.about-content .brand-story {
    font-size: var(--fs-body);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.paged-framework { list-style: none; }
.paged-item { display: flex; gap: 1rem; }
.paged-item + .paged-item { margin-top: 1.5rem; }

.paged-letter {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--purple-end);
    line-height: 1;
}

.paged-title {
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 0.25rem;
}

.about-actions {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .about-actions {
        justify-content: flex-start;
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .about-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.about-actions .btn.btn-secondary { opacity: 0.95; }
.about-actions .btn.btn-secondary:hover { opacity: 1; }

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.about-placeholder {
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    position: relative;
    box-sizing: border-box;
}

.visual-box {
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    z-index: 1;
    pointer-events: none;
}

.logo-overflow-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: clamp(18px, 6%, 42px);
    box-sizing: border-box;
    overflow: visible;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    text-align: center;
}

.logo-mark {
    width: clamp(120px, 65%, 320px);
    height: auto;
    display: block;
    margin: 0 auto;
    transform-origin: center;
    overflow: visible;
}

.logotype-tagline {
    margin-top: 1.75rem;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 600;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 3;
    opacity: 0.9;
    text-align: center;
}

.logo-container:hover .logotype-tagline {
    transform: translateY(-6px);
    opacity: 1;
    letter-spacing: 0.13em;
    color: rgb(47,176,255);
    transition: all 0.4s ease;
}

.logo-container .logotype-tagline {
    transition: all 0.4s ease;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: left;
}
@media (min-width: 500px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .services-grid { grid-template-columns: repeat(4, 1fr); }
}

.services-grid .service-card {
    display: block;
    background-color: var(--card);
    border: 1px solid var(--bd);
    border-radius: 14px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
    transition: all var(--dur-med) var(--ease);
    color: inherit;
    text-decoration: none;
}

.services-grid .service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(11, 22, 50, 0.18);
}

.services-grid .service-card:focus-visible {
    outline: 2px solid var(--purple-start);
    outline-offset: 4px;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(10, 106, 184, 0.10);
    color: #0A6AB8;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    line-height: 1;
}

.service-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--ink);
}

.service-card p {
    color: var(--body);
    font-size: var(--fs-small);
    text-decoration: none;
    margin: 0;
}

.services-grid .service-card { cursor: pointer; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 900px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
    background: var(--card);
    border: 1px solid var(--bd);
    border-radius: 14px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
    transition: all var(--dur-med) var(--ease);
}
.stat-card:hover { transform: translateY(-4px); }

.stat-number {
    font-size: var(--fs-stat);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}
.stat-label { color: var(--secondary-text); font-size: 0.875rem; }

.case-study-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 992px) {
    .case-study-grid { grid-template-columns: 1fr 1.2fr; }
}

.case-study-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.case-study-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
}

.case-study-metric .stat-number {
    font-size: var(--fs-h2);
}

.case-study-metric .stat-label {
    font-size: var(--fs-body);
}

.case-study-visual {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.project-thumbnail-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.project-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    aspect-ratio: 16 / 9;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
    cursor: pointer;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}

.project-thumbnail:hover img {
    transform: scale(1.06);
    opacity: 0.85;
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 11, 31, 0.88);
    opacity: 0;
    transition: opacity 0.5s var(--ease);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    pointer-events: none;
}

.project-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: var(--white);
    animation: fadeIn 0.6s ease forwards;
}

.btn-overlay {
    display: inline-block;
    background: #0B7FD6;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.btn-overlay:hover {
    background: #0A6AB8;
}

.project-thumbnail:hover {
    box-shadow: 0 10px 24px rgba(6, 11, 31, 0.45);
}

.project-thumbnail::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: none;
    transform: skewX(-25deg);
    transition: all 0.7s ease;
}

.project-thumbnail:hover::after {
    left: 130%;
    transition: all 0.7s ease;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 500px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
    background-color: var(--card);
    border: 1px solid #E1E8F2;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
    transition: all var(--dur-med) var(--ease);
}

.portfolio-grid .portfolio-card:first-child { aspect-ratio: 16 / 9; }

.portfolio-card:hover {
    transform: translateY(-6px);
    border-color: rgba(11, 22, 50, 0.18);
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.portfolio-tag {
    font-size: 0.875rem;
    color: var(--secondary-text);
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    color: var(--purple-start);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.portfolio-card:hover .portfolio-link {
    opacity: 1;
    transform: translateY(0);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .portfolio-link {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-mockup {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-mockup img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.6s var(--ease);
}

.portfolio-card:hover .portfolio-mockup img {
    transform: none;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: none;
    color: #fff;
    --primary-text: #fff;
    --secondary-text: #C9D3E8;
    --purple-start: var(--sky);
    transform: translateY(0);
    opacity: 1;
    transition: all var(--dur-med) var(--ease);
}

.portfolio-card:hover .portfolio-overlay {
    background: none;
    padding: 2rem 1.5rem;
}

/* ========== MOBILE OVERRIDE ========== */
@media (max-width: 768px) {
    .portfolio-overlay {
        padding: 1rem;
        background: none;
    }
    
    .portfolio-card:hover .portfolio-overlay {
        padding: 1.2rem;
        background: none;
    }
    
    /* Optional: slightly smaller text on mobile to reduce overlay height */
    .portfolio-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }
    .portfolio-card p {
        font-size: var(--fs-small);
    }
    .portfolio-tags {
        margin-top: 0.4rem;
        gap: 0.4rem;
    }
    .portfolio-tag {
        font-size: 0.875rem;
        padding: 0.2rem 0.5rem;
    }
    .portfolio-link {
        margin-top: 0.5rem;
        font-size: 0.875rem;
    }
}

.portfolio-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.portfolio-card p {
    font-size: var(--fs-small);
    color: var(--secondary-text);
}

.portfolio-footer {
    text-align: center;
    margin-top: 2.5rem;
}

.portfolio-footer .btn {
    display: inline-flex;
    width: auto;
    margin-top: 3rem;
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    text-decoration: none;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.portfolio-footer .btn:hover {
    background: var(--blue-hover);
    border-color: var(--blue-hover);
    box-shadow: none;
}

@media (max-width: 768px) {
    .portfolio-card h4 { font-size: 1.125rem; }
    .portfolio-card p { font-size: var(--fs-small); }
}

.portfolio-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.portfolio-modal.active {
    opacity: 1;
    visibility: visible;
}

.portfolio-modal.active .portfolio-modal-content {
    transform: scale(1);
    opacity: 1;
}

.portfolio-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portfolio-modal-content {
    position: relative;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: var(--bg-light);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.portfolio-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-modal-close:hover {
    background: var(--purple-end);
    border-color: var(--purple-end);
    transform: rotate(90deg);
}

.portfolio-modal-inner {
    display: grid;
    grid-template-columns: 1fr;
    height: 100%;
    overflow: hidden;
}

@media (min-width: 992px) {
    .portfolio-modal-inner {
        grid-template-columns: 1.2fr 1fr;
    }
    
    .portfolio-modal-gallery {
        padding: 2.5rem;
        background: var(--bg-dark);
        border-right: 1px solid var(--border-color);
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        height: 100%;
        overflow: hidden;
    }
    
    .image-carousel-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: 1rem;
        gap: 0;
    }
    
    .image-carousel-container::-webkit-scrollbar {
        display: none;
    }
    
    .carousel-slide {
        flex: 0 0 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-dark);
    }
    
    .carousel-slide img {
        width: 100%;
        height: auto;
        max-height: 65vh;
        object-fit: contain;
        display: block;
        border-radius: 0.5rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .gallery-nav-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 0.5rem;
    }
    
    .gallery-nav-arrows {
        display: flex;
        gap: 0.75rem;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(30, 30, 30, 0.8);
        border: 1px solid var(--border-color);
        color: var(--secondary-text);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        font-size: 1rem;
    }
    
    .gallery-nav-btn:hover {
        background: var(--purple-end);
        color: white;
        border-color: var(--purple-end);
        transform: scale(1.05);
    }
    
    .gallery-nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        pointer-events: none;
    }
    
    .image-counter {
        color: var(--secondary-text);
        font-size: 0.9rem;
        font-weight: 500;
        background: rgba(0, 0, 0, 0.3);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        border: 1px solid var(--border-color);
    }
    
    .current-image-index {
        color: var(--purple-start);
        font-weight: 600;
    }
    
    .portfolio-modal-thumbnails {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        padding: 0.5rem 0;
        scrollbar-width: thin;
        scrollbar-color: var(--purple-start) var(--border-color);
        -webkit-overflow-scrolling: touch;
    }
    
    .portfolio-modal-thumbnails::-webkit-scrollbar {
        height: 4px;
    }
    
    .portfolio-modal-thumbnails::-webkit-scrollbar-thumb {
        background: var(--purple-start);
        border-radius: 4px;
    }
    
    .modal-thumbnail {
        flex: 0 0 80px;
        height: 60px;
        border-radius: 0.5rem;
        overflow: hidden;
        border: 2px solid transparent;
        cursor: pointer;
        transition: all 0.3s ease;
        opacity: 0.6;
    }
    
    .modal-thumbnail:hover,
    .modal-thumbnail.active {
        border-color: var(--purple-start);
        opacity: 1;
        transform: translateY(-2px);
    }
    
    .modal-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    
    .portfolio-modal-gallery .portfolio-modal-main-image {
        display: none !important;
    }
    
    .portfolio-modal-details {
        overflow-y: auto;
        height: 100%;
    }
    
    .portfolio-modal-body {
        flex: 1 1 auto;
        overflow-y: auto;
        padding-right: 0.5rem;
    }
}

.portfolio-modal-gallery {
    padding: 2.5rem;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.portfolio-modal-details {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.portfolio-modal-header {
    flex-shrink: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.portfolio-modal-header h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--primary-text);
}

.modal-category {
    color: var(--purple-start);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--primary-text);
    font-weight: 700;
}

.modal-section p {
    color: var(--secondary-text);
    line-height: 1.7;
    font-size: 1rem;
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tech-tag {
    padding: 0.4rem 0.9rem;
    background: rgba(11,127,214, 0.1);
    border: 1px solid rgba(11,127,214, 0.3);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--purple-start);
    font-weight: 500;
}

.portfolio-modal-footer {
    flex-shrink: 0;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.portfolio-modal-footer .btn {
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

.modal-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 991px) {
    .portfolio-modal-content {
        width: 98%;
        height: 95vh;
        border-radius: 1rem;
    }
    
    .portfolio-modal-inner {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .portfolio-modal-gallery,
    .portfolio-modal-details {
        padding: 1.5rem;
        overflow-y: visible;
    }
    
    .portfolio-modal-gallery .portfolio-modal-main-image {
        display: block;
        width: 100%;
        border-radius: 1rem;
        overflow: hidden;
        border: 1px solid var(--border-color);
        background: var(--bg-dark);
        margin-bottom: 1.5rem;
    }
    
    .portfolio-modal-gallery .portfolio-modal-main-image img {
        width: 100%;
        height: auto;
        max-height: 50vh;
        object-fit: contain;
        display: block;
    }
    
    .portfolio-modal-thumbnails {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1rem;
    }
    
    .portfolio-modal-thumbnails .modal-thumbnail {
        position: relative;
        overflow: hidden;
        background-color: var(--bg-dark);
        border: 2px solid transparent;
        aspect-ratio: 16 / 10;
        display: block;
        width: 100%;
        border-radius: 0.5rem;
        cursor: pointer;
        transition: all 0.3s ease;
        opacity: 0.6;
    }
    
    .portfolio-modal-thumbnails .modal-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
        position: relative;
        z-index: 1;
    }
    
    .portfolio-modal-thumbnails .modal-thumbnail.active {
        border-color: var(--purple-start);
        opacity: 1;
        transform: translateY(-2px);
    }
    
    .image-carousel-container,
    .gallery-nav-controls,
    .gallery-nav-arrows,
    .gallery-nav-btn,
    .image-counter {
        display: none !important;
    }
    
    .portfolio-modal-close {
        top: 1rem;
        right: 1rem;
    }
    
    .portfolio-modal-footer .btn {
        min-width: 100%;
    }
}

.portfolio-modal-details:not(.is-scrolled-to-bottom) {
    box-shadow: inset 0 -60px 30px -20px rgba(0, 0, 0, 0.55);
}

@media (min-width: 992px) {
    .carousel-slide img {
        cursor: zoom-in;
    }
}

.mobile-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.mobile-lightbox.active {
    display: flex;
}

.mobile-lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 10;
}

.mobile-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid var(--border-color);
    color: var(--primary-text);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 11;
}

.mobile-lightbox-close:hover {
    background: var(--purple-end);
    border-color: var(--purple-end);
    transform: rotate(90deg);
}

.mobile-lightbox-counter {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--secondary-text);
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
    z-index: 11;
}

.mobile-lightbox-carousel-container {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.mobile-lightbox-carousel-container::-webkit-scrollbar {
    display: none;
}

.mobile-lightbox-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

.mobile-lightbox-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 100vh;
    user-select: none;
    -webkit-user-drag: none;
}

.portfolio-modal-gallery::-webkit-scrollbar,
.portfolio-modal-details::-webkit-scrollbar,
.portfolio-modal-body::-webkit-scrollbar {
    width: 6px;
}

.portfolio-modal-gallery::-webkit-scrollbar-track,
.portfolio-modal-details::-webkit-scrollbar-track,
.portfolio-modal-body::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

.portfolio-modal-gallery::-webkit-scrollbar-thumb,
.portfolio-modal-details::-webkit-scrollbar-thumb,
.portfolio-modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.portfolio-modal-gallery::-webkit-scrollbar-thumb:hover,
.portfolio-modal-details::-webkit-scrollbar-thumb:hover,
.portfolio-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--purple-end);
}

.timeline {
    list-style: none;
    position: relative;
    display: flex;
    justify-content: space-between;
}
.timeline-line {
    position: absolute;
    top: 20px;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: var(--line);
}
.timeline-line-progress {
    height: 100%;
    width: 100%;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(.19,1,.22,1);
}
.timeline.is-visible .timeline-line-progress { transform: scaleX(1); }
.timeline-step {
    text-align: center;
    width: 18%;
}
.timeline-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: var(--secondary-text);
    transition: all var(--dur-med) var(--ease);
    font-size: 1.25rem;
    position: relative;
}
.timeline.is-visible .timeline-step-icon {
    border-color: var(--purple-end);
    color: var(--purple-start);
}
.timeline-step h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--primary-text);
}
.timeline-step p { font-size: 0.9rem; }

@media (max-width: 768px) {
    .timeline {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 40px;
        position: relative;
    }
    .timeline-line {
        left: 20px;
        top: 20px;
        width: 2px;
        height: calc(100% - 40px);
    }
    .timeline-line-progress {
        transform: scaleY(0);
        transform-origin: top;
    }
    .timeline.is-visible .timeline-line-progress { transform: scaleY(1); }
    .timeline-step {
        position: relative;
        width: 100%;
        text-align: left;
        padding-left: 1.5rem;
        margin-bottom: 2.5rem;
    }
    .timeline-step:last-child { margin-bottom: 0; }
    .timeline-step-icon {
        position: absolute;
        left: -40px;
        top: 0;
        margin: 0;
    }
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.testimonial-card {
    position: relative;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
    transition: all var(--dur-med) var(--ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
}

.testimonial-rating {
    color: #F5B301;
}

.testimonial-quote {
    color: #C9D3E8;
    flex-grow: 1;
}

.testimonial-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.testimonial-author-avatar {
    border-radius: 50%;
    background-color: var(--bg-dark);
    flex-shrink: 0;
    overflow: hidden;
}

.testimonial-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-text);
}

.testimonial-author span {
    display: block;
    font-weight: 400;
    color: var(--m);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.faq-item {
    background-color: var(--card);
    border: 1px solid #E1E8F2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
    padding: 16px 20px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}
.faq-question i {
    transition: transform var(--dur-med) var(--ease);
    color: var(--blue);
    font-size: 1rem;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-med) var(--ease);
}
.faq-answer p {
    padding: 12px 0 0;
    max-width: 95%;
    color: var(--body);
}
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Odd rows (1, 3, 5): blue */
.faq-item:nth-child(odd) {
    background: #0A6AB8;
    border-color: #0A6AB8;
}
.faq-item:nth-child(odd) .faq-question { color: #fff; }
.faq-item:nth-child(odd) .faq-question i { color: #fff; }
.faq-item:nth-child(odd) .faq-answer p { color: #E6F1FB; }
.faq-item:nth-child(odd):hover,
.faq-item:nth-child(odd).active:hover { background: #085896; border-color: #085896; }

/* Even rows (2, 4, 6): white */
.faq-item:nth-child(even) {
    background: #fff;
    border-color: #E1E8F2;
}
.faq-item:nth-child(even) .faq-question { color: var(--ink); }
.faq-item:nth-child(even) .faq-question i { color: #0A6AB8; }
.faq-item:nth-child(even) .faq-answer p { color: var(--body); }
.faq-item:nth-child(even):hover,
.faq-item:nth-child(even).active:hover { border-color: #0A6AB8; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    background-color: var(--card);
    border: 1px solid #E1E8F2;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(11, 22, 50, 0.06), 0 8px 24px rgba(11, 22, 50, 0.06);
    overflow: hidden;
}
@media (min-width: 992px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info { padding: clamp(2rem, 8vw, 4rem); }
.contact-info h2 { margin-bottom: 1.5rem; }

.contact-details { list-style: none; margin-top: 2rem; }
.contact-details li {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.contact-details li + li { margin-top: 1rem; }
.contact-details i {
    color: var(--purple-start);
    width: 20px;
}
.contact-form-wrapper { padding: clamp(2rem, 8vw, 4rem); }

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}
/* Label sits above its field, in ink */
.form-field {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 600;
}
.form-input {
    width: 100%;
    background: #fff;
    border: 1px solid #C3D0E2;
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--ink);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--dur-med) var(--ease);
}
.form-input::placeholder { color: var(--muted); opacity: 1; }
.form-input:focus { border-color: var(--blue); outline: 2px solid #0A6AB8; outline-offset: 2px; }
textarea.form-input { resize: vertical; min-height: 110px; }

.main-footer {
    padding: 4rem 0 2rem;
    background: var(--navy);
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    text-align: left;
    gap: 3rem;
}
@media (min-width: 500px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}
@media (min-width: 992px) {
    .footer-content { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand .logo {
    margin-bottom: 1rem;
    justify-content: flex-start;
}
.footer-brand p {
    color: var(--secondary-text);
    font-size: var(--fs-small);
    max-width: 280px;
    margin: 0;
}
.footer-socials {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-start;
}
.footer-socials a {
    color: var(--secondary-text);
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--dur-med) var(--ease);
}
.footer-socials a:hover {
    color: var(--primary-text);
    background-color: var(--purple-end);
    border-color: var(--purple-end);
}
.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--primary-text);
    font-weight: 700;
}
.footer-links ul { list-style: none; }
.footer-links li + li { margin-top: 0.75rem; }
.footer-links a {
    color: var(--secondary-text);
    font-size: var(--fs-small);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover { color: var(--primary-text); }

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
    font-size: var(--fs-small);
    color: var(--secondary-text);
}
.footer-bottom a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-bottom a:hover { color: var(--primary-text); } 

#scrollToTopBtn {
    position: fixed;
    bottom: 5.75rem;
    right: 2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0B7FD6;
    color: white;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-med) var(--ease), background-color 0.2s ease;
    z-index: 950;
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollToTopBtn:hover {
    background: #0A6AB8;
}

#scrollToTopBtn i {
    font-size: 0.9rem;
}

.whatsapp-widget {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(30,30,30,0.6);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    color: #25D366;
    font-size: 1.5rem;
    z-index: 1000;
    text-decoration: none;
    transition: all var(--dur-med) var(--ease);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
}

.whatsapp-widget:hover {
    transform: translateY(-4px);
    background: rgba(30,30,30,0.8);
    box-shadow:
        0 0 0 1px rgba(37,211,102,0.25),
        0 12px 30px rgba(37,211,102,0.15);
}

.whatsapp-widget.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: softFloatIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 991px) {
    #scrollToTopBtn,
    .whatsapp-widget {
        right: 1rem;
    }
}

.hero-section { align-items: stretch; text-align: left; }
.hero-section > .container { width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; width: 100%; }
@media (min-width: 992px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero-content { display: flex; flex-direction: column; align-items: flex-start; }
.hero-subheading { margin-left: 0; margin-right: 0; }
.hero-actions { justify-content: flex-start; flex-wrap: wrap; }
.hero-visual { min-height: 320px; }

/* ===== Refined, minimal sizing ===== */
/* Font scale lives in the :root block at the top of this file. */
:root {
    --section-pad: clamp(4rem, 8vw, 6rem);
}

/* Header */
/* Header: padding tuned so the 40px/34px combined logo keeps the header height unchanged */
.main-header { padding: 11.59375px 0; }
.logo svg { width: 30px; height: 30px; }
.nav-links { gap: 2rem; }
.mobile-nav-logo svg { width: 30px; height: 30px; }

/* Hero */
.hero-badge { font-size: 0.875rem; padding: 0.35rem 0.75rem; margin-bottom: 1.25rem; }
.hero-heading { font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; max-width: 680px; margin-bottom: 1rem; }
.hero-subheading { font-size: var(--fs-lead); line-height: 1.7; max-width: 34rem; margin-bottom: 1.75rem; }

/* Buttons */

/* Section headings */
.section-heading h2 { letter-spacing: -0.02em; font-weight: 700; margin-bottom: 1rem; }

/* ===== Services: numbered 2-column layout ===== */
.services-section .section-heading { text-align: left; margin-left: 0; max-width: 640px; }
.services-grid { counter-reset: svc; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
.services-grid .service-card { counter-increment: svc; border-radius: 14px; border-left: 1px solid var(--bd); padding: 2rem 2rem 2rem 2.25rem; }
.services-grid .service-card::before { content: "0" counter(svc); position: absolute; top: 1.5rem; right: 1.75rem; font-size: 0.875rem; letter-spacing: 0.1em; color: var(--body); }
.services-grid .service-card:hover { transform: translateY(-4px); }
.services-section .portfolio-footer { text-align: left; }
.services-section .portfolio-footer .btn { margin-top: 1.5rem; }

/* ===== Impact: divided figures, no boxes ===== */
.results-section .section-heading { text-align: left; margin-left: 0; max-width: 640px; }
.stats-grid { gap: 16px; }
.stat-card { background: var(--card); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; text-align: left; padding: 1.5rem; }
.stat-card:hover { transform: none; background: var(--card); }
.stat-number { color: var(--purple-start); }

/* ===== Portfolio: featured first card ===== */
.portfolio-section .section-heading { text-align: left; margin-left: 0; max-width: 640px; }
.portfolio-grid { grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) {
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid .portfolio-card:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .portfolio-grid .portfolio-card:not(:first-child) { aspect-ratio: 16 / 10; }
}
.portfolio-card { border-radius: 12px; }
.portfolio-mockup { background: #0f1730; }
.portfolio-section .portfolio-footer { text-align: left; }
.portfolio-section .portfolio-footer .btn { margin-top: 1.5rem; }

.img-slot { width: 100%; height: 100%; min-height: 240px; background: var(--card); border: 1px dashed var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.img-slot img[hidden] { display: none; }
.img-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.img-slot-hero { min-height: 380px; }
.img-slot-about { border-radius: 1.5rem; }
.portfolio-mockup .img-slot { border-radius: 0; border: none; min-height: 100%; }

/* Process: vertical numbered list */
.process-section .section-heading { text-align: left; margin-left: 0; max-width: 640px; }
.process-list { list-style: none; max-width: 800px; }
.process-item { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid #E1E8F2; }
.process-item:last-child { border-bottom: 1px solid #E1E8F2; }
.process-num { font-size: 1.1rem; font-weight: 700; color: #0A6AB8; min-width: 2.5rem; }
.process-item h4 { font-size: 1.125rem; margin-bottom: 0.35rem; color: var(--ink); }
.process-item p { color: var(--body); }

/* Reviews: first card large */
.testimonials-section .section-heading { text-align: left; margin-left: 0; max-width: 640px; }
.testimonials-grid { grid-template-columns: 1fr; }
.testimonial-author-avatar { background: #1a2350; }

/* FAQ: two columns */
.faq-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 992px) { .faq-layout { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; } }
.faq-intro p { color: var(--secondary-text); margin-top: 1rem; }
.faq-accordion { margin: 0; max-width: none; }


/* =====================================================================
   Refinement pass: one type scale, aligned lists, consistent headings
   (also replaces the two inline <style> blocks that used to sit in index.html)
   ===================================================================== */
/* No single-word last lines in headings or short paragraphs */
.hero-heading, .section-heading h2, .about-content h2, .process-intro h2, .faq-intro h2 { text-wrap: balance; }
.hero-subheading, .brand-story, .faq-intro p { text-wrap: pretty; }

/* About: tighter paragraph rhythm, one shared column width, aligned principles */
.about-content .section-heading { max-width: none; }
.about-content .brand-story { max-width: 34rem; margin-bottom: 1.25rem; line-height: 1.7; }
.paged-framework { max-width: 34rem; margin-top: 1.75rem; }
.paged-item { gap: 0.9rem; }
.paged-item + .paged-item { margin-top: 1.25rem; }
.paged-letter { flex: 0 0 2rem; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; line-height: 1.6; color: var(--purple-start); font-variant-numeric: tabular-nums; }
.paged-title { font-size: 1.0625rem; margin-bottom: 0.2rem; }
.paged-item p { color: var(--secondary-text); font-size: var(--fs-small); line-height: 1.6; }

/* Card titles share one size (the featured project keeps a larger one) */
.services-grid .service-card h4,
.process-item h4,
.portfolio-card h4 { font-size: var(--fs-card-title); }
.portfolio-grid .portfolio-card:first-child h4 { font-size: 1.125rem; }
.services-grid .service-card p { font-size: var(--fs-small); line-height: 1.65; }

/* Process: heading on the left, steps on the right (mirrors the FAQ) */
.process-layout { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.process-intro .section-eyebrow { margin-bottom: 0.5rem; }
.process-intro h2 { letter-spacing: -0.02em; font-weight: 700; }
.process-list { max-width: none; }
.process-item p { font-size: var(--fs-small); line-height: 1.65; }
@media (min-width: 992px) {
  .process-layout { grid-template-columns: 0.8fr 1.2fr; gap: 4rem; }
  .process-intro, .faq-intro { align-self: start; position: sticky; top: 6.5rem; }
}

/* Reviews: cards no longer stretch to fit an empty quote */

/* FAQ */
.faq-answer p { font-size: 1rem; line-height: 1.7; }

/* Contact: same left-aligned heading and same H2 size as every other section */
#contact .section-heading { text-align: left; margin-left: 0; max-width: 640px; margin-bottom: 2.5rem; }
#contact .section-heading h2 { margin-bottom: 0.75rem; }
#contact .section-heading .section-subtitle { font-size: var(--fs-body); color: var(--secondary-text); }
/* Contact: form and details sit directly on the section, inside the shared
   container, so their left edge matches every heading and the footer. */
#contact .contact-grid {
    gap: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}
#contact .contact-form-wrapper,
#contact .contact-info { padding: 0; }
#contact .contact-info {
    border-top: 1px solid var(--line);
    padding-top: 2rem;
    margin-top: 0;
}
@media (min-width: 992px) {
  #contact .contact-grid { gap: clamp(2rem, 4vw, 3.5rem); }
  #contact .contact-info { border-top: 0; border-left: 1px solid var(--line); padding-top: 0; padding-left: clamp(2rem, 4vw, 3.5rem); }
}
#contact .contact-info h3 { font-size: var(--fs-h3); margin-bottom: 0; }
#contact .contact-info h3 + .contact-details { margin-top: 1rem; }
#contact .contact-info h3:not(:first-child) { margin-top: 1.75rem !important; }
#contact .contact-details li { font-size: 0.95rem; color: var(--secondary-text); }
#contact .contact-details li + li { margin-top: 0.75rem; }
#contact .contact-details a { color: inherit; }
#contact .form-group { margin-bottom: 1.5rem; }
#contact .form-group[role="group"] { margin-bottom: 2.25rem; }
#contact textarea.form-input { min-height: 80px; }
#contactForm .btn-primary { min-height: 40px; padding: 0 24px; font-size: 0.9375rem; }

/* Footer: leave room so the floating buttons never sit on the copyright line */
@media (max-width: 991px) { .main-footer { padding-bottom: 5.5rem; } }

/* Our Approach visual */
.approach-card { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; gap: 0; padding: clamp(1.25rem, 6%, 2rem); border-radius: 1.5rem; background: none; }
.approach-step { position: relative; display: flex; align-items: center; gap: 1rem; padding: 0.9rem 0; }
.approach-step + .approach-step { border-top: 1px solid rgba(47,176,255,.14); }
.approach-icon { flex: 0 0 auto; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.85rem; color: #fff; background: var(--blue); box-shadow: none; }
.approach-icon svg { width: 1.3rem; height: 1.3rem; }
.approach-text { display: flex; flex-direction: column; gap: 0.15rem; }
.approach-text strong { font-size: 1.05rem; font-weight: 600; color: var(--primary-text); }
.approach-text small { font-size: 0.875rem; color: var(--secondary-text); line-height: 1.4; }

/* ===== Portfolio cards v2: image on top (never covered), text underneath ===== */
.portfolio-grid .portfolio-card { display: flex; flex-direction: column; aspect-ratio: auto; height: auto; border-radius: 14px; }
.portfolio-grid .portfolio-card:first-child,
.portfolio-grid .portfolio-card:not(:first-child) { aspect-ratio: auto; }
.portfolio-grid .portfolio-mockup { position: relative; flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 1.25rem; background: none; }
.portfolio-grid .portfolio-mockup .img-slot { width: 100%; height: 100%; min-height: 0; background: none; border: none; border-radius: 0; }
.portfolio-grid .portfolio-mockup .img-slot:not(:has(img:not([hidden]))) { border: 1px dashed rgba(47,176,255,.35); border-radius: 10px; }
.portfolio-grid .portfolio-mockup .img-slot img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; filter: drop-shadow(0 14px 24px rgba(0,0,0,.45)); transition: transform .5s var(--ease); }
.portfolio-grid .portfolio-card:hover .portfolio-mockup img { transform: none; }

.portfolio-grid .portfolio-overlay { position: static; width: auto; padding: 1.1rem 1.25rem 1.35rem; background: none; border-top: 1px solid var(--border-color); transition: none; }
.portfolio-grid .portfolio-card:hover .portfolio-overlay { background: none; padding: 1.1rem 1.25rem 1.35rem; }
.portfolio-grid .portfolio-link { opacity: 1; transform: none; }
.portfolio-grid .portfolio-card h4 { font-size: 1.125rem; }







.hero-visual .img-slot-hero { border: none; background: none; min-height: 0; border-radius: 0; }
.hero-visual .img-slot-hero img { width: 100%; height: auto; object-fit: contain; display: block; }

/* ===== Portfolio v3 (polish): laptop for the website, framed artboards for brand work ===== */
.portfolio-grid { gap: 1.5rem; }
.portfolio-grid .portfolio-card { border-radius: 14px; background: var(--card); border: 1px solid #E1E8F2; box-shadow: 0 1px 2px rgba(11,22,50,.06), 0 8px 24px rgba(11,22,50,.06); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); }
.portfolio-grid .portfolio-card:hover { transform: translateY(-6px); border-color: #C5D2E5; box-shadow: 0 1px 2px rgba(11,22,50,.06), 0 8px 24px rgba(11,22,50,.06); }

/* image stage */
.portfolio-grid .portfolio-mockup { aspect-ratio: 4 / 3; padding: 1.5rem; background: none; border-bottom: 1px solid #E1E8F2; }
.portfolio-grid .portfolio-mockup .img-slot img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 10px; filter: none; box-shadow: none; transition: transform .5s var(--ease); }
.portfolio-grid .portfolio-card:hover .portfolio-mockup img { transform: scale(1.03); }

/* text */
.portfolio-grid .portfolio-overlay { padding: 1.25rem 1.5rem 1.5rem; border-top: none; color: var(--body); --primary-text: var(--ink); --secondary-text: var(--body); --purple-start: var(--blue); }
.portfolio-grid .portfolio-overlay p { font-size: .875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--purple-start); margin-bottom: .35rem; order: -1; }
.portfolio-grid .portfolio-overlay { display: flex; flex-direction: column; }
.portfolio-grid .portfolio-overlay h4 { font-size: 1.125rem; margin-bottom: .1rem; color: var(--ink); }
.portfolio-grid .portfolio-tags { margin-top: .9rem; }
.portfolio-grid .portfolio-link { margin-top: 1rem; font-weight: 600; }

/* Featured card: image on the left, details on the right (no laptop frame) */
@media (min-width: 992px) {
  .portfolio-grid .portfolio-card:first-child { display: grid; grid-template-columns: 1.55fr 1fr; align-items: stretch; }
  .portfolio-grid .portfolio-card:first-child .portfolio-mockup { aspect-ratio: auto; height: auto; min-height: 420px; padding: 0; border: 0; background: none; box-shadow: none; display: block; overflow: hidden; }
  .portfolio-grid .portfolio-card:first-child .portfolio-overlay { justify-content: center; padding: 2.5rem; }
  .portfolio-grid .portfolio-card:first-child .portfolio-overlay h4 { font-size: 1.125rem; line-height: 1.3; margin-bottom: .25rem; }
  .portfolio-grid .portfolio-card:first-child .portfolio-overlay p { font-size: .875rem; }
}

/* ===== Client feedback: name, role and round logo ===== */
.testimonial-author-avatar { position: relative; display: grid; place-items: center; border-radius: 50%; background: var(--bd); border: 1px solid var(--bd); overflow: hidden; flex-shrink: 0; }
.testimonial-author-avatar .avatar-initials { font-weight: 600; letter-spacing: .04em; color: var(--h); }
.testimonial-author-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: #fff; border-radius: 50%; }
.testimonial-author-avatar img[hidden] { display: none; }
.hero-visual .img-slot-hero{border:none;background:none;min-height:0;border-radius:0}
.hero-visual .hero-photo{position:relative;max-width:560px;margin-inline:auto;border:0;border-radius:0;box-shadow:none;background:none;overflow:visible}
.hero-visual .hero-photo::before{content:"";position:absolute;inset:-6% 0;background:radial-gradient(circle at 50% 50%,rgba(47,176,255,.10) 0%,rgba(47,176,255,0) 70%);z-index:-1;pointer-events:none}
.hero-visual .hero-photo::after{content:none;display:none}
.hero-visual .hero-photo img{display:block;width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;object-position:center 40%;border:0;border-radius:0;box-shadow:none;mix-blend-mode:screen;-webkit-mask-image:radial-gradient(ellipse 72% 70% at 50% 50%,#000 45%,transparent 100%);mask-image:radial-gradient(ellipse 72% 70% at 50% 50%,#000 45%,transparent 100%)}
@media(max-width:768px){.hero-visual .hero-photo{max-width:380px;margin:24px auto 0}}
.approach-video{position:relative;border-radius:16px;overflow:hidden;border:1px solid var(--bd);box-shadow:0 1px 2px rgba(11,22,50,.06),0 8px 24px rgba(11,22,50,.06);background:#0F1A3D}
.approach-video video{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.approach-video::after{content:none;display:none}

/* ===== Client feedback: smaller cards, 3 across on desktop ===== */
.testimonials-grid,.testimonial-grid{max-width:860px;margin-inline:auto;gap:16px}
.testimonial-card{padding:18px 20px;border-radius:16px;min-height:0}
.testimonial-card p,.testimonial-card blockquote{font-size:.9375rem;line-height:1.55;margin:0 0 14px}
.testimonial-card .testimonial-rating{font-size:.875rem;margin-bottom:8px}
.testimonial-author-avatar{width:38px;height:38px}
.testimonial-card .avatar-initials{font-size:.875rem}
.testimonial-card h4,.testimonial-card .author-name,.testimonial-card .testimonial-author{font-size:.9375rem}
.testimonial-card small,.testimonial-card .author-role,.testimonial-card .testimonial-author span{font-size:.875rem}
@media(min-width:640px){.testimonials-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:992px){.testimonials-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ===== UrbanCats featured card: plain screenshot (no bezel, base bar, stage or outline lines) ===== */
.portfolio-grid .portfolio-card:first-child .portfolio-mockup{aspect-ratio:auto;height:auto;padding:0;background:none;border:0;box-shadow:none;display:block;overflow:hidden}
.portfolio-grid .portfolio-card:first-child .portfolio-mockup .img-slot{position:relative;display:block;width:100%;height:auto;min-height:0;aspect-ratio:16 / 10;margin:0;padding:0;overflow:hidden;background:none;border:0;border-radius:0}
.portfolio-grid .portfolio-card:first-child .portfolio-mockup .img-slot:not(:has(img:not([hidden]))){border:0;border-radius:0}
.portfolio-grid .portfolio-card:first-child .portfolio-mockup .img-slot::before,.portfolio-grid .portfolio-card:first-child .portfolio-mockup .img-slot::after{content:none;display:none}
.portfolio-grid .portfolio-card:first-child .portfolio-mockup .img-slot img{display:block;width:100%;height:auto;max-width:none;max-height:none;aspect-ratio:auto;object-fit:contain;object-position:top center;border:0;border-radius:14px;background:none;filter:none;box-shadow:0 16px 32px rgba(0,0,0,.45)}
.portfolio-grid .portfolio-card:first-child:hover .portfolio-mockup img{transform:none}

/* ===== Brand carousel: 2 boxes visible, 8 in total, swipeable ===== */
.brand-carousel{margin-top:32px}
.bc-controls{display:flex;align-items:center;justify-content:center;gap:20px;margin-top:22px}
.bc-controls button.bc-prev,.bc-controls button.bc-next{width:42px;height:42px;border-radius:50%;border:1px solid var(--ink);background:transparent;color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background .2s,border-color .2s,color .2s}
.bc-controls button.bc-prev:hover:not(:disabled),.bc-controls button.bc-next:hover:not(:disabled){background:var(--blue);border-color:var(--blue);color:#fff}
.bc-controls button:disabled{opacity:.35;cursor:default}
.bc-track{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;cursor:grab;padding-bottom:4px}
.bc-track::-webkit-scrollbar{display:none}
.bc-track.dragging{scroll-snap-type:none;cursor:grabbing;user-select:none}
.bc-slide{flex:0 0 calc(50% - 10px);margin:0;scroll-snap-align:start;background:var(--card);border:1px solid #E1E8F2;border-radius:14px;padding:12px;overflow:hidden}
@media(max-width:600px){.bc-slide{flex:0 0 100%}}
.bc-frame{aspect-ratio:16/11;border-radius:12px;overflow:hidden;background:var(--line);display:flex;align-items:center;justify-content:center}
.bc-frame img{width:100%;height:100%;object-fit:contain;display:block;-webkit-user-drag:none}
.bc-slide figcaption{display:flex;flex-direction:column;gap:2px;padding:12px 6px 4px}
.bc-slide figcaption span{font-size:.875rem;color:var(--m)}
.bc-dots{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin:0}
.bc-dot{width:9px;height:9px;padding:0;border-radius:50%;border:0;background:#C5D2E5;cursor:pointer;transition:.2s}
.bc-dot.active{background:var(--blue);width:26px;border-radius:6px}
.bc-empty{opacity:.7;padding:24px}

/* ========== SECTION THEME FIXES (light sections) ========== */

/* Links on light sections use the section blue */
.on-light p a,
.on-light li a,
.on-tint p a,
.on-tint li a { color: var(--blue); }
.on-light .contact-info a,
.on-tint .contact-info a { color: var(--blue); }


/* ========== FOOTER: LEFT ALIGNED ON PHONES (up to 768px) ========== */
@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr; gap: 28px; text-align: left; align-items: flex-start; }
    .footer-brand .logo { justify-content: flex-start; }
    .footer-socials { justify-content: flex-start; }
    .footer-brand p { max-width: none; }
    .footer-bottom { margin-top: 28px; text-align: left; }
}

/* ========== SUBPAGES: pricing, resources, library, blog ========== */
.page-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.page-hero > .container { width: 100%; }
.page-hero .section-eyebrow { margin-bottom: 0.75rem; }
.page-hero h1 {
    font-size: var(--fs-h1);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.page-hero p {
    font-size: 1.0625rem;
    line-height: 1.7;
    max-width: 34rem;
    margin: 0 auto 1.75rem;
}
.page-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: center;
}
.page-links a:not(.btn) {
    color: var(--blue);
    font-size: var(--fs-small);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    padding: 0 4px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}
.page-links a:not(.btn):hover {
    color: var(--blue-hover);
    text-decoration: underline;
}

/* ===== Selected work: every image fits its tile (no crop), text sits under the image ===== */
.portfolio-grid { gap: 1.5rem; }

/* --- tile: no card chrome, natural height --- */
.portfolio-grid .portfolio-card,
.portfolio-grid .portfolio-card:first-child,
.portfolio-grid .portfolio-card:hover,
.portfolio-grid .portfolio-card:first-child:hover {
    display: flex;
    flex-direction: column;
    aspect-ratio: auto;
    height: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    overflow: visible;
    transition: none;
}

/* --- uniform rounded frame: 4 / 3, overflow hidden, no chrome --- */
.portfolio-grid .portfolio-mockup,
.portfolio-grid .portfolio-card:first-child .portfolio-mockup {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-width: none;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    border: 0;
    padding: 0;
    margin: 0;
    background: none;
    box-shadow: none;
}

/* --- main image: fully visible, never cropped --- */
.portfolio-mockup img.pf-main {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    filter: none;
    transform: none;
    transition: transform 250ms ease;
}

/* --- blur fill behind the main image (same file, cover) --- */
.portfolio-mockup img.pf-fill {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center center;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    filter: blur(24px);
    transform: scale(1.15);
    opacity: .9;
    transition: none;
}

/* --- text under the image --- */
.portfolio-grid .portfolio-overlay,
.portfolio-grid .portfolio-card:first-child .portfolio-overlay,
.portfolio-grid .portfolio-card:hover .portfolio-overlay,
.portfolio-grid .portfolio-card:first-child:hover .portfolio-overlay {
    position: static;
    display: flex;
    flex-direction: column;
    width: auto;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    border-top: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    color: var(--body);
    --primary-text: var(--ink);
    --secondary-text: var(--body);
    --purple-start: var(--blue);
    transition: none;
}
.portfolio-grid .portfolio-overlay h4,
.portfolio-grid .portfolio-card:first-child .portfolio-overlay h4 {
    order: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #0B1632;
    margin: 14px 0 0;
}
.portfolio-grid .portfolio-overlay p,
.portfolio-grid .portfolio-card:first-child .portfolio-overlay p {
    order: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    color: #5B6B85;
    margin: 2px 0 0;
}

/* --- hover: image zooms, title turns blue --- */
.portfolio-grid .portfolio-card:hover .portfolio-mockup img.pf-main,
.portfolio-grid .portfolio-card:first-child:hover .portfolio-mockup img.pf-main {
    transform: scale(1.03);
    transition: transform 250ms ease;
}
.portfolio-grid .portfolio-card:hover .portfolio-mockup img.pf-fill {
    transform: scale(1.15);
}
.portfolio-grid .portfolio-card:hover .portfolio-overlay h4,
.portfolio-grid .portfolio-card:first-child:hover .portfolio-overlay h4 {
    color: #0A6AB8;
}

/* --- brand carousel: same frame, same text --- */
.bc-slide {
    flex: 0 0 calc(50% - 10px);
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}
.bc-frame {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: none;
    padding: 0;
    margin: 0;
}
.bc-frame img.pf-main {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    filter: none;
    transform: none;
    transition: transform 250ms ease;
}
.bc-frame img.pf-fill {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    filter: blur(24px);
    transform: scale(1.15);
    opacity: .9;
    transition: none;
}
.bc-slide figcaption { display: flex; flex-direction: column; gap: 0; padding: 0; margin-top: 14px; }
.bc-slide figcaption strong { font-size: 17px; font-weight: 700; line-height: 1.3; color: #0B1632; transition: color 250ms ease; }
.bc-slide figcaption span { font-size: 14px; font-weight: 400; line-height: 1.4; letter-spacing: normal; text-transform: none; color: #5B6B85; margin-top: 2px; }
.bc-slide:hover img.pf-main { transform: scale(1.03); }
.bc-slide:hover figcaption strong { color: #0A6AB8; }

/* --- keep the image perfectly still when motion is reduced --- */
@media (prefers-reduced-motion: reduce) {
    .portfolio-mockup img.pf-main,
    .bc-frame img.pf-main { transition: none; }
    .portfolio-grid .portfolio-card:hover .portfolio-mockup img.pf-main,
    .portfolio-grid .portfolio-card:first-child:hover .portfolio-mockup img.pf-main,
    .portfolio-grid .portfolio-card:hover .portfolio-mockup img.pf-fill,
    .bc-slide:hover img.pf-main { transform: none; }
}

/* =====================================================================
   PAGE BUILD: forms, case studies, pricing, legal, resources, library
   ===================================================================== */

/* ---- Contact form fields ---- */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1.25rem;
}
.field .form-label { margin-bottom: 0; }
.form-input,
select.form-input {
    min-height: 44px;
    box-sizing: border-box;
}
select.form-input {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 38px;
}
.field-error {
    min-height: 1.1em;
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.3;
    color: #B3261E;
}
.field.has-error .form-input { border-color: #B3261E; }
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.form-status {
    margin: 0.75rem 0 0;
    min-height: 1.5em;
    font-size: 0.9375rem;
    color: var(--muted);
}
.form-success {
    border: 1px solid var(--blue);
    background: rgba(10, 106, 184, 0.06);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
}
.form-success p {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink);
}
.plan-note {
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--blue);
    border-radius: 8px;
    background: #fff;
    font-size: 0.9375rem;
    color: var(--body);
}
.contact-section .btn[type="submit"] { min-height: 44px; }

/* ---- Narrow reading column ---- */
.container-narrow { max-width: 760px; }

/* ---- Case study pages ---- */
.case-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.5rem);
}
@media (min-width: 768px) {
    .case-gallery { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
.case-figure { margin: 0; }
.case-figure img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #0f1730;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: clamp(0.75rem, 2vw, 1.5rem);
}
.case-notes { display: flex; flex-direction: column; gap: 1.5rem; }
.case-note h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--ink); }
.case-note p { margin: 0; color: var(--body); line-height: 1.7; }
.case-services { margin-top: 0.25rem; }
.case-services li { font-size: 0.9375rem; }

/* ---- Included list (pricing, case studies) ---- */
.include-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.include-list li {
    position: relative;
    padding-left: 1.75rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--body);
}
.include-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--blue);
}
.include-list li:last-child { margin-bottom: 0; }

/* ---- Pricing ---- */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: stretch;
}
@media (min-width: 768px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); } }
.pricing-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(1.5rem, 3vw, 2rem);
}
.pricing-card h2 { font-size: var(--fs-h3); margin: 0; }
.pricing-card .plan-scope {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--body);
}
.pricing-card .include-list { flex: 1; }
.pricing-card .btn { align-self: flex-start; min-height: 44px; }
.pricing-card-featured { border-color: var(--blue); box-shadow: 0 12px 30px rgba(10, 106, 184, 0.1); }
.plan-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}
.plan-list li { font-size: 0.9375rem; }
.pricing-note {
    margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
    max-width: 780px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ---- Legal ---- */
.legal-prose h2 {
    font-size: var(--fs-h3);
    margin: 2rem 0 0.75rem;
    color: var(--ink);
}
.legal-prose h2:first-of-type { margin-top: 0; }
.legal-prose p {
    margin: 0 0 1rem;
    max-width: 74ch;
    line-height: 1.75;
    color: var(--body);
}
.legal-prose a { color: var(--blue); text-decoration: underline; }
.legal-links { margin-top: 2.5rem; }

/* ---- Related cards (resources) ---- */
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3vw, 2rem);
}
@media (min-width: 768px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .related-grid.related-grid-three { grid-template-columns: repeat(3, 1fr); } }
.related-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(1.5rem, 3vw, 2rem);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
a.related-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.related-card h2,
.related-card h3 { font-size: var(--fs-h3); margin: 0; color: var(--ink); }
.related-card p { margin: 0; font-size: 0.9375rem; line-height: 1.7; color: var(--body); }
.related-card-link {
    margin-top: auto;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--blue);
}
.related-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(10, 106, 184, 0.1);
    color: var(--blue);
    font-size: 1.25rem;
}
.related-card-plain { gap: 0.5rem; }
.step-num {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--blue);
}

/* ---- Blog ---- */
.post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.25rem, 3vw, 1.75rem);
}
@media (min-width: 768px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .post-list { grid-template-columns: repeat(3, 1fr); } }
.post-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.post-card a {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: 100%;
    padding: clamp(1.35rem, 3vw, 1.75rem);
    text-decoration: none;
    color: inherit;
}
.post-card h2 { font-size: 1.125rem; margin: 0; color: var(--ink); line-height: 1.35; }
.post-card p { margin: 0; font-size: 0.9375rem; line-height: 1.65; color: var(--body); }
.post-date { font-size: 0.8125rem; color: var(--muted); }
.post-link { margin-top: auto; font-size: 0.875rem; font-weight: 600; color: var(--blue); }
.post-meta { font-size: 0.875rem; color: var(--muted); margin-top: -0.5rem; }
.post-body h2 { font-size: var(--fs-h3); margin: 2rem 0 0.75rem; color: var(--ink); }
.post-body h2:first-child { margin-top: 0; }
.post-body h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; color: var(--ink); }
.post-body p { margin: 0 0 1.1rem; line-height: 1.8; color: var(--body); }
.post-body ul { margin: 0 0 1.1rem; padding-left: 1.25rem; color: var(--body); }
.post-body li { margin-bottom: 0.5rem; line-height: 1.7; }
.post-body strong { color: var(--ink); }
.post-body a { color: var(--blue); }

/* ---- Printable library sheets ---- */
.sheet {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
}
.sheet-intro { margin: 0 0 1.75rem; line-height: 1.7; color: var(--body); }
.sheet-section { margin-bottom: 1.75rem; }
.sheet-section h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.9rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--body);
}
.sheet-list li:last-child { border-bottom: 0; }
.sheet-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.75em;
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--blue);
    border-radius: 3px;
    background: #fff;
}
.sheet-note {
    margin: 1.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--muted);
}
.sheet-footer {
    margin: 2rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.8125rem;
    color: var(--muted);
}
@media print {
    .main-header, .main-footer, .mobile-nav, .whatsapp-widget, #scrollToTopBtn,
    .page-hero .page-links, .portfolio-modal, .background-stars, .background-aura { display: none !important; }
    body { background: #fff; }
    .page-hero { background: #fff !important; padding: 0 0 1.5rem !important; border-bottom: 1px solid var(--line); }
    .sheet { border: 0; padding: 0; border-radius: 0; }
    section.on-light { padding: 1rem 0 !important; }
}

/* ---- Four equal cards on the portfolio page ---- */
@media (min-width: 768px) {
    .portfolio-grid.uniform .portfolio-card:first-child { grid-column: auto; }
}
a.portfolio-card { color: inherit; text-decoration: none; }
a.portfolio-card .portfolio-link { text-decoration: none; }

/* ---- Modal link to the full case study ---- */
.modal-case-link {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--sky);
    text-decoration: none;
}
.modal-case-link:hover { text-decoration: underline; }

/* ---- Spacing between a card grid and the buttons under it ---- */
.related-grid + .page-links,
.pricing-grid + .page-links,
.post-list + .page-links { margin-top: 2rem; }
