@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&family=Poppins:wght@300;400;600;700;800&display=swap');
@import url('https://fonts.cdnfonts.com/css/planet-kosmos');

:root {
    --bg: #0f0f0f !important;
    --bg-color: #0f0f0f;
    --surface: rgba(255, 255, 255, 0.03) !important;
    --surface-2: rgba(255, 255, 255, 0.055) !important;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 102, 0, 0.1);
    --ink: #ffffff !important;
    --text-primary: #ffffff;
    --muted: rgba(255, 255, 255, 0.85) !important;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --accent: #ff6600 !important;
    --ai-accent: #ff6600;
    --accent-light: #ff7b25 !important;
    --accent-glow: rgba(255, 102, 0, 0.3);
    --border: rgba(255, 255, 255, 0.08) !important;
    --border-color: rgba(255, 255, 255, 0.08);
    --grad: linear-gradient(135deg, #ff6600 0%, #ff7b25 100%) !important;
    --font-heading: 'Poppins', sans-serif;
    --font-display: 'Planet Kosmos', 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

html {
    width: 100%;
    overflow-x: clip !important;
    color-scheme: dark;
    scrollbar-gutter: stable;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    color: var(--text-primary);
    background: var(--bg-color) !important;
    font-family: var(--font-body) !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 45%, transparent 0%, rgba(0, 0, 0, 0.7) 100%),
        var(--bg-color);
}

::selection {
    color: #0b0b0b;
    background: var(--accent);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f0f0f;
}

::-webkit-scrollbar-thumb {
    border: 3px solid #0f0f0f;
    border-radius: 10px;
    background: #333;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #444 #0f0f0f;
}

body :where(*:not(svg):not(path):not(circle):not(polyline):not(line):not(rect):not(canvas)) {
    font-family: var(--font-body) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
button,
.btn,
.tag {
    font-family: var(--font-heading) !important;
}

body h2,
body h3,
body h4,
body h5,
body h6 {
    font-family: var(--font-heading) !important;
}

h1,
.hero h1,
#hero-text h1,
.about-hero-header h1,
.glitch,
.error-container h1 {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
}

body h1 {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
}

.glitch,
.glitch *,
.hero h1,
.hero h1 *,
#hero-text h1,
#hero-text h1 * {
    font-family: var(--font-display) !important;
}

p,
li,
input,
textarea,
select {
    font-family: var(--font-body);
}

.grad-text,
.highlight,
.tag,
.back-link,
a:hover {
    color: var(--accent);
}

.card,
.creative-card,
.diagram-node,
.pipeline-node,
.modal-card,
.legal-container,
.model-viewer {
    border-color: var(--border-color) !important;
    background-color: var(--surface-color);
}

.mf-canvas-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.mf-canvas-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
}

#mf-theme-canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

body > .container,
body > main,
body > footer,
body > section,
.ui-layer,
.error-container,
.success-container {
    position: relative;
    z-index: 10;
}

body > .container {
    padding-top: 140px !important;
}

.noise-overlay,
.grain-overlay,
.noise {
    display: none !important;
}

#canvas-bg {
    display: block !important;
    z-index: 4 !important;
    opacity: 1;
}

.legacy-site-header {
    display: none !important;
}

.site-header {
    position: absolute;
    top: 40px;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 40px;
    pointer-events: none;
}

.site-header-logo-link,
.site-header-actions {
    pointer-events: auto;
}

.language-toggle,
.theme-toggle {
    position: relative;
    height: 36px;
    padding: 0;
    border: 1px solid var(--text-primary);
    border-radius: 999px;
    color: var(--text-primary);
    background: rgba(255, 102, 0, 0.03);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.language-toggle:hover,
.language-toggle:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--text-primary);
    box-shadow: 0 0 18px rgba(255, 102, 0, 0.16);
    outline: none;
}

.language-toggle {
    --language-shift: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 70px;
    padding-inline: 3px;
}

.language-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 31px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(145deg, #ff7b25, var(--accent));
    box-shadow: 0 4px 14px rgba(255, 102, 0, 0.3);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.language-option {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading) !important;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-align: center;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.language-es {
    color: #111;
}

.language-en {
    opacity: 0.45;
}

html[data-language="en"] .language-toggle-thumb {
    transform: translateX(var(--language-shift));
}

html[data-language="en"] .language-es {
    color: var(--text-primary);
    opacity: 0.45;
}

html[data-language="en"] .language-en {
    color: #111;
    opacity: 1;
}

.theme-toggle {
    --toggle-shift: 24px;
    width: 58px;
}

.theme-toggle-icon {
    position: absolute;
    top: 50%;
    z-index: 2;
    line-height: 1;
    transform: translateY(-50%);
    transition: opacity 0.3s ease, color 0.3s ease;
}

.theme-toggle-icon svg {
    display: block;
    width: 14px;
    height: 14px;
    overflow: visible;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle-moon {
    left: 9px;
    color: #fff;
    opacity: 1;
}

.theme-toggle-sun {
    right: 8px;
    color: rgba(255, 255, 255, 0.38);
    opacity: 0.72;
}

.theme-toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 1;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff7b25, var(--accent));
    box-shadow: 0 4px 14px rgba(255, 102, 0, 0.35);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
}

html[data-theme="light"] {
    --bg: #f3f0ea !important;
    --bg-color: #f3f0ea;
    --surface: rgba(255, 255, 255, 0.52) !important;
    --surface-2: rgba(255, 255, 255, 0.72) !important;
    --surface-color: rgba(255, 255, 255, 0.52);
    --surface-hover: rgba(255, 102, 0, 0.09);
    --ink: #171717 !important;
    --text-primary: #171717;
    --muted: rgba(23, 23, 23, 0.72) !important;
    --text-secondary: rgba(23, 23, 23, 0.72);
    --border: rgba(20, 20, 20, 0.13) !important;
    --border-color: rgba(20, 20, 20, 0.13);
    color-scheme: light;
}

html[data-theme="light"] body {
    color: var(--text-primary);
    background: var(--bg-color) !important;
}

html[data-theme="light"] body::before {
    background:
        radial-gradient(circle at 50% 45%, transparent 0%, rgba(226, 219, 209, 0.76) 100%),
        var(--bg-color);
}

html[data-theme="light"] .mf-canvas-container::after {
    background: radial-gradient(circle at center, transparent 0%, rgba(226, 219, 209, 0.76) 100%);
}

html[data-theme="light"] #mf-theme-canvas {
    opacity: 0.62;
}

html[data-theme="light"] #canvas-bg {
    opacity: 0.82;
    mix-blend-mode: multiply;
}

html[data-theme="light"] ::-webkit-scrollbar-track {
    background: #ece7df;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
    border-color: #ece7df;
    background: #b9b1a7;
}

html[data-theme="light"] * {
    scrollbar-color: #aaa198 #ece7df;
}

html[data-theme="light"] .site-header-logo {
    filter: brightness(0);
}

html[data-theme="light"] #loading .loader-logo {
    filter: brightness(0);
}

html[data-theme="light"] .site-header-logo-link:hover .site-header-logo,
html[data-theme="light"] .site-header-logo-link:focus-visible .site-header-logo {
    filter: brightness(0) saturate(100%) invert(45%) sepia(99%) saturate(3644%) hue-rotate(3deg) brightness(103%) contrast(102%) drop-shadow(0 0 10px var(--accent-glow));
}

html[data-theme="light"] .language-toggle,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .site-header-btn {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 24px rgba(58, 45, 31, 0.08);
}

html[data-theme="light"] .language-es,
html[data-theme="light"][data-language="en"] .language-es,
html[data-theme="light"][data-language="en"] .language-en {
    color: #111;
}

html[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(var(--toggle-shift));
    background: linear-gradient(145deg, #292929, #111);
    box-shadow: 0 4px 13px rgba(20, 20, 20, 0.22);
}

html[data-theme="light"] .theme-toggle-moon {
    color: rgba(20, 20, 20, 0.38);
    opacity: 0.7;
}

html[data-theme="light"] .theme-toggle-sun {
    color: #fff;
    opacity: 1;
}

html[data-theme="light"] .card,
html[data-theme="light"] .creative-card,
html[data-theme="light"] .diagram-node,
html[data-theme="light"] .pipeline-node,
html[data-theme="light"] .modal-card,
html[data-theme="light"] .legal-container,
html[data-theme="light"] .model-viewer,
html[data-theme="light"] form,
html[data-theme="light"] .input-field {
    color: #171717 !important;
    border-color: rgba(20, 20, 20, 0.14) !important;
    background: rgba(245, 241, 234, 0.88) !important;
    box-shadow: 0 20px 45px rgba(58, 45, 31, 0.1);
}

html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] .subtitle,
html[data-theme="light"] footer {
    color: var(--text-secondary) !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] .philosophy-text {
    color: var(--text-primary);
}

html[data-theme="light"] #hero-text .glitch {
    color: #171717 !important;
    -webkit-text-stroke: 3px var(--accent);
    paint-order: stroke fill;
    text-shadow: 0 0 16px rgba(255, 102, 0, 0.14);
}

html[data-theme="light"] .diagram-center,
html[data-theme="light"] .node-circle {
    border-color: rgba(20, 20, 20, 0.14);
    background-color: #f5f1ea;
}

html[data-theme="light"] .social-link,
html[data-theme="light"] .carousel-arrow,
html[data-theme="light"] .spotify-toggle {
    border-color: rgba(20, 20, 20, 0.16);
}

::view-transition-image-pair(root) {
    isolation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2;
    animation: reveal-theme 450ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes reveal-theme {
    from {
        clip-path: circle(20px at 50% 50%);
    }

    to {
        clip-path: circle(120% at 50% 50%);
    }
}

.no-transitions *:not(.theme-toggle-thumb),
.no-transitions *::before,
.no-transitions *::after {
    transition: none !important;
    animation: none !important;
}

::view-transition-group(theme-toggle-thumb) {
    z-index: 1101;
    animation-duration: 0.42s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(theme-toggle-thumb),
::view-transition-new(theme-toggle-thumb) {
    opacity: 1;
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-group(theme-toggle-moon),
::view-transition-group(theme-toggle-sun) {
    z-index: 1102;
    animation: none;
}

::view-transition-old(theme-toggle-moon),
::view-transition-old(theme-toggle-sun) {
    animation: theme-toggle-icon-out 0.3s linear both;
    mix-blend-mode: normal;
}

::view-transition-new(theme-toggle-moon),
::view-transition-new(theme-toggle-sun) {
    animation: theme-toggle-icon-in 0.3s linear both;
    mix-blend-mode: normal;
}

@keyframes theme-toggle-icon-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes theme-toggle-icon-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-new(root) {
        animation: none;
    }

    ::view-transition-group(theme-toggle-thumb),
    ::view-transition-group(theme-toggle-moon),
    ::view-transition-group(theme-toggle-sun) {
        animation: none;
    }

    ::view-transition-old(theme-toggle-moon),
    ::view-transition-old(theme-toggle-sun),
    ::view-transition-new(theme-toggle-moon),
    ::view-transition-new(theme-toggle-sun) {
        animation: none;
    }
}

.site-header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-header-logo {
    display: block;
    width: 72px;
    height: 46px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.site-header-logo-link:hover .site-header-logo,
.site-header-logo-link:focus-visible .site-header-logo {
    transform: scale(1.05);
    filter: brightness(0) saturate(100%) invert(45%) sepia(99%) saturate(3644%) hue-rotate(3deg) brightness(103%) contrast(102%) drop-shadow(0 0 10px var(--accent-glow));
}

.site-header-actions {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 25px;
    overflow: hidden;
    border: 1px solid var(--text-primary);
    border-radius: 50px;
    color: var(--text-primary);
    background: rgba(255, 102, 0, 0.03);
    text-decoration: none;
    text-transform: uppercase;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.site-header-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 0;
    background: var(--accent);
    transition: var(--transition);
}

.site-header-btn:hover,
.site-header-btn:focus-visible {
    color: #0b0b0b;
    box-shadow: 0 0 15px var(--accent-glow);
    outline: none;
}

.site-header-btn:hover::before,
.site-header-btn:focus-visible::before {
    width: 100%;
}

/* Shared CTA treatment: match the contact button in the header. */
.btn,
a.btn,
button.btn {
    position: relative !important;
    z-index: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 25px !important;
    overflow: hidden;
    border: 1px solid var(--text-primary) !important;
    border-radius: 50px !important;
    color: var(--text-primary) !important;
    background: rgba(255, 102, 0, 0.03) !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-family: var(--font-heading) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    line-height: 1;
    letter-spacing: 2px;
    backdrop-filter: blur(8px);
    box-shadow: none;
    transition: var(--transition);
}

.btn::before,
a.btn::before,
button.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 0;
    background: var(--accent);
    transition: var(--transition);
}

.btn:hover,
.btn:focus-visible,
a.btn:hover,
a.btn:focus-visible,
button.btn:hover,
button.btn:focus-visible {
    color: #0b0b0b !important;
    border-color: var(--text-primary) !important;
    box-shadow: 0 0 15px var(--accent-glow) !important;
    transform: none !important;
    outline: none;
}

.btn:hover::before,
.btn:focus-visible::before,
a.btn:hover::before,
a.btn:focus-visible::before,
button.btn:hover::before,
button.btn:focus-visible::before {
    width: 100%;
}

/* Display type for the orange words in creative vision, as in the hero. */
#vision .vision-headline {
    font-family: var(--font-heading) !important;
}

#vision .vision-headline .grad-text {
    display: inline-block;
    font-family: var(--font-display) !important;
    font-size: 1em;
    font-weight: 400 !important;
    letter-spacing: 0.035em;
    transform: scaleY(1.16);
    transform-origin: 50% 82%;
}

#filosofia .philosophy-text {
    font-family: var(--font-heading) !important;
}

#filosofia .philosophy-text .philosophy-accent {
    display: inline-block;
    font-family: var(--font-display) !important;
    font-size: 1em;
    font-weight: 400 !important;
    letter-spacing: 0.035em;
    transform: scaleY(1.16);
    transform-origin: 50% 82%;
}

/* About page title: one display family across all three words. */
.about-hero-header h1,
.about-hero-header h1 span {
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
}

/* Contact form uses the same glass, border and orange interaction language. */
#contacto .contact-shell {
    width: min(100%, 920px);
    margin: 0 auto;
}

#contacto .contact-heading {
    max-width: 680px;
    margin: 0 auto 34px;
    text-align: center;
}

#contacto .contact-title {
    margin: 16px 0 12px !important;
    color: var(--text-primary);
    font-family: var(--font-heading) !important;
    font-size: clamp(2rem, 5vw, 3.4rem) !important;
    font-weight: 700 !important;
    line-height: 1.1;
    text-transform: uppercase;
}

#contacto .contact-title .grad-text {
    display: inline-block;
    font-family: var(--font-display) !important;
    font-weight: 400 !important;
    transform: scaleY(1.1);
    transform-origin: 50% 82%;
}

#contacto .contact-intro {
    max-width: 590px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

body #contacto .contact-form {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 46px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 48%),
        rgba(10, 10, 10, 0.86) !important;
    box-shadow: 0 36px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(24px);
}

body #contacto .contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    width: 84%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 18px rgba(255, 102, 0, 0.45);
}

#contacto .input-group {
    min-width: 0;
    margin: 0;
}

#contacto .input-group-message {
    grid-column: 1 / -1;
}

#contacto .input-label {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: var(--accent);
    font-family: var(--font-heading) !important;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
}

#contacto .input-label::before {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.62rem;
    opacity: 0.45;
}

#contacto .input-group:nth-of-type(1) .input-label::before {
    content: '01';
}

#contacto .input-group:nth-of-type(2) .input-label::before {
    content: '02';
}

#contacto .input-group:nth-of-type(3) .input-label::before {
    content: '03';
}

body #contacto .input-field {
    box-sizing: border-box;
    width: 100%;
    min-height: 58px;
    padding: 17px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px;
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.035) !important;
    font-family: var(--font-body) !important;
    font-size: 0.95rem;
    line-height: 1.5;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

body #contacto .input-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.48;
}

body #contacto .input-field:hover {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

body #contacto .input-field:focus {
    border-color: var(--accent) !important;
    background: rgba(255, 102, 0, 0.045) !important;
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.08), 0 0 22px rgba(255, 102, 0, 0.08);
}

body #contacto textarea.input-field {
    min-height: 168px;
    resize: vertical;
}

#contacto .contact-submit {
    grid-column: 1 / -1;
    width: 100%;
    margin: 2px 0 0 !important;
    gap: 10px;
}

#contacto .contact-submit svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}

#contacto .contact-submit:hover svg,
#contacto .contact-submit:focus-visible svg {
    transform: translateX(4px);
}

html[data-theme="light"] body #contacto .contact-form {
    border-color: rgba(20, 20, 20, 0.1) !important;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.58), transparent 48%),
        rgba(245, 241, 234, 0.92) !important;
    box-shadow: 0 32px 74px rgba(58, 45, 31, 0.14);
    backdrop-filter: none;
}

html[data-theme="light"] body #contacto .input-field {
    border-color: rgba(20, 20, 20, 0.12) !important;
    color: #171717 !important;
    background: rgba(255, 255, 255, 0.58) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] body #contacto .input-field:hover {
    border-color: rgba(20, 20, 20, 0.24) !important;
}

html[data-theme="light"] body #contacto .input-field:focus {
    border-color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.84) !important;
}

/* Narrative service cards, based on the reference site's scroll gallery. */
body .services-scroll-section {
    position: relative;
    display: block;
    width: 100%;
    height: 450vh !important;
    height: 450svh !important;
    min-height: 450vh !important;
    min-height: 450svh !important;
    padding: 0 !important;
}

.services-sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: radial-gradient(circle at 22% 50%, rgba(255, 102, 0, 0.1), transparent 34%);
    transform: none !important;
}

body .services-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(90%, 1200px);
    height: 100%;
    margin: 0 auto;
    padding: clamp(96px, 12vh, 130px) 0 clamp(30px, 5vh, 56px) !important;
}

.services-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin-bottom: 16px;
    text-align: center;
}

.services-heading .tag {
    margin: 0;
}

.services-scroll-hint {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0.55;
}

.services-gallery {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    perspective: 1200px;
}

body .service-scroll-card {
    position: absolute;
    inset: 0;
    isolation: isolate;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 34px;
    color: var(--text-primary);
    background: #090a0c;
    text-decoration: none;
    visibility: hidden;
    opacity: 0;
    cursor: pointer;
    box-shadow: 0 0 72px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    will-change: transform, opacity;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body .service-scroll-card:first-child {
    visibility: visible;
    opacity: 1;
}

body .service-scroll-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.2;
    background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(255, 255, 255, 0.025) 4px);
    mix-blend-mode: soft-light;
}

body .service-scroll-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    z-index: 6;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent) 28%, var(--accent) 72%, transparent);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.45);
    opacity: 0.8;
}

body .service-scroll-card:hover,
body .service-scroll-card:focus-visible {
    border-color: rgba(255, 102, 0, 0.72);
    box-shadow: 0 0 78px rgba(0, 0, 0, 0.25), 0 0 34px rgba(255, 102, 0, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    outline: none;
}

.service-visual {
    position: absolute;
    inset: 0 58% 0 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 48% 48%, rgba(255, 102, 0, 0.24), transparent 26%),
        linear-gradient(120deg, rgba(255, 102, 0, 0.08), transparent 62%);
}

.service-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 42%, rgba(9, 10, 12, 0.34) 72%, #090a0c 100%),
        radial-gradient(circle at 50% 50%, transparent 0 24%, rgba(9, 10, 12, 0.12) 54%, rgba(9, 10, 12, 0.55) 100%);
}

.service-number {
    position: absolute;
    left: clamp(28px, 4vw, 58px);
    bottom: clamp(18px, 3vh, 32px);
    z-index: 4;
    color: rgba(255, 255, 255, 0.12);
    font-family: var(--font-heading) !important;
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 700;
    line-height: 0.78;
    letter-spacing: -0.08em;
}

.service-scroll-content {
    position: absolute;
    inset: 0 0 0 42%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(34px, 4.5vw, 68px) clamp(34px, 5vw, 76px);
}

.service-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--accent);
    font-family: var(--font-heading) !important;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 2.8px;
    text-transform: uppercase;
}

.service-kicker::before {
    content: '';
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border: 1px solid var(--accent);
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
    transform: rotate(45deg);
}

body .service-scroll-content h3 {
    max-width: 720px;
    margin: 0 0 18px;
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: clamp(2rem, 3.65vw, 3.75rem);
    font-weight: 600 !important;
    line-height: 1.01;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

body .service-lead {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(0.88rem, 1.05vw, 1.02rem);
    line-height: 1.68;
}

.service-card-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: clamp(22px, 3.2vh, 36px);
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.service-card-details > div {
    min-width: 0;
    padding: 0 20px;
}

.service-card-details > div:first-child {
    padding-left: 0;
}

.service-card-details > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card-details span {
    display: block;
    margin-bottom: 7px;
    color: var(--accent);
    font-family: var(--font-heading) !important;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

body .service-card-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.74rem;
    line-height: 1.58;
}

.service-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: clamp(18px, 2.7vh, 30px);
}

.service-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.service-tech-list span {
    padding: 6px 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.035);
    font-family: var(--font-body) !important;
    font-size: 0.58rem;
    letter-spacing: 0.35px;
}

.service-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 102, 0, 0.62);
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.service-card-cta b {
    color: var(--accent);
    font-size: 0.92rem;
    transition: transform 0.3s ease;
}

.service-scroll-card:hover .service-card-cta b {
    transform: translate(3px, -3px);
}

body .services-scroll-section.services-reduced-motion {
    height: auto !important;
    min-height: 0 !important;
}

.services-reduced-motion .services-sticky {
    position: relative;
    height: auto;
    overflow: visible;
}

.services-reduced-motion .services-stage {
    min-height: 100vh;
}

.services-reduced-motion .services-gallery {
    display: grid;
    gap: 24px;
}

.services-reduced-motion .service-scroll-card {
    position: relative;
    min-height: 620px;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

html[data-theme="light"] .services-sticky {
    background: radial-gradient(circle at 22% 50%, rgba(255, 102, 0, 0.1), transparent 34%);
}

html[data-theme="light"] body .service-scroll-card {
    border-color: rgba(20, 20, 20, 0.12);
    background: #f5f1ea;
    box-shadow: 0 34px 76px rgba(58, 45, 31, 0.15);
}

html[data-theme="light"] .service-visual {
    background:
        radial-gradient(circle at 48% 48%, rgba(255, 102, 0, 0.2), transparent 26%),
        linear-gradient(120deg, rgba(255, 102, 0, 0.08), transparent 62%);
}

html[data-theme="light"] .service-visual::after {
    background:
        linear-gradient(90deg, transparent 0 42%, rgba(245, 241, 234, 0.34) 72%, #f5f1ea 100%),
        radial-gradient(circle at 50% 50%, transparent 0 24%, rgba(245, 241, 234, 0.1) 54%, rgba(226, 219, 209, 0.56) 100%);
}

html[data-theme="light"] .service-number {
    color: rgba(23, 23, 23, 0.1);
}

html[data-theme="light"] body .service-scroll-content h3,
html[data-theme="light"] .service-card-cta {
    color: #171717;
}

html[data-theme="light"] body .service-lead,
html[data-theme="light"] body .service-card-details p,
html[data-theme="light"] .service-tech-list span {
    color: rgba(23, 23, 23, 0.66);
}

html[data-theme="light"] .service-card-details {
    border-color: rgba(20, 20, 20, 0.11);
}

html[data-theme="light"] .service-card-details > div + div {
    border-color: rgba(20, 20, 20, 0.1);
}

html[data-theme="light"] .service-tech-list span {
    border-color: rgba(20, 20, 20, 0.1);
    background: rgba(20, 20, 20, 0.025);
}

/* Footer adapted from the reference site. */
body .mf-site-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 100px 0 50px !important;
    color: var(--text-primary);
    background: transparent !important;
    border: 0 !important;
}

.mf-footer-contact {
    margin: 0 auto 50px;
    padding: 0 20px;
    text-align: center;
}

.mf-footer-question {
    margin: 0 0 20px;
    color: var(--text-primary);
    font-family: var(--font-heading) !important;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600 !important;
}

body .mf-footer-cta {
    margin: 0 !important;
}

.footer-reveal-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

body .footer-card {
    width: min(90%, 700px);
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 30px;
    background: rgba(10, 10, 10, 0.9) !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(30px);
    text-align: center;
    transition: var(--transition);
}

body .footer-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 102, 0, 0.3) !important;
    box-shadow: 0 50px 120px rgba(0, 0, 0, 1);
}

.footer-info {
    margin-bottom: 30px;
}

.footer-card .glitch-wrapper {
    display: block;
    width: 100%;
}

body .footer-name {
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--font-display) !important;
    font-size: clamp(1.05rem, 3vw, 1.5rem) !important;
    font-weight: 400 !important;
    line-height: 1.2;
    letter-spacing: 2px;
    white-space: nowrap;
    transition: var(--transition);
}

.footer-name span {
    color: var(--accent);
    font-family: inherit !important;
}

.footer-card:hover .footer-name {
    color: var(--accent);
    filter: drop-shadow(0 0 10px rgba(255, 102, 0, 0.3));
    transform: scale(1.05);
}

body .footer-phrase {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-card:hover .footer-phrase {
    color: #fff;
    opacity: 1;
}

body .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 0 0 30px;
}

body .footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

body .footer-btn svg {
    box-sizing: content-box;
    width: 20px;
    height: 20px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    transition: var(--transition);
}

body .footer-btn:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

body .footer-btn:hover svg,
body .footer-btn:focus-visible svg {
    border-color: var(--accent);
    background: rgba(255, 102, 0, 0.1);
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.2);
}

body .footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

body .footer-legal a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

body .footer-legal a:hover,
body .footer-legal a:focus-visible {
    color: var(--accent);
}

body .footer-copy {
    margin: 30px 0 0;
    color: var(--text-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-align: center;
    opacity: 0.6;
}

html[data-theme="light"] .btn,
html[data-theme="light"] a.btn,
html[data-theme="light"] button.btn {
    border-color: var(--text-primary) !important;
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.68) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 24px rgba(58, 45, 31, 0.08);
}

html[data-theme="light"] .btn:hover,
html[data-theme="light"] .btn:focus-visible {
    color: #0b0b0b !important;
}

html[data-theme="light"] body .footer-card {
    border-color: rgba(20, 20, 20, 0.1) !important;
    background: #f5f1ea !important;
    box-shadow: 0 36px 84px rgba(58, 45, 31, 0.16);
    backdrop-filter: none;
}

html[data-theme="light"] body .footer-card:hover {
    border-color: rgba(255, 102, 0, 0.3) !important;
    box-shadow: 0 42px 96px rgba(58, 45, 31, 0.2);
}

html[data-theme="light"] body .footer-name,
html[data-theme="light"] .mf-footer-question,
html[data-theme="light"] .footer-card:hover .footer-phrase {
    color: #171717;
}

html[data-theme="light"] body .footer-btn svg {
    background: rgba(20, 20, 20, 0.035);
}

html[data-theme="light"] body .footer-legal a {
    color: rgba(23, 23, 23, 0.52);
}

html[data-theme="light"] .client-logo--mono {
    filter: brightness(0) !important;
    opacity: 0.82;
}

html[data-theme="light"] .client-logo--mono:hover {
    filter: brightness(0) saturate(100%) invert(45%) sepia(99%) saturate(3644%) hue-rotate(3deg) brightness(103%) contrast(102%) !important;
    opacity: 1;
}

@media (max-width: 768px) {
    .site-header {
        top: 20px;
        padding: 0 20px;
    }

    .site-header-actions {
        top: 20px;
        right: 20px;
        gap: 8px;
    }

    .theme-toggle {
        --toggle-shift: 20px;
        width: 50px;
        height: 32px;
    }

    .language-toggle {
        --language-shift: 28px;
        width: 62px;
        height: 32px;
    }

    .language-toggle-thumb {
        width: 27px;
        height: 24px;
    }

    .theme-toggle-thumb {
        width: 22px;
        height: 22px;
    }

    .theme-toggle-icon svg {
        width: 12px;
        height: 12px;
    }

    .site-header-logo {
        width: 58px;
        height: 38px;
    }

    .site-header-btn {
        min-height: 32px;
        padding: 7px 14px;
        font-size: 0.61rem;
        letter-spacing: 1.2px;
    }

    .btn,
    a.btn,
    button.btn {
        min-height: 32px;
        padding: 7px 14px !important;
        font-size: 0.61rem !important;
        letter-spacing: 1.2px;
    }

    body .mf-site-footer {
        padding: 72px 0 34px !important;
    }

    .mf-footer-contact {
        margin-bottom: 36px;
    }

    body .footer-card {
        width: calc(100% - 30px);
        padding: 30px 15px;
    }

    body .footer-name {
        max-width: 100%;
        font-size: clamp(0.86rem, 4.8vw, 1.05rem) !important;
        letter-spacing: 1px;
    }

    body .footer-phrase {
        margin-top: 15px;
        font-size: 0.78rem;
    }

    body .footer-legal {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: min(100%, 220px);
        margin-inline: auto;
        gap: 10px;
        justify-items: center;
    }

    #contacto .contact-heading {
        margin-bottom: 26px;
    }

    #contacto {
        padding-top: 100px !important;
        scroll-margin-top: 0;
    }

    #contacto .contact-intro {
        font-size: 0.9rem;
    }

    body #contacto .contact-form {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 22px 18px;
        border-radius: 24px;
    }

    #contacto .input-group-message,
    #contacto .contact-submit {
        grid-column: 1;
    }

    body #contacto .input-field {
        min-height: 54px;
        padding: 15px 16px;
        font-size: 0.9rem;
    }

    body #contacto textarea.input-field {
        min-height: 142px;
    }

    body .services-stage {
        width: calc(100% - 30px);
        padding: 82px 0 22px !important;
    }

    .services-heading {
        margin-bottom: 10px;
    }

    .services-scroll-hint {
        font-size: 0.48rem;
        letter-spacing: 1.25px;
    }

    .services-gallery {
        flex: 0 0 min(620px, calc(100svh - 142px));
        height: min(620px, calc(100svh - 142px));
        min-height: 0;
    }

    body .service-scroll-card {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(170px, 40%) minmax(0, 60%);
        border-radius: 24px;
    }

    body .service-scroll-card::after {
        left: 12%;
        right: 12%;
    }

    .service-visual {
        position: relative;
        inset: auto;
        width: 100%;
        min-height: 0;
    }

    .service-visual::after {
        background: linear-gradient(180deg, transparent 0 48%, #090a0c 100%);
    }

    html[data-theme="light"] .service-visual::after {
        background: linear-gradient(180deg, transparent 0 48%, #f5f1ea 100%);
    }

    .service-number {
        top: 14px;
        bottom: auto;
        left: 16px;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.68rem;
        line-height: 1;
        letter-spacing: 0.14em;
    }

    html[data-theme="light"] .service-number {
        color: rgba(23, 23, 23, 0.58);
    }

    .service-scroll-content {
        position: relative;
        inset: auto;
        min-height: 0;
        padding: 17px 19px 16px;
        justify-content: flex-start;
    }

    .service-kicker {
        margin-bottom: 8px;
        font-size: 0.52rem;
        letter-spacing: 1.8px;
    }

    .service-kicker::before {
        width: 5px;
        height: 5px;
    }

    body .service-scroll-content h3 {
        margin-bottom: 8px;
        font-size: clamp(1.35rem, 6.2vw, 1.75rem);
        line-height: 1.04;
    }

    body .service-lead {
        font-size: 0.74rem;
        line-height: 1.45;
    }

    .service-card-details {
        margin-top: 11px;
        padding: 10px 0;
    }

    .service-card-details > div {
        padding: 0 9px;
    }

    .service-card-details > div:first-child {
        padding-left: 0;
    }

    .service-card-details > div + div {
        padding-right: 0;
    }

    .service-card-details span {
        margin-bottom: 4px;
        font-size: 0.48rem;
        letter-spacing: 1.2px;
    }

    body .service-card-details p {
        font-size: 0.61rem;
        line-height: 1.4;
    }

    .service-card-footer {
        align-items: center;
        margin-top: auto;
        padding-top: 10px;
    }

    .service-tech-list {
        gap: 4px;
    }

    .service-tech-list span {
        padding: 4px 7px;
        font-size: 0.48rem;
    }

    .service-card-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 1px solid rgba(255, 102, 0, 0.58);
        border-radius: 50%;
        font-size: 0;
        overflow: hidden;
    }

    .service-card-cta > span {
        display: none;
    }

    .service-card-cta b {
        font-size: 0.92rem;
    }

    body > .container {
        padding-top: 105px !important;
    }

    h1,
    .hero h1,
    #hero-text h1,
    .about-hero-header h1,
    .glitch {
        letter-spacing: 0 !important;
    }
}

/* Mobile portfolio: full-width native horizontal reel. */
@media (max-width: 768px) {
    #portfolio .carousel-wrapper {
        width: 100vw;
        max-width: none;
        margin-inline: calc(50% - 50vw);
        padding: 0;
    }

    #portfolio .carousel-view {
        width: 100vw;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 2.5vw;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
    }

    #portfolio .carousel-view::-webkit-scrollbar {
        display: none;
    }

    #portfolio .video-carousel {
        display: block;
        width: max-content;
        height: auto;
        aspect-ratio: auto;
        cursor: default;
    }

    #portfolio .carousel-track {
        position: relative;
        display: flex;
        width: max-content;
        height: auto;
        gap: 3vw;
        padding-inline: 2.5vw;
        transform: none !important;
        transition: none !important;
    }

    #portfolio .carousel-slide,
    #portfolio .carousel-slide.active-slide {
        position: relative;
        inset: auto;
        flex: 0 0 90vw;
        width: 90vw;
        height: auto;
        aspect-ratio: 16 / 9;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    #portfolio .carousel-slide img,
    #portfolio .carousel-slide iframe,
    #portfolio .carousel-slide .play-overlay {
        width: 100% !important;
        height: 100% !important;
        border-radius: 10px;
    }

    #portfolio .carousel-arrows {
        display: none !important;
    }
}

/* Hero title: same bottom alignment and single-line treatment as the reference site */
#hero-text {
    min-height: 100vh !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}

#hero-text > .container {
    width: 90% !important;
    max-width: 1200px !important;
    min-height: 100vh !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

#hero-text .hero-content {
    position: relative;
    z-index: 20;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 100%;
    min-height: 100vh;
    padding: 0 0 clamp(28px, 4.5vh, 54px) !important;
}

#hero-text h1 {
    position: relative;
    top: 0;
    display: block;
    width: 100%;
    margin: 0 0 20px !important;
    font-size: clamp(3rem, 7vw, 6rem) !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    letter-spacing: 4px !important;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

#hero-text .glitch-wrapper {
    display: inline-flex !important;
    align-items: baseline;
    justify-content: center;
    width: auto !important;
    max-width: 100%;
    padding: 0 !important;
    gap: 0.16em;
    white-space: nowrap;
}

#hero-text .hero-mobile-break {
    display: none !important;
}

@media (max-width: 768px) {
    #hero-text > .container {
        width: calc(100% - 24px) !important;
        min-height: 100svh !important;
    }

    #hero-text .hero-content {
        min-height: 100svh;
        padding: 90px 0 98px !important;
    }

    body.mf-visual-refresh #hero-text h1,
    body.mf-visual-refresh #hero-text h1 .grad-text {
        margin: 0 !important;
        font-size: clamp(1.45rem, 8.1vw, 2.05rem) !important;
        line-height: 1.1 !important;
        letter-spacing: 1px !important;
    }

    #hero-text .glitch-wrapper {
        gap: 0.12em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header-logo,
    .site-header-btn,
    .site-header-btn::before {
        transition-duration: 0.01ms !important;
    }
}

/* Services cards v2: cinematic imagery and a cleaner editorial hierarchy. */
body .service-scroll-card {
    border-radius: 30px;
    background: #0b0b0c;
}

.service-visual {
    inset: 0 auto 0 0;
    width: 45%;
    border: 0;
    border-radius: 0;
    background: #050505;
}

.service-card-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.92) contrast(1.04);
    transform: scale(1.015);
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.service-scroll-card:hover .service-card-image,
.service-scroll-card:focus-visible .service-card-image {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.055);
}

.service-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(4, 4, 4, 0.08) 25%, rgba(4, 4, 4, 0.78) 100%),
        linear-gradient(90deg, transparent 56%, rgba(4, 4, 4, 0.72) 100%);
}

.service-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(115deg, rgba(255, 102, 0, 0.2), transparent 34%),
        repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 255, 255, 0.018) 5px);
    mix-blend-mode: screen;
}

.service-number {
    top: 25px;
    bottom: auto;
    left: 25px;
    z-index: 4;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    color: #fff;
    background: rgba(5, 5, 5, 0.42);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.16em;
    backdrop-filter: blur(10px);
}

.service-image-caption {
    position: absolute;
    left: 25px;
    bottom: 23px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-heading) !important;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.service-image-caption::before {
    content: '';
    width: 22px;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.service-scroll-content {
    inset: 0 0 0 45%;
    justify-content: flex-start;
    padding: clamp(38px, 4.3vw, 62px) clamp(34px, 4.8vw, 68px);
}

.service-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: clamp(22px, 3.2vh, 34px);
}

.service-card-topline .service-kicker {
    margin: 0;
}

.service-card-count {
    color: rgba(255, 255, 255, 0.38);
    font-family: var(--font-heading) !important;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    white-space: nowrap;
}

body .service-scroll-content h3 {
    max-width: 620px;
    margin-bottom: 15px;
    font-size: clamp(2.25rem, 3.6vw, 3.8rem);
    line-height: 0.98;
}

body .service-lead {
    max-width: 610px;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(0.9rem, 1.05vw, 1.05rem);
    line-height: 1.58;
}

.service-scroll-content > .service-tech-list {
    margin-top: clamp(18px, 2.6vh, 28px);
}

.service-tech-list span {
    padding: 7px 12px;
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.56rem;
    font-weight: 600;
}

.service-card-details {
    gap: 10px;
    margin-top: auto;
    padding: 0;
    border: 0;
}

.service-card-details > div {
    position: relative;
    min-height: 88px;
    padding: 17px 18px 16px 46px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.025);
}

.service-card-details > div:first-child {
    padding-left: 46px;
}

.service-card-details > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.service-card-details > div::before {
    position: absolute;
    top: 16px;
    left: 16px;
    color: var(--accent);
    font-family: var(--font-heading) !important;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.service-card-details > div:first-child::before {
    content: '01';
}

.service-card-details > div:nth-child(2)::before {
    content: '02';
}

.service-card-details span {
    margin-bottom: 6px;
}

body .service-card-details p {
    font-size: 0.7rem;
    line-height: 1.48;
}

.service-card-footer {
    justify-content: flex-end;
    margin-top: 15px;
}

.service-card-cta {
    position: relative;
    z-index: 1;
    min-height: 38px;
    padding: 10px 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 999px;
    color: #fff;
    background: transparent;
    font-size: 0.6rem;
    letter-spacing: 1.45px;
    transition: color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.service-card-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 0;
    background: var(--accent);
    transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-scroll-card:hover .service-card-cta,
.service-scroll-card:focus-visible .service-card-cta {
    border-color: var(--accent);
    color: #090909;
    box-shadow: 0 0 18px rgba(255, 102, 0, 0.24);
}

.service-scroll-card:hover .service-card-cta::before,
.service-scroll-card:focus-visible .service-card-cta::before {
    width: 100%;
}

.service-scroll-card:hover .service-card-cta b,
.service-scroll-card:focus-visible .service-card-cta b {
    color: #090909;
}

html[data-theme="light"] body .service-scroll-card {
    background: #f5f1ea;
}

html[data-theme="light"] .service-visual,
html[data-theme="light"] .service-visual::after {
    background-color: #080808;
}

html[data-theme="light"] .service-visual::after {
    background:
        linear-gradient(115deg, rgba(255, 102, 0, 0.18), transparent 34%),
        repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 255, 255, 0.018) 5px);
}

html[data-theme="light"] .service-number {
    color: #fff;
}

html[data-theme="light"] .service-card-count {
    color: rgba(23, 23, 23, 0.42);
}

html[data-theme="light"] .service-card-details > div {
    border-color: rgba(20, 20, 20, 0.1);
    background: rgba(255, 255, 255, 0.42);
}

html[data-theme="light"] .service-card-details > div + div {
    border-left-color: rgba(20, 20, 20, 0.1);
}

html[data-theme="light"] .service-card-cta {
    border-color: rgba(23, 23, 23, 0.76);
    color: #171717;
}

@media (max-width: 768px) {
    body .service-scroll-card {
        grid-template-rows: minmax(185px, 43%) minmax(0, 57%);
        border-radius: 24px;
    }

    .service-visual {
        inset: auto;
        width: 100%;
        border: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 0;
    }

    .service-visual::before {
        background: linear-gradient(180deg, rgba(4, 4, 4, 0.04) 34%, rgba(4, 4, 4, 0.86) 100%);
    }

    .service-number {
        top: 15px;
        left: 15px;
        padding: 6px 9px;
        color: #fff;
        background: rgba(5, 5, 5, 0.4);
        font-size: 0.54rem;
    }

    .service-image-caption {
        left: 16px;
        bottom: 14px;
        font-size: 0.49rem;
    }

    .service-scroll-content {
        inset: auto;
        padding: 15px 17px 15px;
    }

    .service-card-topline {
        margin-bottom: 8px;
    }

    .service-card-topline .service-kicker {
        margin: 0;
    }

    .service-card-count {
        font-size: 0.48rem;
    }

    body .service-scroll-content h3 {
        margin-bottom: 7px;
        font-size: clamp(1.38rem, 6.35vw, 1.72rem);
    }

    body .service-lead {
        font-size: 0.69rem;
        line-height: 1.42;
    }

    .service-scroll-content > .service-tech-list {
        margin-top: 9px;
    }

    .service-tech-list span {
        padding: 4px 7px;
        font-size: 0.45rem;
    }

    .service-card-details {
        gap: 6px;
        margin-top: auto;
    }

    .service-card-details > div,
    .service-card-details > div:first-child {
        min-height: 64px;
        padding: 10px 9px 9px 29px;
        border-radius: 10px;
    }

    .service-card-details > div::before {
        top: 10px;
        left: 9px;
        font-size: 0.45rem;
    }

    .service-card-details span {
        margin-bottom: 3px;
        font-size: 0.43rem;
        letter-spacing: 1px;
    }

    body .service-card-details p {
        font-size: 0.55rem;
        line-height: 1.32;
    }

    .service-card-footer {
        margin-top: 7px;
        padding-top: 0;
    }

    .service-card-cta {
        display: inline-flex;
        flex: 0 0 auto;
        width: auto;
        height: 31px;
        min-height: 31px;
        padding: 7px 13px;
        border-radius: 999px;
        font-size: 0.5rem;
    }

    .service-card-cta > span {
        display: inline;
    }

    .service-card-cta b {
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-card-image,
    .service-card-cta,
    .service-card-cta::before {
        transition-duration: 0.01ms !important;
    }
}

/* Method section v2: editorial process sequence. */
body .method-section {
    position: relative;
    display: block;
    min-height: 100vh;
    padding: clamp(120px, 15vh, 170px) 5% !important;
    text-align: left;
}

body .method-container {
    width: min(90%, 1200px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 !important;
    text-align: left;
}

.method-container > .tag {
    display: block;
    margin-bottom: clamp(38px, 6vh, 70px);
}

.method-shell {
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(520px, 1.22fr);
    gap: clamp(50px, 8vw, 110px);
    align-items: start;
}

.method-intro {
    position: sticky;
    top: 110px;
    left: auto;
    z-index: auto;
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    text-align: left;
    pointer-events: auto;
}

.method-code {
    display: block;
    margin-bottom: 21px;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-heading) !important;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

body .method-title {
    margin: 0;
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: clamp(3.1rem, 5vw, 5rem);
    font-weight: 700 !important;
    line-height: 0.88;
    letter-spacing: -0.065em;
}

.method-title span {
    color: var(--accent);
    font: inherit !important;
}

body .method-summary {
    max-width: 410px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: clamp(0.9rem, 1.08vw, 1.02rem);
    line-height: 1.7;
}

.method-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    width: min(100%, 340px);
    margin-top: 34px;
}

.method-progress span {
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleX(0);
    transform-origin: left center;
}

.method-shell.active .method-progress span {
    background: var(--accent);
    transform: scaleX(1);
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.method-shell.active .method-progress span:nth-child(2) {
    transition-delay: 0.12s;
}

.method-shell.active .method-progress span:nth-child(3) {
    transition-delay: 0.24s;
}

.method-shell.active .method-progress span:nth-child(4) {
    transition-delay: 0.36s;
}

.method-steps {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.method-step {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 42px;
    gap: 18px;
    align-items: center;
    min-height: 148px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.6s ease,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s ease;
}

.method-step::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.13), rgba(255, 102, 0, 0.025));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.method-step::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.4s ease;
}

.method-shell.active .method-step {
    opacity: 1;
    transform: translateY(0);
}

.method-shell.active .method-step:nth-child(2) {
    transition-delay: 0.1s;
}

.method-shell.active .method-step:nth-child(3) {
    transition-delay: 0.2s;
}

.method-shell.active .method-step:nth-child(4) {
    transition-delay: 0.3s;
}

.method-step:hover,
.method-step:focus-within {
    border-color: rgba(255, 102, 0, 0.42);
}

.method-step:hover::before,
.method-step:focus-within::before {
    transform: scaleX(1);
}

.method-step:hover::after,
.method-step:focus-within::after {
    transform: scaleY(1);
}

.method-step-number {
    color: rgba(255, 255, 255, 0.18);
    font-family: var(--font-heading) !important;
    font-size: clamp(2.1rem, 3.6vw, 3.25rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.06em;
    transition: color 0.35s ease, transform 0.35s ease;
}

.method-step:hover .method-step-number,
.method-step:focus-within .method-step-number {
    color: var(--accent);
    transform: translateX(8px);
}

.method-step-copy {
    min-width: 0;
    padding: 25px 0;
}

.method-step .node-status {
    margin-bottom: 8px;
    color: var(--accent);
    font-family: var(--font-heading) !important;
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.method-step .node-content {
    text-align: left;
    transform: none !important;
}

body .method-step .node-content h3 {
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: clamp(1.3rem, 2vw, 1.82rem);
    font-weight: 600 !important;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

body .method-step .node-content p {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    line-height: 1.58;
}

.method-step-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.52);
    font-family: var(--font-heading) !important;
    font-size: 0.88rem;
    transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.method-step:hover .method-step-mark,
.method-step:focus-within .method-step-mark {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(-45deg);
}

html[data-theme="light"] .method-code,
html[data-theme="light"] body .method-summary,
html[data-theme="light"] body .method-step .node-content p {
    color: rgba(23, 23, 23, 0.58);
}

html[data-theme="light"] body .method-title,
html[data-theme="light"] body .method-step .node-content h3 {
    color: #171717;
}

html[data-theme="light"] .method-progress span,
html[data-theme="light"] .method-steps,
html[data-theme="light"] .method-step {
    border-color: rgba(23, 23, 23, 0.13);
}

html[data-theme="light"] .method-step-number {
    color: rgba(23, 23, 23, 0.16);
}

html[data-theme="light"] .method-step-mark {
    border-color: rgba(23, 23, 23, 0.18);
    color: rgba(23, 23, 23, 0.52);
}

@media (max-width: 900px) {
    body .method-section {
        padding: 110px 5% !important;
    }

    .method-shell {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .method-intro {
        position: relative;
        top: auto;
    }

    body .method-title {
        font-size: clamp(3.1rem, 11vw, 5.2rem);
    }

    body .method-summary {
        max-width: 560px;
    }

    .method-progress {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 600px) {
    body .method-section {
        min-height: 0;
        padding: 95px 15px !important;
    }

    body .method-container {
        width: 100%;
    }

    .method-container > .tag {
        margin-bottom: 35px;
    }

    .method-shell {
        gap: 38px;
    }

    .method-code {
        margin-bottom: 16px;
        font-size: 0.5rem;
    }

    body .method-title {
        font-size: clamp(2.7rem, 15vw, 4rem);
    }

    body .method-summary {
        margin-top: 20px;
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .method-progress {
        margin-top: 24px;
    }

    .method-step {
        grid-template-columns: 48px minmax(0, 1fr) 30px;
        gap: 10px;
        min-height: 126px;
    }

    .method-step-number {
        font-size: 1.8rem;
    }

    .method-step-copy {
        padding: 20px 0;
    }

    .method-step .node-status {
        margin-bottom: 6px;
        font-size: 0.45rem;
        letter-spacing: 0.13em;
    }

    body .method-step .node-content h3 {
        font-size: 1.12rem;
    }

    body .method-step .node-content p {
        font-size: 0.68rem;
        line-height: 1.48;
    }

    .method-step-mark {
        width: 28px;
        height: 28px;
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .method-progress span,
    .method-step,
    .method-step::before,
    .method-step::after,
    .method-step-number,
    .method-step-mark {
        transition-duration: 0.01ms !important;
    }
}

/* ── Creative ecosystem / connected system ─────────────────────────────── */
#diagrama {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(110px, 14vh, 160px) 0 !important;
    overflow: hidden;
}

#diagrama::before {
    content: '';
    position: absolute;
    inset: 12% 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255, 102, 0, 0.075), transparent 42%);
}

#diagrama > .container {
    position: relative;
    z-index: 1;
    width: min(90%, 1200px);
    margin: 0 auto;
}

#diagrama .tag {
    display: block;
    margin-bottom: clamp(36px, 5vw, 62px);
}

.creative-diagram-stage {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 520px;
    align-items: center;
    justify-content: center;
}

.creative-tech-diagram {
    --creative-connection-length: 250px;
    --creative-scan-distance: 470px;
    position: relative;
    isolation: isolate;
    width: min(100%, 820px);
    height: 500px;
}

.creative-tech-diagram::before {
    content: '';
    position: absolute;
    inset: 5% 3%;
    z-index: -2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(circle at center, #000 18%, transparent 72%);
    mask-image: radial-gradient(circle at center, #000 18%, transparent 72%);
}

.creative-tech-diagram::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 12%;
    right: 12%;
    z-index: -1;
    height: 1px;
    opacity: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 102, 0, 0.7), transparent);
    box-shadow: 0 0 18px rgba(255, 102, 0, 0.3);
}

.creative-diagram-stage.active .creative-tech-diagram::after {
    animation: creative-diagram-scan 7s 1s ease-in-out infinite;
}

.creative-diagram-grid {
    position: absolute;
    inset: 11%;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    opacity: 0;
    background: radial-gradient(circle at center, rgba(255, 102, 0, 0.1), transparent 58%);
    transform: scale(0.86);
    transition: opacity 0.8s 0.1s ease, transform 1s 0.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.creative-diagram-stage.active .creative-diagram-grid {
    opacity: 1;
    transform: scale(1);
}

.creative-diagram-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.8s 0.25s ease;
}

.creative-diagram-ring::before,
.creative-diagram-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 13px rgba(255, 102, 0, 0.82);
}

.creative-diagram-ring::before {
    top: -4px;
    left: 50%;
    width: 7px;
    height: 7px;
}

.creative-diagram-ring::after {
    right: 10%;
    bottom: 12%;
    width: 4px;
    height: 4px;
    opacity: 0.72;
}

.creative-diagram-ring-outer {
    width: 376px;
    height: 376px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right-color: rgba(255, 102, 0, 0.2);
    border-left-color: rgba(255, 102, 0, 0.48);
}

.creative-diagram-ring-inner {
    width: 232px;
    height: 232px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-top-color: rgba(255, 102, 0, 0.58);
}

.creative-diagram-stage.active .creative-diagram-ring {
    opacity: 1;
}

.creative-diagram-stage.active .creative-diagram-ring-outer {
    animation: creative-diagram-spin 28s 0.25s linear infinite;
}

.creative-diagram-stage.active .creative-diagram-ring-inner {
    animation: creative-diagram-spin-reverse 19s 0.25s linear infinite;
}

.creative-connection {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: var(--creative-connection-length);
    height: 1px;
    opacity: 0;
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.72), rgba(255, 255, 255, 0.09));
    transform-origin: left center;
    transition: opacity 0.55s 0.55s ease;
}

.creative-connection::before {
    content: '';
    position: absolute;
    inset: -2px 0;
    opacity: 0.36;
    background: inherit;
    filter: blur(4px);
}

.creative-diagram-stage.active .creative-connection {
    opacity: 1;
}

.creative-connection-film {
    transform: rotate(-132deg);
}

.creative-connection-music {
    transform: rotate(-48deg);
}

.creative-connection-post {
    transform: rotate(48deg);
}

.creative-connection-direction {
    transform: rotate(132deg);
}

.creative-signal {
    position: absolute;
    top: -3px;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    opacity: 0;
    background: #fff;
    box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
}

.creative-diagram-stage.active .creative-signal {
    animation: creative-diagram-signal 3.8s 1s ease-in-out infinite;
}

.creative-connection-music .creative-signal {
    animation-delay: 0.05s;
}

.creative-connection-post .creative-signal {
    animation-delay: -0.9s;
}

.creative-connection-direction .creative-signal {
    animation-delay: -1.85s;
}

.creative-diagram-core {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 8;
    width: 150px;
    height: 150px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.68) rotate(-6deg);
    transition:
        opacity 0.65s 0.25s ease,
        transform 0.95s 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.creative-diagram-stage.active .creative-diagram-core {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0);
}

.creative-core-halo {
    position: absolute;
    inset: -10px;
    border-radius: 40px;
    background: conic-gradient(from 45deg, transparent 0 22%, var(--accent) 28%, transparent 34% 70%, rgba(255, 255, 255, 0.34) 76%, transparent 82%);
    -webkit-mask-image: radial-gradient(circle, transparent 66%, #000 68%);
    mask-image: radial-gradient(circle, transparent 66%, #000 68%);
    filter: drop-shadow(0 0 9px rgba(255, 102, 0, 0.6));
}

.creative-diagram-stage.active .creative-core-halo {
    animation: creative-core-halo-spin 8s 0.8s linear infinite;
}

.creative-core-node {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
    padding: 17px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    overflow: hidden;
    border: 1px solid rgba(255, 102, 0, 0.55);
    border-radius: 31px;
    background:
        linear-gradient(145deg, rgba(255, 102, 0, 0.14), transparent 48%),
        rgba(8, 8, 8, 0.94);
    box-shadow:
        0 26px 76px rgba(0, 0, 0, 0.58),
        inset 0 1px 0 rgba(255, 255, 255, 0.09),
        0 0 38px rgba(255, 102, 0, 0.14);
    backdrop-filter: blur(16px);
}

.creative-core-eyebrow {
    color: rgba(255, 255, 255, 0.46);
    font-family: var(--font-heading) !important;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.creative-core-logo {
    width: 68px;
    max-height: 50px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.creative-core-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.68);
    font-family: var(--font-heading) !important;
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.creative-core-status i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.creative-diagram-stage.active .creative-core-status i {
    animation: creative-core-status-pulse 1.8s ease-in-out infinite;
}

.creative-node {
    position: absolute;
    z-index: 6;
    width: 236px;
    min-height: 124px;
    padding: 17px 18px 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 20px;
    opacity: 0;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 52%),
        rgba(10, 10, 10, 0.9);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    transform: translateY(24px) scale(0.96);
    transition:
        opacity 0.65s calc(0.55s + var(--creative-entry-delay, 0s)) ease,
        transform 0.85s calc(0.55s + var(--creative-entry-delay, 0s)) cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.creative-node::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle at 85% 10%, rgba(255, 102, 0, 0.22), transparent 46%);
    transition: opacity 0.35s ease;
}

.creative-node-film {
    --creative-entry-delay: 0s;
    --creative-float-x: 10px;
    --creative-float-y: 8px;
    top: 8px;
    left: 0;
}

.creative-node-music {
    --creative-entry-delay: 0.08s;
    --creative-float-x: -9px;
    --creative-float-y: 10px;
    top: 8px;
    right: 0;
}

.creative-node-post {
    --creative-entry-delay: 0.16s;
    --creative-float-x: -10px;
    --creative-float-y: -8px;
    right: 0;
    bottom: 8px;
}

.creative-node-direction {
    --creative-entry-delay: 0.24s;
    --creative-float-x: 9px;
    --creative-float-y: -10px;
    bottom: 8px;
    left: 0;
}

.creative-diagram-stage.active .creative-node {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation:
        creative-node-focus 12s calc(1.5s + var(--node-delay)) ease-in-out infinite,
        creative-node-float 6.2s 1.5s ease-in-out infinite;
}

.creative-node:hover,
.creative-node:focus-within {
    border-color: rgba(255, 102, 0, 0.6);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.46), 0 0 28px rgba(255, 102, 0, 0.11);
}

.creative-node:hover::before,
.creative-node:focus-within::before {
    opacity: 1;
}

.creative-node-top {
    position: relative;
    display: flex;
    margin-bottom: 11px;
    align-items: center;
    justify-content: space-between;
}

.creative-node-index {
    color: rgba(255, 255, 255, 0.36);
    font-family: var(--font-heading) !important;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.creative-node-code {
    color: var(--accent);
    font-family: monospace !important;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-shadow: 0 0 12px rgba(255, 102, 0, 0.5);
}

body .creative-node h3 {
    position: relative;
    margin: 0 0 5px;
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: 1rem;
    font-weight: 700 !important;
    line-height: 1.18;
    letter-spacing: -0.015em;
    text-align: left;
}

body .creative-node p {
    position: relative;
    max-width: 175px;
    margin: 0;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.68rem;
    line-height: 1.45;
    text-align: left;
}

.creative-node-activity {
    position: absolute;
    right: 17px;
    bottom: 15px;
    display: flex;
    height: 14px;
    align-items: flex-end;
    gap: 2px;
}

.creative-node-activity i {
    width: 2px;
    height: 36%;
    border-radius: 2px;
    background: rgba(255, 102, 0, 0.76);
    transform-origin: bottom;
}

.creative-diagram-stage.active .creative-node-activity i {
    animation: creative-node-activity 1.2s ease-in-out infinite alternate;
}

.creative-node-activity i:nth-child(2) {
    height: 82%;
    animation-delay: -0.7s !important;
}

.creative-node-activity i:nth-child(3) {
    height: 56%;
    animation-delay: -0.35s !important;
}

.creative-node-activity i:nth-child(4) {
    height: 100%;
    animation-delay: -0.95s !important;
}

@keyframes creative-diagram-spin {
    from { transform: translate(-50%, -50%) scale(1) rotate(0); }
    to { transform: translate(-50%, -50%) scale(1) rotate(360deg); }
}

@keyframes creative-diagram-spin-reverse {
    from { transform: translate(-50%, -50%) scale(1) rotate(0); }
    to { transform: translate(-50%, -50%) scale(1) rotate(-360deg); }
}

@keyframes creative-core-halo-spin {
    to { transform: rotate(360deg); }
}

@keyframes creative-diagram-signal {
    0% { opacity: 0; transform: translateX(0) scale(0.5); }
    18%, 78% { opacity: 1; }
    100% { opacity: 0; transform: translateX(calc(var(--creative-connection-length) - 7px)) scale(1); }
}

@keyframes creative-diagram-scan {
    0%, 12% { opacity: 0; transform: translateY(0); }
    24% { opacity: 0.65; }
    72% { opacity: 0.15; }
    84%, 100% { opacity: 0; transform: translateY(var(--creative-scan-distance)); }
}

@keyframes creative-core-status-pulse {
    50% { opacity: 0.35; transform: scale(0.72); }
}

@keyframes creative-node-activity {
    to { opacity: 0.4; transform: scaleY(0.35); }
}

@keyframes creative-node-focus {
    0%, 18%, 100% {
        border-color: rgba(255, 255, 255, 0.11);
        box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
    }
    6%, 12% {
        border-color: rgba(255, 102, 0, 0.62);
        box-shadow: 0 22px 52px rgba(0, 0, 0, 0.46), 0 0 26px rgba(255, 102, 0, 0.14);
    }
}

@keyframes creative-node-float {
    0%, 100% { translate: 0 0; }
    50% { translate: var(--creative-float-x) var(--creative-float-y); }
}

html[data-theme="light"] #diagrama::before {
    background: radial-gradient(circle at 50% 50%, rgba(255, 102, 0, 0.09), transparent 44%);
}

html[data-theme="light"] .creative-tech-diagram::before {
    background-image:
        linear-gradient(rgba(17, 17, 17, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 17, 17, 0.055) 1px, transparent 1px);
}

html[data-theme="light"] .creative-diagram-grid {
    border-color: rgba(17, 17, 17, 0.06);
}

html[data-theme="light"] .creative-diagram-ring-outer {
    border-color: rgba(17, 17, 17, 0.12);
    border-right-color: rgba(255, 102, 0, 0.24);
    border-left-color: rgba(255, 102, 0, 0.55);
}

html[data-theme="light"] .creative-diagram-ring-inner {
    border-color: rgba(17, 17, 17, 0.16);
    border-top-color: rgba(255, 102, 0, 0.62);
}

html[data-theme="light"] .creative-connection {
    background: linear-gradient(90deg, rgba(255, 102, 0, 0.78), rgba(17, 17, 17, 0.13));
}

html[data-theme="light"] .creative-core-node {
    border-color: rgba(255, 102, 0, 0.5);
    background:
        linear-gradient(145deg, rgba(255, 102, 0, 0.13), transparent 48%),
        rgba(248, 246, 241, 0.94);
    box-shadow:
        0 24px 60px rgba(40, 31, 24, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 34px rgba(255, 102, 0, 0.1);
}

html[data-theme="light"] .creative-core-eyebrow,
html[data-theme="light"] .creative-core-status {
    color: rgba(17, 17, 17, 0.56);
}

html[data-theme="light"] .creative-core-logo {
    filter: brightness(0);
}

html[data-theme="light"] .creative-node {
    border-color: rgba(17, 17, 17, 0.1);
    color: #111;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.74), transparent 54%),
        rgba(248, 246, 241, 0.92);
    box-shadow: 0 20px 48px rgba(40, 31, 24, 0.12);
}

html[data-theme="light"] .creative-node-index {
    color: rgba(17, 17, 17, 0.38);
}

html[data-theme="light"] body .creative-node h3 {
    color: #111;
}

html[data-theme="light"] body .creative-node p {
    color: rgba(17, 17, 17, 0.58);
}

@media (max-width: 900px) {
    .creative-diagram-stage {
        min-height: 540px;
    }

    .creative-tech-diagram {
        --creative-connection-length: 200px;
        width: min(100%, 680px);
        height: 520px;
    }

    .creative-node {
        width: 210px;
        min-height: 118px;
    }

    .creative-diagram-ring-outer {
        width: 340px;
        height: 340px;
    }
}

@media (max-width: 600px) {
    #diagrama {
        min-height: auto;
        padding: 96px 0 105px !important;
    }

    #diagrama > .container {
        width: min(92%, 520px);
    }

    #diagrama .tag {
        margin-bottom: 28px;
    }

    .creative-diagram-stage {
        min-height: 480px;
    }

    .creative-tech-diagram {
        --creative-connection-length: 122px;
        --creative-scan-distance: 350px;
        width: 100%;
        height: 460px;
    }

    .creative-tech-diagram::before {
        inset: 7% 0;
        background-size: 25px 25px;
    }

    .creative-diagram-grid {
        inset: 15% 7%;
    }

    .creative-diagram-ring-outer {
        width: 278px;
        height: 278px;
    }

    .creative-diagram-ring-inner {
        width: 176px;
        height: 176px;
    }

    .creative-diagram-core {
        width: 114px;
        height: 114px;
    }

    .creative-core-node {
        gap: 6px;
        padding: 12px;
        border-radius: 25px;
    }

    .creative-core-halo {
        inset: -7px;
        border-radius: 31px;
    }

    .creative-core-eyebrow {
        font-size: 0.39rem;
        letter-spacing: 0.13em;
    }

    .creative-core-logo {
        width: 52px;
        max-height: 37px;
    }

    .creative-core-status {
        font-size: 0.43rem;
    }

    .creative-node {
        width: calc(50% - 7px);
        min-height: 106px;
        padding: 13px 13px 12px;
        border-radius: 16px;
    }

    .creative-node-film,
    .creative-node-music {
        top: 0;
    }

    .creative-node-post,
    .creative-node-direction {
        bottom: 0;
    }

    .creative-node-top {
        margin-bottom: 8px;
    }

    .creative-node-index {
        font-size: 0.49rem;
    }

    .creative-node-code {
        font-size: 0.56rem;
    }

    body .creative-node h3 {
        margin-bottom: 4px;
        font-size: clamp(0.7rem, 3.4vw, 0.88rem);
        letter-spacing: -0.025em;
    }

    body .creative-node p {
        max-width: calc(100% - 15px);
        font-size: 0.56rem;
        line-height: 1.35;
    }

    .creative-node-activity {
        right: 12px;
        bottom: 12px;
        height: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .creative-tech-diagram::after,
    .creative-diagram-ring,
    .creative-core-halo,
    .creative-core-status i,
    .creative-signal,
    .creative-node,
    .creative-node-activity i {
        animation: none !important;
    }
}

/* ── Services cards v3: image-led editorial composition ────────────────── */
body .service-scroll-card {
    background: #09090a;
}

.service-visual {
    inset: 0 auto 0 0;
    width: 62%;
    background: #050505;
}

.service-visual::before {
    background:
        linear-gradient(90deg,
            rgba(9, 9, 10, 0.02) 0%,
            rgba(9, 9, 10, 0.04) 46%,
            rgba(9, 9, 10, 0.46) 68%,
            #09090a 100%),
        linear-gradient(0deg, rgba(9, 9, 10, 0.74) 0%, transparent 44%);
}

.service-visual::after {
    opacity: 0.72;
    background:
        linear-gradient(118deg, rgba(255, 102, 0, 0.19), transparent 32%),
        repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 255, 255, 0.016) 5px);
}

.service-card-image {
    object-position: center;
}

.service-scroll-content {
    inset: 0 0 0 43%;
    justify-content: flex-start;
    padding: clamp(36px, 5vh, 54px) clamp(36px, 4.5vw, 62px);
    text-align: left;
}

.service-scroll-content > *,
.service-card-topline,
.service-card-details,
.service-card-footer {
    text-align: left;
}

.service-card-topline {
    margin-bottom: clamp(20px, 2.7vh, 28px);
}

body .service-scroll-content h3 {
    max-width: 600px;
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 3.35vw, 3.55rem);
    line-height: 0.98;
    text-align: left;
}

body .service-lead {
    max-width: 560px;
    margin: 0;
    font-size: clamp(0.88rem, 1vw, 1rem);
    line-height: 1.58;
    text-align: left;
}

.service-scroll-content > .service-tech-list {
    margin-top: clamp(16px, 2.2vh, 23px);
}

.service-card-details {
    gap: 0;
    margin-top: clamp(20px, 2.8vh, 30px);
    padding-top: clamp(16px, 2.2vh, 22px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card-details > div,
.service-card-details > div:first-child {
    min-height: 0;
    padding: 0 24px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.service-card-details > div + div {
    padding: 0 0 0 24px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card-details > div::before {
    display: none;
}

.service-card-details span {
    margin-bottom: 7px;
    text-align: left;
}

body .service-card-details p {
    max-width: 260px;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: left;
}

.service-card-footer {
    justify-content: flex-start;
    margin-top: clamp(17px, 2.4vh, 24px);
}

html[data-theme="light"] body .service-scroll-card {
    background: #f5f1ea;
}

html[data-theme="light"] .service-visual::before {
    background:
        linear-gradient(90deg,
            rgba(245, 241, 234, 0.01) 0%,
            rgba(245, 241, 234, 0.03) 46%,
            rgba(245, 241, 234, 0.48) 68%,
            #f5f1ea 100%),
        linear-gradient(0deg, rgba(245, 241, 234, 0.7) 0%, transparent 44%);
}

html[data-theme="light"] .service-card-details {
    border-top-color: rgba(20, 20, 20, 0.11);
}

html[data-theme="light"] .service-card-details > div,
html[data-theme="light"] .service-card-details > div:first-child {
    border: 0;
    background: transparent;
}

html[data-theme="light"] .service-card-details > div + div {
    border-left: 1px solid rgba(20, 20, 20, 0.11);
}

@media (max-width: 768px) {
    .services-gallery {
        flex: 0 0 min(560px, calc(100svh - 142px));
        height: min(560px, calc(100svh - 142px));
    }

    body .service-scroll-card {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(230px, 48%) minmax(0, 52%);
    }

    .service-visual {
        position: relative;
        inset: auto;
        grid-row: 1;
        width: 100%;
        height: auto;
    }

    .service-visual::before {
        background:
            linear-gradient(180deg,
                rgba(9, 9, 10, 0.02) 0%,
                rgba(9, 9, 10, 0.04) 48%,
                rgba(9, 9, 10, 0.55) 76%,
                #09090a 100%),
            linear-gradient(90deg, rgba(9, 9, 10, 0.18), transparent 45%, rgba(9, 9, 10, 0.12));
    }

    .service-scroll-content {
        position: relative;
        inset: auto;
        grid-row: 2;
        justify-content: flex-start;
        padding: 15px 17px 14px;
        text-align: left;
    }

    .service-card-topline {
        margin-bottom: 8px;
    }

    body .service-scroll-content h3 {
        margin-bottom: 7px;
        font-size: clamp(1.35rem, 6.1vw, 1.7rem);
        line-height: 1;
    }

    body .service-lead {
        font-size: 0.68rem;
        line-height: 1.4;
    }

    .service-scroll-content > .service-tech-list {
        margin-top: 9px;
    }

    .service-card-details {
        margin-top: 12px;
        padding-top: 10px;
    }

    .service-card-details > div,
    .service-card-details > div:first-child {
        min-height: 0;
        padding: 0 9px 0 0;
    }

    .service-card-details > div + div {
        padding: 0 0 0 9px;
    }

    .service-card-details span {
        margin-bottom: 4px;
    }

    body .service-card-details p {
        font-size: 0.54rem;
        line-height: 1.32;
    }

    .service-card-footer {
        justify-content: flex-start;
        margin-top: 10px;
        padding-top: 0;
    }

    html[data-theme="light"] .service-visual::before {
        background:
            linear-gradient(180deg,
                rgba(245, 241, 234, 0.01) 0%,
                rgba(245, 241, 234, 0.03) 48%,
                rgba(245, 241, 234, 0.55) 76%,
                #f5f1ea 100%),
            linear-gradient(90deg, rgba(245, 241, 234, 0.14), transparent 45%, rgba(245, 241, 234, 0.1));
    }
}

/* ── Mobile responsive v4: anchored header and balanced hero ───────────── */
@media (max-width: 768px) {
    .footer-card .glitch-wrapper {
        padding: 5px 0;
    }

    .site-header {
        top: 18px;
        width: 100%;
        padding: 0 16px;
        align-items: center;
    }

    .site-header-logo-link {
        flex: 0 0 auto;
        height: 34px;
        align-items: center;
    }

    .site-header-logo {
        width: 52px;
        height: 34px;
    }

    .site-header-actions {
        position: static;
        top: auto;
        right: auto;
        z-index: auto;
        flex: 0 0 auto;
        align-items: center;
        gap: 6px;
    }

    .language-toggle,
    .theme-toggle,
    .site-header-btn {
        height: 30px;
        min-height: 30px;
    }

    .language-toggle {
        --language-shift: 26px;
        width: 58px;
    }

    .language-toggle-thumb {
        width: 25px;
        height: 22px;
    }

    .language-option {
        font-size: 0.56rem;
    }

    .theme-toggle {
        --toggle-shift: 18px;
        width: 46px;
    }

    .theme-toggle-thumb {
        width: 20px;
        height: 20px;
    }

    .theme-toggle-moon {
        left: 7px;
    }

    .theme-toggle-sun {
        right: 7px;
    }

    .theme-toggle-icon svg {
        width: 11px;
        height: 11px;
    }

    .site-header-btn {
        padding: 6px 12px;
        font-size: 0.57rem;
        letter-spacing: 1px;
    }

    #hero-text,
    #hero-text > .container,
    #hero-text .hero-content {
        min-height: 100svh !important;
    }

    #hero-text > .container {
        width: calc(100% - 20px) !important;
    }

    #hero-text .hero-content {
        justify-content: flex-start !important;
        padding: clamp(430px, 69svh, 575px) 0 0 !important;
    }

    body.mf-visual-refresh #hero-text h1,
    body.mf-visual-refresh #hero-text h1 .grad-text {
        width: 100%;
        margin: 0 !important;
        font-size: clamp(1.42rem, 7.85vw, 1.92rem) !important;
        line-height: 1.08 !important;
        letter-spacing: 0.7px !important;
        text-shadow: 0 8px 28px rgba(0, 0, 0, 0.82);
    }

    #hero-text .glitch-wrapper {
        gap: 0.11em;
    }

    #portfolio {
        margin-top: 0 !important;
        padding-top: 72px !important;
        padding-bottom: 44px !important;
    }

    #portfolio > .container {
        width: 100%;
    }

    .tag {
        line-height: 1.45;
    }
}

@media (max-width: 360px) {
    .site-header {
        top: 15px;
        padding: 0 12px;
    }

    .site-header-logo-link,
    .site-header-logo {
        width: 48px;
        height: 32px;
    }

    .site-header-actions {
        gap: 5px;
    }

    .language-toggle {
        --language-shift: 24px;
        width: 54px;
    }

    .language-toggle-thumb {
        width: 23px;
    }

    .theme-toggle {
        --toggle-shift: 17px;
        width: 44px;
    }

    .site-header-btn {
        padding-inline: 10px;
        font-size: 0.52rem;
        letter-spacing: 0.8px;
    }

    #hero-text .hero-content {
        padding-top: clamp(410px, 68svh, 545px) !important;
    }

    body.mf-visual-refresh #hero-text h1,
    body.mf-visual-refresh #hero-text h1 .grad-text {
        font-size: clamp(1.32rem, 7.65vw, 1.7rem) !important;
        letter-spacing: 0.45px !important;
    }
}

@media (max-width: 768px) and (max-height: 650px) {
    body .service-scroll-card {
        grid-template-rows: 42% 58%;
    }

    .service-scroll-content {
        padding: 10px 13px 9px;
    }

    .service-card-topline {
        margin-bottom: 4px;
    }

    body .service-scroll-content h3 {
        margin-bottom: 4px;
        font-size: clamp(1.12rem, 5.8vw, 1.42rem);
    }

    body .service-lead {
        font-size: 0.61rem;
        line-height: 1.32;
    }

    .service-scroll-content > .service-tech-list {
        margin-top: 6px;
    }

    .service-tech-list span {
        padding: 3px 6px;
        font-size: 0.42rem;
    }

    .service-card-details {
        margin-top: 7px;
        padding-top: 6px;
    }

    .service-card-details span {
        margin-bottom: 2px;
        font-size: 0.39rem;
    }

    body .service-card-details p {
        font-size: 0.48rem;
        line-height: 1.22;
    }

    .service-card-footer {
        margin-top: 6px;
    }

    .service-card-cta {
        height: 28px;
        min-height: 28px;
        padding: 6px 11px;
        font-size: 0.44rem;
    }
}

/* Keep the services-to-next-section transition visually continuous. */
.services-sticky {
    box-shadow: none !important;
}

body .service-scroll-card,
body .service-scroll-card:hover,
body .service-scroll-card:focus-visible {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;
}

html[data-theme="light"] body .service-scroll-card,
html[data-theme="light"] body .service-scroll-card:hover,
html[data-theme="light"] body .service-scroll-card:focus-visible {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82) !important;
}

/* Mobile hero: larger title with PRODS on its own line. */
@media (max-width: 768px) {
    #hero-text .glitch-wrapper {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        width: min(100%, 360px) !important;
        margin-inline: auto;
        gap: 0.06em 0.12em;
        white-space: normal;
    }

    #hero-text .hero-mobile-break {
        display: block !important;
        flex: 0 0 100%;
        width: 0;
        height: 0;
    }

    body.mf-visual-refresh #hero-text h1,
    body.mf-visual-refresh #hero-text h1 .grad-text {
        font-size: clamp(2rem, 10vw, 2.65rem) !important;
        line-height: 0.92 !important;
    }
}

/* Method section v3: scroll-driven scattered card deck. */
body .method-deck-section {
    --method-progress-value: 0;
    position: relative;
    min-height: 360svh;
    padding: 0 !important;
    overflow: clip;
    text-align: left;
}

.method-deck-section::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 74% 44%, rgba(255, 102, 0, 0.085), transparent 25%),
        linear-gradient(180deg, transparent, rgba(255, 102, 0, 0.018) 48%, transparent);
}

body .method-deck-sticky {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: min(90%, 1240px);
    height: 100svh;
    min-height: 650px;
    margin: 0 auto;
    padding: clamp(86px, 10vh, 112px) 0 clamp(24px, 4vh, 44px) !important;
}

.method-deck-sticky > .tag {
    display: block;
    width: 100%;
    flex: 0 0 auto;
    margin: 0 0 clamp(18px, 2.8vh, 30px);
    text-align: center;
}

.method-deck-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
    flex: 1 1 auto;
    gap: clamp(42px, 6vw, 94px);
    align-items: center;
    min-height: 0;
}

.method-deck-intro {
    position: relative;
    top: auto;
    align-self: center;
    min-width: 0;
    padding: 0;
}

.method-deck-intro .method-code {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.38);
}

body .method-deck-intro .method-title {
    max-width: 520px;
    font-size: clamp(3rem, 4.65vw, 4.9rem);
    line-height: 0.88;
}

body .method-deck-intro .method-summary {
    max-width: 430px;
    margin-top: 24px;
}

.method-deck-readout {
    display: grid;
    grid-template-columns: auto minmax(90px, 1fr) auto;
    gap: 13px;
    align-items: center;
    width: min(100%, 360px);
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.34);
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.method-deck-current {
    color: var(--accent);
    font: inherit;
}

.method-deck-progress {
    position: relative;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.method-deck-progress i {
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleX(var(--method-progress-value));
    transform-origin: left center;
    will-change: transform;
}

.method-deck-nav {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.method-deck-nav button {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.025);
    font-family: var(--font-heading);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition:
        width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease;
}

.method-deck-nav button:hover,
.method-deck-nav button:focus-visible,
.method-deck-nav button.is-active {
    width: 56px;
    border-color: rgba(255, 102, 0, 0.72);
    color: #fff;
    background: rgba(255, 102, 0, 0.13);
    outline: none;
}

.method-deck-nav button.is-active {
    color: var(--accent);
}

.method-deck-stage {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: 100%;
    height: min(68vh, 630px);
    min-height: 500px;
    perspective: 1500px;
}

.method-deck-stage::before,
.method-deck-stage::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: -2;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.method-deck-stage::before {
    width: min(72vw, 690px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.012),
        0 0 0 140px rgba(255, 255, 255, 0.008);
}

.method-deck-stage::after {
    width: min(90%, 720px);
    height: min(76%, 470px);
    opacity: 0.34;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle, #000 20%, transparent 72%);
}

.method-deck-stack {
    position: relative;
    width: min(86%, 540px);
    height: clamp(390px, 52vh, 500px);
    transform-style: preserve-3d;
}

.method-deck-card {
    position: absolute;
    inset: 0;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: clamp(25px, 3vw, 38px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: clamp(22px, 2.3vw, 30px);
    color: #fff;
    background:
        radial-gradient(circle at var(--card-glow-x, 15%) 8%, rgba(255, 102, 0, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(25, 25, 25, 0.985), rgba(7, 7, 7, 0.995));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 24px 70px rgba(0, 0, 0, 0.34);
    opacity: 0.9;
    transform: translate3d(0, 0, 0);
    transform-origin: 50% 86%;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.method-deck-card:nth-child(1) {
    --card-glow-x: 12%;
    z-index: 4;
}

.method-deck-card:nth-child(2) {
    --card-glow-x: 38%;
    z-index: 3;
}

.method-deck-card:nth-child(3) {
    --card-glow-x: 65%;
    z-index: 2;
}

.method-deck-card:nth-child(4) {
    --card-glow-x: 88%;
    z-index: 1;
}

.method-deck-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.32;
    background:
        repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 255, 255, 0.018) 8px),
        linear-gradient(120deg, transparent 0 58%, rgba(255, 102, 0, 0.045) 58% 58.4%, transparent 58.4%);
}

.method-deck-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: -12%;
    width: 100%;
    height: 1px;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.method-deck-card.is-active {
    border-color: rgba(255, 102, 0, 0.48);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 32px 90px rgba(0, 0, 0, 0.44),
        0 0 45px rgba(255, 102, 0, 0.075);
}

.method-deck-card.is-active::after {
    opacity: 0.7;
    animation: method-card-scan 3.8s linear infinite;
}

@keyframes method-card-scan {
    from {
        top: -5%;
    }

    to {
        top: 105%;
    }
}

.method-deck-card-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.085);
}

.method-deck-card-number {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4.6vw, 4.2rem);
    font-weight: 700;
    line-height: 0.76;
    letter-spacing: -0.08em;
}

.method-deck-card .node-status {
    margin: 3px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.17em;
}

.method-deck-card-code {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-heading);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.method-deck-card .node-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    text-align: left;
}

body .method-deck-card .node-content h3 {
    max-width: 440px;
    margin: 0 0 16px;
    color: #fff;
    font-family: var(--font-heading) !important;
    font-size: clamp(2rem, 3.7vw, 3.25rem);
    font-weight: 600 !important;
    line-height: 0.96;
    letter-spacing: -0.055em;
}

body .method-deck-card .node-content p {
    max-width: 430px;
    margin: 0;
    color: rgba(255, 255, 255, 0.61);
    font-size: clamp(0.78rem, 1vw, 0.9rem);
    line-height: 1.62;
}

.method-deck-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.085);
}

.method-card-chip {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.025);
    font-family: var(--font-heading);
    font-size: 0.52rem;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.method-deck-hint {
    position: absolute;
    right: 2%;
    bottom: 2px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0;
    color: rgba(255, 255, 255, 0.34);
    font-family: var(--font-heading);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.method-deck-hint i {
    position: relative;
    display: block;
    width: 42px;
    height: 1px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
}

.method-deck-hint i::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: translateX(calc((var(--method-progress-value) * 100%) - 100%));
}

html[data-theme="light"] .method-deck-section::before {
    background:
        radial-gradient(circle at 74% 44%, rgba(255, 102, 0, 0.1), transparent 25%),
        linear-gradient(180deg, transparent, rgba(255, 102, 0, 0.025) 48%, transparent);
}

html[data-theme="light"] .method-deck-intro .method-code,
html[data-theme="light"] body .method-deck-intro .method-summary,
html[data-theme="light"] .method-deck-readout,
html[data-theme="light"] .method-deck-hint {
    color: rgba(23, 23, 23, 0.5);
}

html[data-theme="light"] .method-deck-progress,
html[data-theme="light"] .method-deck-hint i {
    background: rgba(23, 23, 23, 0.14);
}

html[data-theme="light"] .method-deck-nav button {
    border-color: rgba(23, 23, 23, 0.14);
    color: rgba(23, 23, 23, 0.48);
    background: rgba(255, 255, 255, 0.4);
}

html[data-theme="light"] .method-deck-nav button:hover,
html[data-theme="light"] .method-deck-nav button:focus-visible,
html[data-theme="light"] .method-deck-nav button.is-active {
    border-color: rgba(255, 102, 0, 0.72);
    color: #c94f00;
    background: rgba(255, 102, 0, 0.1);
}

html[data-theme="light"] .method-deck-stage::before {
    border-color: rgba(23, 23, 23, 0.07);
    box-shadow:
        0 0 0 70px rgba(23, 23, 23, 0.018),
        0 0 0 140px rgba(23, 23, 23, 0.01);
}

html[data-theme="light"] .method-deck-stage::after {
    background-image:
        linear-gradient(rgba(23, 23, 23, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 23, 23, 0.06) 1px, transparent 1px);
}

html[data-theme="light"] .method-deck-card {
    color: #171717;
    border-color: rgba(23, 23, 23, 0.12);
    background:
        radial-gradient(circle at var(--card-glow-x, 15%) 8%, rgba(255, 102, 0, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(255, 253, 249, 0.99), rgba(238, 232, 223, 0.99));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 24px 60px rgba(64, 46, 28, 0.15);
}

html[data-theme="light"] .method-deck-card.is-active {
    border-color: rgba(255, 102, 0, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 30px 70px rgba(64, 46, 28, 0.18),
        0 0 40px rgba(255, 102, 0, 0.07);
}

html[data-theme="light"] .method-deck-card-top,
html[data-theme="light"] .method-deck-card-footer {
    border-color: rgba(23, 23, 23, 0.1);
}

html[data-theme="light"] .method-deck-card .node-status {
    color: rgba(23, 23, 23, 0.65);
}

html[data-theme="light"] .method-deck-card-code,
html[data-theme="light"] .method-card-chip {
    border-color: rgba(23, 23, 23, 0.12);
    color: rgba(23, 23, 23, 0.52);
    background: rgba(23, 23, 23, 0.025);
}

html[data-theme="light"] body .method-deck-card .node-content h3 {
    color: #171717;
}

html[data-theme="light"] body .method-deck-card .node-content p {
    color: rgba(23, 23, 23, 0.62);
}

@media (max-width: 900px) {
    body .method-deck-sticky {
        width: min(94%, 760px);
    }

    .method-deck-layout {
        grid-template-columns: minmax(230px, 0.7fr) minmax(420px, 1.3fr);
        gap: 28px;
    }

    .method-deck-stack {
        width: min(92%, 490px);
    }
}

@media (max-width: 768px) {
    body .method-deck-section {
        min-height: 360svh;
    }

    body .method-deck-sticky {
        width: 100%;
        height: 100svh;
        min-height: 0;
        padding: 78px 14px 16px !important;
    }

    .method-deck-sticky > .tag {
        margin-bottom: 10px;
    }

    .method-deck-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 8px;
        align-items: stretch;
    }

    .method-deck-intro {
        align-self: auto;
        text-align: center;
    }

    .method-deck-intro .method-code {
        display: none;
    }

    body .method-deck-intro .method-title {
        font-size: clamp(2rem, 9.8vw, 2.8rem);
        line-height: 0.86;
    }

    body .method-deck-intro .method-summary {
        max-width: 360px;
        margin: 10px auto 0;
        font-size: 0.72rem;
        line-height: 1.48;
    }

    .method-deck-readout {
        width: min(100%, 250px);
        margin: 12px auto 0;
    }

    .method-deck-nav {
        justify-content: center;
        margin-top: 10px;
    }

    .method-deck-nav button {
        width: 34px;
        height: 30px;
        font-size: 0.5rem;
    }

    .method-deck-nav button:hover,
    .method-deck-nav button:focus-visible,
    .method-deck-nav button.is-active {
        width: 46px;
    }

    .method-deck-stage {
        height: auto;
        min-height: 0;
    }

    .method-deck-stage::before {
        width: min(118vw, 470px);
        box-shadow:
            0 0 0 42px rgba(255, 255, 255, 0.012),
            0 0 0 84px rgba(255, 255, 255, 0.008);
    }

    .method-deck-stage::after {
        width: 100%;
        height: 90%;
        background-size: 32px 32px;
    }

    .method-deck-stack {
        width: min(calc(100% - 42px), 370px);
        height: clamp(310px, 44svh, 390px);
    }

    .method-deck-card {
        padding: 20px 18px;
        border-radius: 22px;
    }

    .method-deck-card-top {
        gap: 10px;
        padding-bottom: 14px;
    }

    .method-deck-card-number {
        font-size: clamp(2rem, 11vw, 2.8rem);
    }

    .method-deck-card .node-status {
        margin-top: 1px;
        font-size: 0.48rem;
        letter-spacing: 0.12em;
    }

    .method-deck-card-code {
        min-width: 32px;
        height: 21px;
        font-size: 0.42rem;
    }

    body .method-deck-card .node-content h3 {
        margin-bottom: 10px;
        font-size: clamp(1.55rem, 7vw, 2rem);
    }

    body .method-deck-card .node-content p {
        font-size: 0.7rem;
        line-height: 1.48;
    }

    .method-deck-card-footer {
        gap: 5px;
        padding-top: 13px;
    }

    .method-card-chip {
        padding: 6px 8px;
        font-size: 0.46rem;
    }

    .method-deck-hint {
        display: none;
    }
}

@media (max-width: 768px) and (max-height: 700px) {
    body .method-deck-sticky {
        padding-top: 72px !important;
    }

    body .method-deck-intro .method-summary {
        display: none;
    }

    .method-deck-readout {
        margin-top: 8px;
    }

    .method-deck-nav {
        margin-top: 7px;
    }

    .method-deck-stack {
        height: clamp(286px, 46svh, 330px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body .method-deck-section {
        min-height: 0;
        padding: 100px 0 !important;
        overflow: visible;
    }

    body .method-deck-sticky {
        position: relative;
        height: auto;
        min-height: 0;
        padding: 0 !important;
    }

    .method-deck-layout {
        grid-template-columns: 1fr;
    }

    .method-deck-stage {
        height: auto;
        min-height: 0;
    }

    .method-deck-stack {
        display: grid;
        width: 100%;
        height: auto;
        gap: 16px;
    }

    .method-deck-card {
        position: relative;
        min-height: 360px;
        opacity: 1 !important;
        transform: none !important;
    }

    .method-deck-card.is-active::after {
        animation: none;
    }

    .method-deck-readout,
    .method-deck-nav,
    .method-deck-hint,
    .method-deck-stage::before,
    .method-deck-stage::after {
        display: none;
    }
}

/* Shared statement typography: identical Planet Kosmos scale in sections 02 and 06. */
#vision .vision-headline,
#filosofia .philosophy-text,
#vision .vision-headline *,
#filosofia .philosophy-text * {
    font-family: var(--font-display) !important;
    font-size: clamp(2.5rem, 5.6vw, 4.5rem) !important;
    font-weight: 400 !important;
    line-height: 1.04 !important;
    letter-spacing: 0.018em !important;
}

#vision .vision-headline,
#filosofia .philosophy-text {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
    text-align: center;
    text-transform: uppercase;
}

#vision .vision-headline .grad-text,
#filosofia .philosophy-text .philosophy-accent {
    display: inline;
    transform: none;
}

@media (max-width: 768px) {
    #vision .vision-headline,
    #filosofia .philosophy-text,
    #vision .vision-headline *,
    #filosofia .philosophy-text * {
        font-size: clamp(1.55rem, 6.4vw, 2.25rem) !important;
        line-height: 1.12 !important;
        letter-spacing: 0.012em !important;
    }
}

/* Header parity: exact sizing, spacing and motion from miguelfombuena v5. */
.site-header {
    top: 40px;
    padding: 0 40px;
    align-items: center;
}

.site-header-logo-link {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    align-items: center;
    transition: var(--transition);
}

.site-header-logo {
    width: auto;
    height: 45px;
    object-fit: contain;
    transition: var(--transition);
}

.site-header-actions {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 1100;
    gap: 12px;
}

.language-toggle {
    --language-shift: 32px;
    width: 70px;
    height: 36px;
    padding: 0 3px;
    font-family: Arial !important;
}

.language-toggle-thumb {
    top: 3px;
    left: 3px;
    width: 31px;
    height: 28px;
    font-family: Arial !important;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.language-option {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
}

.theme-toggle {
    --toggle-shift: 31px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 70px;
    height: 36px;
    padding: 0 3px;
    border: 1px solid var(--text-primary);
    border-radius: 999px;
    color: var(--text-primary);
    background: rgba(255, 102, 0, 0.03);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-family: Arial !important;
    transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 4.5px;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff7b25, var(--accent));
    box-shadow: 0 4px 14px rgba(255, 102, 0, 0.35);
    font-family: Arial !important;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease;
    view-transition-name: theme-toggle-thumb;
}

.theme-toggle-icon {
    position: relative;
    top: auto;
    z-index: 2;
    display: grid;
    width: 14px;
    height: 14px;
    justify-self: center;
    place-items: center;
    line-height: 1;
    transform: none;
    font-family: Arial !important;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.theme-toggle-icon svg {
    width: 14px;
    height: 14px;
}

.theme-toggle-moon {
    left: auto;
    color: #111;
    opacity: 1;
    view-transition-name: theme-toggle-moon;
}

.theme-toggle-sun {
    right: auto;
    color: var(--text-primary);
    opacity: 0.45;
    view-transition-name: theme-toggle-sun;
}

html[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(var(--toggle-shift));
    background: linear-gradient(145deg, #ff7b25, var(--accent));
    box-shadow: 0 4px 14px rgba(255, 102, 0, 0.35);
}

html[data-theme="light"] .theme-toggle-moon {
    color: #111;
    opacity: 0.45;
}

html[data-theme="light"] .theme-toggle-sun {
    color: #111;
    opacity: 1;
}

.site-header-btn {
    z-index: 10;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 10px 25px;
    font-size: 0.75rem;
    line-height: normal;
    letter-spacing: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .site-header {
        top: 20px;
        padding: 0 20px;
    }

    .site-header-logo-link {
        width: auto;
        height: auto;
    }

    .site-header-logo {
        width: auto;
        height: 35px;
    }

    .site-header-actions {
        position: static;
        top: auto;
        right: auto;
        z-index: auto;
        gap: 8px;
    }

    .language-toggle {
        --language-shift: 28px;
        width: 62px;
        height: 32px;
        min-height: 0;
        padding: 0 3px;
    }

    .language-toggle-thumb {
        top: 3px;
        left: 3px;
        width: 27px;
        height: 24px;
    }

    .language-option {
        font-size: 0.56rem;
    }

    .theme-toggle {
        --toggle-shift: 27px;
        width: 62px;
        height: 32px;
        min-height: 0;
        padding: 0 3px;
    }

    .theme-toggle-thumb {
        top: 3px;
        left: 4.5px;
        width: 24px;
        height: 24px;
    }

    .theme-toggle-icon svg {
        width: 14px;
        height: 14px;
    }

    .theme-toggle-icon {
        font-size: 0.68rem;
    }

    .theme-toggle-moon {
        left: auto;
    }

    .theme-toggle-sun {
        right: auto;
        left: auto;
    }

    .site-header-btn {
        width: auto;
        height: auto;
        min-height: 0;
        padding: 8px 15px;
        font-size: 0.65rem;
        line-height: normal;
        letter-spacing: 2px;
    }
}

/* FAQ: matched to the accordion system used in miguelfombuena v5. */
.faq-section {
    padding: 50px 0 110px;
    overflow: hidden;
}

.faq-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(34px, 5vw, 58px);
}

.faq-heading {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0;
    text-align: center;
}

.faq-heading .glitch-wrapper {
    width: 100%;
}

.faq-heading .section-title {
    margin: 0 0 24px;
    color: var(--text-primary);
    font-family: 'Planet Kosmos', sans-serif !important;
    font-size: 3.5rem;
    font-weight: normal;
    line-height: 1.05;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.faq-heading p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: center;
}

.faq-list {
    display: grid;
    width: 100%;
    max-width: 960px;
    gap: 12px;
    counter-reset: faq-counter;
}

.faq-item {
    position: relative;
    counter-increment: faq-counter;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
    transition: border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: center;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: transform 0.35s ease;
}

.faq-item:hover,
.faq-item[open] {
    border-color: rgba(255, 102, 0, 0.48);
    background:
        linear-gradient(90deg, rgba(255, 102, 0, 0.06), transparent 44%),
        rgba(255, 255, 255, 0.035);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.faq-item:hover::before,
.faq-item[open]::before {
    transform: scaleY(1);
}

.faq-item summary {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    align-items: center;
    min-height: 88px;
    padding: 22px 24px;
    gap: 24px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.5vw, 1.2rem);
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
    transition: color 0.3s ease;
}

.faq-item summary::before {
    content: counter(faq-counter, decimal-leading-zero);
    position: static;
    grid-column: 1;
    justify-self: start;
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

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

.faq-item summary:hover,
.faq-item[open] summary {
    color: var(--accent);
}

.faq-item summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
}

.faq-item summary > span:first-of-type {
    grid-column: 2;
    text-align: center;
}

.faq-icon {
    position: relative;
    grid-column: 3;
    justify-self: end;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid rgba(255, 102, 0, 0.45);
    border-radius: 50%;
    color: var(--accent);
    background: rgba(255, 102, 0, 0.05);
    transition: background 0.3s ease, transform 0.3s ease;
}

.faq-item[open] .faq-icon {
    background: var(--accent);
    color: #080808;
    transform: rotate(180deg);
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 1px;
    background: currentColor;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.faq-answer {
    padding: 0 76px 28px;
    text-align: center;
    animation: faq-reveal 0.35s ease both;
}

.faq-answer p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.75;
}

@keyframes faq-reveal {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html[data-theme="light"] .faq-item {
    border-color: rgba(20, 20, 20, 0.11);
    background: rgba(255, 255, 255, 0.42);
}

html[data-theme="light"] .faq-item:hover,
html[data-theme="light"] .faq-item[open] {
    background:
        linear-gradient(90deg, rgba(255, 102, 0, 0.07), transparent 44%),
        rgba(255, 255, 255, 0.62);
    box-shadow: 0 18px 42px rgba(58, 45, 31, 0.1);
}

html[data-theme="light"] .faq-item summary {
    color: #171717;
}

html[data-theme="light"] .faq-heading .section-title {
    color: #171717 !important;
}

@media (max-width: 768px) {
    .faq-section {
        padding: 20px 0 70px;
    }

    .faq-container {
        gap: 24px;
    }

    .faq-heading {
        margin: 0;
        padding: 0 10px;
    }

    .faq-heading .section-title {
        margin-bottom: 18px;
        font-size: 2.2rem !important;
        letter-spacing: 2px !important;
    }

    .faq-heading p {
        font-size: 0.85rem;
    }

    .faq-list {
        width: calc(100% - 12px);
        margin: 0 6px;
        gap: 9px;
    }

    .faq-item summary {
        min-height: 76px;
        padding: 17px 14px;
        grid-template-columns: 25px minmax(0, 1fr) 27px;
        gap: 10px;
        font-size: 0.9rem;
    }

    .faq-item summary::before {
        font-size: 0.58rem;
    }

    .faq-icon {
        width: 27px;
        height: 27px;
    }

    .faq-answer {
        padding: 0 42px 22px;
    }

    .faq-answer p {
        font-size: 0.82rem;
        line-height: 1.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    .faq-answer {
        animation: none;
    }
}
