/* ==========================================================================
   Huzefa JTG — main stylesheet
   One file, design tokens on :root, light + dark themes.
   ========================================================================== */

:root {
    --brand-1: #0329b1;
    --brand-2: #0d9ac1;
    --brand-1-rgb: 3, 41, 177;
    --brand-2-rgb: 13, 154, 193;
    --gradient: linear-gradient(120deg, var(--brand-1), var(--brand-2));

    --bg: #f6f8fc;
    --bg-alt: #eef2fa;
    --surface: #ffffff;
    --surface-2: #f2f5fb;
    --text: #0e1430;
    --text-muted: #556081;
    --border: rgba(14, 20, 48, .09);
    --accent: var(--brand-1);
    --accent-soft: rgba(var(--brand-1-rgb), .08);
    --shadow-sm: 0 1px 2px rgba(14, 20, 48, .05), 0 2px 8px rgba(14, 20, 48, .04);
    --shadow-lg: 0 24px 48px -16px rgba(14, 20, 48, .16);
    --nav-bg: rgba(246, 248, 252, .78);
    --logo-plate: #ffffff;

    --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-serif: "Instrument Serif", Georgia, serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --container: 1160px;
    --gutter: clamp(16px, 4vw, 40px);
    --radius: 20px;
    --radius-sm: 12px;
    --section-space: clamp(80px, 12vw, 140px);
    --ease: cubic-bezier(.2, .7, .2, 1);

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #080b17;
        --bg-alt: #0c1122;
        --surface: #10162b;
        --surface-2: #151c35;
        --text: #e9edf8;
        --text-muted: #98a2c1;
        --border: rgba(233, 237, 248, .08);
        --accent: #4fc6e6;
        --accent-soft: rgba(79, 198, 230, .1);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
        --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .6);
        --nav-bg: rgba(8, 11, 23, .72);
        --logo-plate: #eef1f8;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #080b17;
    --bg-alt: #0c1122;
    --surface: #10162b;
    --surface-2: #151c35;
    --text: #e9edf8;
    --text-muted: #98a2c1;
    --border: rgba(233, 237, 248, .08);
    --accent: #4fc6e6;
    --accent-soft: rgba(79, 198, 230, .1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, .6);
    --nav-bg: rgba(8, 11, 23, .72);
    --logo-plate: #eef1f8;
    color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .3s, color .3s;
}

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

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.025em;
}

em.serif,
.serif {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -.01em;
}

::selection {
    background: rgba(var(--brand-2-rgb), .3);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--text);
    color: var(--bg);
    font-weight: 700;
}

.skip-link:focus {
    top: 16px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

:root[data-theme="dark"] .gradient-text {
    background-image: linear-gradient(120deg, #6d8bff, #4fc6e6);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .gradient-text {
        background-image: linear-gradient(120deg, #6d8bff, #4fc6e6);
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .975rem;
    white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform .25s var(--ease);
}

.btn:hover svg {
    transform: translateX(3px);
}

.btn-primary {
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 10px 24px -10px rgba(var(--brand-1-rgb), .7);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px rgba(var(--brand-1-rgb), .8);
}

.btn-ghost {
    border: 1.5px solid var(--border);
    background: var(--surface);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-light {
    color: var(--brand-1);
    background: #fff;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .35);
}

.btn-outline-light {
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .45);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    transition: background-color .3s, box-shadow .3s, border-color .3s;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom-color: var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -.02em;
}

.brand img {
    width: 36px;
    height: 36px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color .2s, background-color .2s;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--accent-soft);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-actions .btn {
    min-height: 42px;
    padding: 0 20px;
    font-size: .925rem;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--text-muted);
    transition: color .2s, background-color .2s;
}

.icon-btn:hover {
    color: var(--text);
    background: var(--accent-soft);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-sun {
        display: block;
    }

    :root:not([data-theme="light"]) .theme-toggle .icon-moon {
        display: none;
    }
}

.menu-toggle {
    display: none;
}

@media (max-width: 860px) {
    .menu-toggle {
        display: grid;
    }

    .nav-actions .btn {
        display: none;
    }

    .nav-links {
        position: absolute;
        top: 76px;
        left: 12px;
        right: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        background: var(--surface);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .2s, transform .2s var(--ease), visibility .2s;
    }

    .nav-links a {
        padding: 14px 16px;
        border-radius: var(--radius-sm);
        font-size: 1.05rem;
        color: var(--text);
    }

    .site-header.menu-open {
        background: var(--nav-bg);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    .site-header.menu-open .nav-links {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

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

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 120px 0 80px;
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    /* soft brand glow — replaces the old 390 KB background image */
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: min(900px, 120vw);
    aspect-ratio: 1;
    z-index: -1;
    background:
        radial-gradient(closest-side, rgba(var(--brand-2-rgb), .28), transparent 70%),
        radial-gradient(closest-side at 30% 70%, rgba(var(--brand-1-rgb), .22), transparent 70%);
    filter: blur(20px);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: clamp(40px, 6vw, 80px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.eyebrow .dot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--gradient);
    display: grid;
    place-items: center;
}

.eyebrow .dot::after {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #fff;
}

.hero-greeting {
    margin-top: 28px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-muted);
}

.hero h1 {
    margin-top: 8px;
    font-size: clamp(2.6rem, 6.4vw, 4.75rem);
}

.hero h1 .serif {
    font-size: 1.08em;
}

.hero-lead {
    max-width: 34rem;
    margin-top: 24px;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 40px;
    list-style: none;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.hero-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-meta svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* Code card */
.hero-visual {
    position: relative;
}

.code-card {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .08);
    background: #0b1024;
    color: #c8d1ec;
    box-shadow: var(--shadow-lg), 0 0 0 8px rgba(var(--brand-2-rgb), .06);
    font-family: var(--font-mono);
    font-size: .9rem;
    line-height: 1.75;
    transform: rotate(1.5deg);
    transition: transform .5s var(--ease);
}

.code-card:hover {
    transform: rotate(0deg) translateY(-4px);
}

.code-card-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.code-card-bar span {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #2a3150;
}

.code-card-bar span:nth-child(1) { background: #ff5f57; }
.code-card-bar span:nth-child(2) { background: #febc2e; }
.code-card-bar span:nth-child(3) { background: #28c840; }

.code-card-bar small {
    margin-left: auto;
    font-size: .78rem;
    color: #6b759a;
}

.code-card pre {
    padding: 22px 24px 26px;
    overflow-x: auto;
    font: inherit;
}

.tok-k { color: #c792ea; }
.tok-v { color: #82aaff; }
.tok-p { color: #89ddff; }
.tok-s { color: #c3e88d; }
.tok-c { color: #5c6690; font-style: italic; }

.code-card-badge {
    position: absolute;
    left: -24px;
    bottom: -22px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-sans);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.3;
    transform: rotate(-1.5deg);
}

.code-card-badge small {
    display: block;
    font-weight: 500;
    color: var(--text-muted);
}

.code-card-badge .badge-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--gradient);
    color: #fff;
}

.code-card-badge svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        max-width: 520px;
    }
}

@media (max-width: 560px) {
    .code-card {
        font-size: .8rem;
        transform: none;
    }

    .code-card pre {
        padding-bottom: 48px;
    }

    .code-card-badge {
        left: 12px;
    }
}

/* ---------- Sections ---------- */

.section {
    padding-block: var(--section-space);
}

.section-alt {
    background: var(--bg-alt);
}

.section-head {
    max-width: 44rem;
    margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head.center {
    margin-inline: auto;
    text-align: center;
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
}

.label::before {
    content: "";
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
}

.section-head h2 {
    margin-top: 16px;
    font-size: clamp(2rem, 4.4vw, 3.25rem);
}

.section-head p {
    margin-top: 18px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

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

.about-statement {
    max-width: 56rem;
    font-size: clamp(1.6rem, 3.4vw, 2.6rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.about-statement .muted {
    color: var(--text-muted);
    font-weight: 600;
}

.values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: clamp(48px, 7vw, 72px);
    list-style: none;
}

.value {
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.value-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

.value-icon svg {
    width: 22px;
    height: 22px;
}

.value h3 {
    margin-top: 20px;
    font-size: 1.2rem;
    letter-spacing: -.01em;
}

.value p {
    margin-top: 8px;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .values {
        grid-template-columns: 1fr;
    }
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}

.service::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease);
}

.service:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service:hover::before {
    transform: scaleX(1);
}

.service-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--accent-soft);
    color: var(--accent);
}

.service-icon svg {
    width: auto;
    height: 30px;
}

.service h3 {
    margin-top: 28px;
    font-size: 1.5rem;
}

.service > p {
    margin-top: 12px;
    color: var(--text-muted);
}

.service-group {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px dashed var(--border);
}

.service-group + .service-group {
    margin-top: 20px;
    padding-top: 0;
    border-top: 0;
}

.service-group h4 {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    list-style: none;
}

.chips li {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: .85rem;
    font-weight: 600;
}

@media (max-width: 960px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 620px;
        margin-inline: auto;
    }
}

/* ---------- Process ---------- */

.process {
    position: relative;
    color: #fff;
    background: var(--gradient);
    overflow: hidden;
    isolation: isolate;
}

.process::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(600px circle at 90% 10%, rgba(255, 255, 255, .16), transparent 60%),
        radial-gradient(500px circle at 0% 100%, rgba(0, 0, 0, .2), transparent 60%);
}

.process .label {
    color: rgba(255, 255, 255, .85);
}

.process .label::before {
    background: #fff;
}

.process .section-head p {
    color: rgba(255, 255, 255, .82);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    list-style: none;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    counter-increment: step;
    transition: background-color .3s, transform .35s var(--ease);
}

.step:hover {
    background: rgba(255, 255, 255, .13);
    transform: translateY(-4px);
}

.step::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 3.5rem;
    line-height: 1;
    color: rgba(255, 255, 255, .55);
}

.step h3 {
    margin-top: 24px;
    font-size: 1.35rem;
    letter-spacing: -.01em;
}

.step p {
    margin-top: 10px;
    color: rgba(255, 255, 255, .82);
}

@media (max-width: 860px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

/* ---------- Work ---------- */

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.project:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-media {
    display: grid;
    place-items: center;
    height: 190px;
    margin: 10px 10px 0;
    border-radius: calc(var(--radius) - 8px);
    background:
        radial-gradient(circle at 20% 0%, rgba(var(--brand-2-rgb), .12), transparent 60%),
        var(--logo-plate);
}

.project-media img {
    max-height: 84px;
    max-width: 62%;
    width: auto;
    object-fit: contain;
    transition: transform .5s var(--ease);
}

.project:hover .project-media img {
    transform: scale(1.06);
}

.project-media .monogram {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 4rem;
    line-height: 1;
    color: var(--brand-1);
}

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px 24px 26px;
}

.tag {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--accent-soft);
    color: var(--accent);
}

.tag.is-live {
    background: rgba(40, 200, 64, .12);
    color: #1b8a32;
}

:root[data-theme="dark"] .tag.is-live {
    color: #5fdc76;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .tag.is-live {
        color: #5fdc76;
    }
}

.tag.is-wip {
    background: var(--surface-2);
    color: var(--text-muted);
}

.project h3 {
    margin-top: 14px;
    font-size: 1.25rem;
    letter-spacing: -.01em;
}

.project p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: .975rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 20px;
    font-weight: 700;
    font-size: .95rem;
    color: var(--accent);
}

.project-link svg {
    width: 16px;
    height: 16px;
    transition: transform .25s var(--ease);
}

.project-link:hover svg {
    transform: translate(2px, -2px);
}

.project-link.is-disabled {
    color: var(--text-muted);
    cursor: default;
}

@media (max-width: 960px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .work-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- CTA + Footer ---------- */

.cta {
    padding-bottom: 40px;
}

.cta-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 40px;
    padding: clamp(36px, 6vw, 72px);
    border-radius: calc(var(--radius) + 8px);
    color: #fff;
    background: var(--gradient);
    overflow: hidden;
    isolation: isolate;
}

.cta-card::before {
    content: "";
    position: absolute;
    right: -10%;
    top: -40%;
    width: 520px;
    aspect-ratio: 1;
    z-index: -1;
    border-radius: 999px;
    border: 70px solid rgba(255, 255, 255, .07);
}

.cta-card h2 {
    font-size: clamp(2rem, 4.4vw, 3.25rem);
}

.cta-card p {
    margin-top: 16px;
    max-width: 30rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .85);
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.cta-actions .btn {
    min-height: 54px;
    padding: 0 30px;
    font-size: 1.025rem;
}

.cta-email {
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    border-bottom: 1px solid rgba(255, 255, 255, .35);
    transition: color .2s, border-color .2s;
}

.cta-email:hover {
    color: #fff;
    border-color: #fff;
}

@media (max-width: 860px) {
    .cta-card {
        grid-template-columns: 1fr;
    }
}

.site-footer {
    padding: 48px 0 40px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.footer-tagline {
    margin-top: 6px;
    font-size: .9rem;
    color: var(--text-muted);
}

.socials {
    display: flex;
    gap: 8px;
    list-style: none;
}

.socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: color .2s, border-color .2s, transform .25s var(--ease);
}

.socials a:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-3px);
}

/* Social icons come from the existing SVG files, tinted via mask */
.s-icon {
    width: 22px;
    height: 22px;
    background: currentColor;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.s-linkedin { --icon: url(../SVG/Social/Linkedin.svg); }
.s-mail { --icon: url(../SVG/Social/Envelope.svg); }
.s-whatsapp { --icon: url(../SVG/Social/Whatsapp.svg); }
.s-phone { --icon: url(../SVG/Social/Phone.svg); }

.copyright {
    width: 100%;
    font-size: .85rem;
    color: var(--text-muted);
}

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

.contact-page {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    min-height: 100vh;
    min-height: 100svh;
}

.contact-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: clamp(32px, 5vw, 64px);
    color: #fff;
    background: var(--gradient);
    overflow: hidden;
    isolation: isolate;
}

.contact-aside::before {
    content: "";
    position: absolute;
    left: -30%;
    bottom: -25%;
    width: 560px;
    aspect-ratio: 1;
    z-index: -1;
    border-radius: 999px;
    border: 80px solid rgba(255, 255, 255, .07);
}

.contact-aside .back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
}

.contact-aside .back:hover {
    color: #fff;
}

.contact-aside .back svg {
    width: 18px;
    height: 18px;
}

.contact-aside h1 {
    margin-top: auto;
    font-size: clamp(2.2rem, 4.6vw, 3.5rem);
}

.contact-aside p {
    max-width: 28rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .85);
}

.contact-methods {
    display: grid;
    gap: 12px;
    list-style: none;
    margin-bottom: auto;
}

.contact-methods a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .08);
    transition: background-color .2s, transform .25s var(--ease);
}

.contact-methods a:hover {
    background: rgba(255, 255, 255, .16);
    transform: translateX(4px);
}

.contact-methods small {
    display: block;
    font-size: .8rem;
    color: rgba(255, 255, 255, .7);
}

.contact-methods strong {
    font-weight: 700;
    word-break: break-all;
}

.contact-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(32px, 6vw, 80px) var(--gutter);
}

.contact-form {
    width: 100%;
    max-width: 520px;
}

.contact-form h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.contact-form > p {
    margin-top: 10px;
    color: var(--text-muted);
}

.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 36px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    font-size: .9rem;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
}

.field textarea {
    min-height: 150px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-muted);
    opacity: .7;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.form-footer .btn {
    min-height: 52px;
    padding: 0 30px;
}

.form-footer .btn[disabled] {
    opacity: .6;
    cursor: wait;
    transform: none;
}

.form-status {
    font-size: .95rem;
    font-weight: 600;
}

.form-status.is-error {
    color: #d93a3a;
}

.form-status.is-success {
    color: #1b8a32;
}

.contact-theme {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: var(--surface);
    border: 1px solid var(--border);
}

@media (max-width: 860px) {
    .contact-page {
        grid-template-columns: 1fr;
    }

    .contact-aside h1 {
        margin-top: 0;
    }
}

@media (max-width: 520px) {
    .fields {
        grid-template-columns: 1fr;
    }
}

/* ---------- Error page ---------- */

.error-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 40px var(--gutter);
    text-align: center;
}

.error-page img {
    width: min(320px, 70vw);
    height: auto;
    margin: 0 auto;
}

.error-page h1 {
    margin-top: 32px;
    font-size: clamp(2.2rem, 6vw, 3.5rem);
}

.error-page p {
    margin: 14px auto 32px;
    max-width: 30rem;
    color: var(--text-muted);
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
    transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

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

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}


/* ==========================================================================
   v2 updates: wave hero background + v1-style services box
   ========================================================================== */

.hero::before {
    display: none;
}

.hero-wave {
    position: absolute;
    top: 0;
    right: 0;
    z-index: -1;
    width: 46%;
    height: 100%;
}

.hero::after {
    z-index: 0;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-inner > div {
    max-width: 640px;
}

@media (max-width: 960px) {
    .hero-wave {
        width: 38%;
        opacity: .9;
    }
}

@media (max-width: 640px) {
    .hero-wave {
        top: auto;
        bottom: 0;
        width: 100%;
        height: 22%;
    }
}

.services-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.service-col {
    padding: 56px 36px 64px;
    text-align: center;
}

.service-col + .service-col {
    border-left: 1px solid var(--border);
}

.service-col-icon {
    height: 48px;
    color: var(--accent);
}

.service-col-icon svg {
    width: auto;
    height: 100%;
    margin: 0 auto;
}

.service-col h3 {
    margin: 24px 0 12px;
    font-size: 1.4rem;
    color: var(--accent);
}

.service-col p {
    color: var(--text-muted);
}

.service-col h4 {
    margin: 28px 0 6px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--accent);
}

.service-col .tools {
    color: var(--text);
    line-height: 1.85;
}

@media (max-width: 960px) {
    .services-box {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-inline: auto;
    }

    .service-col + .service-col {
        border-left: 0;
        border-top: 1px solid var(--border);
    }
}

/* How I work: v1 style — services box overlaps the blue band, white cards with big serif numbers */

#services {
    position: relative;
    z-index: 2;
    padding-bottom: 0;
}

.process {
    margin-top: -220px;
    padding-top: calc(var(--section-space) + 220px);
    padding-bottom: calc(var(--section-space) + 20px);
}

.process::before {
    display: none;
}

.process-head {
    margin-inline: auto;
    text-align: center;
}

.process-head h2 {
    margin-top: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.process-head p {
    color: rgba(255, 255, 255, .9);
    font-weight: 500;
}

.process .steps {
    gap: 28px;
}

.process .step {
    padding: 36px 32px 40px;
    border: 0;
    border-radius: var(--radius);
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 30px 40px -24px rgba(0, 0, 0, .35);
    overflow: hidden;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.process .step:hover {
    background: var(--surface);
    transform: translateY(-4px);
}

.process .step::before {
    content: counter(step);
    position: absolute;
    top: -36px;
    right: -4px;
    font-family: "PT Serif", Georgia, serif;
    font-style: normal;
    font-size: 10rem;
    font-weight: 700;
    line-height: 1;
    color: var(--border);
}

.process .step h3 {
    position: relative;
    margin-top: 0;
    font-size: 1.6rem;
    color: var(--accent);
}

.process .step p {
    position: relative;
    margin-top: 12px;
    color: var(--text-muted);
}

@media (max-width: 960px) {
    .process {
        margin-top: -120px;
        padding-top: calc(var(--section-space) + 120px);
    }
}

#services {
    background: linear-gradient(var(--bg-alt) calc(100% - 220px), transparent 0);
}

@media (max-width: 960px) {
    #services {
        background: linear-gradient(var(--bg-alt) calc(100% - 120px), transparent 0);
    }
}

/* Headings: v1 style — centred, bold, no small labels; serif italic accents kept */

.section-head {
    margin-inline: auto;
    text-align: center;
}

.section-head h2 {
    margin-top: 0;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -.02em;
}

.section-head h2 .serif {
    font-size: 1.12em;
}

.about-statement {
    margin-top: 0 !important;
}
