/* ============================================
   WAE - World AI Engineers
   Minimalist Edition — Data Engineering Aesthetic
   Clean, Structured, Precise.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

/* ============================================
   CSS Custom Properties — Minimalist Tokens
   ============================================ */
:root {
    /* Core Palette */
    --color-primary: #1a3a6b;
    /* Deep navy — precision/trust */
    --color-primary-light: #2a5298;
    --color-accent: #0f7aff;
    /* Electric blue accent (used sparingly) */
    --color-accent-muted: rgba(15, 122, 255, 0.08);

    /* Backgrounds */
    --bg-root: #f4f7fb;
    /* Very light tech blue / ice-white (professional data feel) */
    --bg-section-alt: #ebf0f7;
    /* Slightly darker cool white for alternating sections */
    --bg-card: #ffffff;
    --bg-dark: #111118;
    /* Footer / dark elements */
    --bg-dark-secondary: #1a1a24;

    /* Text */
    --text-primary: #111118;
    --text-secondary: #5a5a72;
    --text-tertiary: #9a9ab0;
    --text-on-dark: #f0f0ee;
    --text-on-dark-secondary: rgba(240, 240, 238, 0.6);

    /* Borders */
    --border-light: #e8e8e2;
    --border-medium: #d0d0c8;
    --border-accent: rgba(15, 122, 255, 0.3);

    /* Typography */
    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'DM Mono', 'JetBrains Mono', 'Fira Code', monospace;

    /* Scale */
    --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
    --text-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.05rem);
    --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 2.75rem);
    --text-4xl: clamp(2.5rem, 1.75rem + 3.75vw, 3.75rem);
    --text-5xl: clamp(3rem, 2rem + 4vw, 4.5rem);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4.5rem;
    --space-4xl: 6rem;
    --space-5xl: 9rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows — very subtle */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.09);
    --shadow-card-hover: 0 12px 40px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 160ms ease;
    --transition-base: 280ms ease;
    --transition-slow: 480ms ease;

    /* Z-index */
    --z-fixed: 300;
    --z-modal: 400;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg-root);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-section-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

::selection {
    background: rgba(15, 122, 255, 0.15);
    color: var(--text-primary);
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   Header & Navigation
   ============================================ */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    padding: var(--space-md) var(--space-xl);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.main-header.scrolled {
    border-bottom-color: var(--border-light);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 44px;
    width: auto;
    transition: opacity var(--transition-fast);
}

.header-logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    padding-bottom: 2px;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

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

.nav-link:hover::after {
    width: 100%;
}

.nav-link.cta-nav {
    color: var(--bg-card);
    background: var(--color-primary);
    padding: 0.45rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.nav-link.cta-nav::after {
    display: none;
}

.nav-link.cta-nav:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26, 58, 107, 0.25);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.mobile-menu-btn {
    display: none;
    color: var(--text-primary);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}

.mobile-menu-btn .material-symbols-outlined {
    font-size: 24px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn .material-symbols-outlined {
    font-size: 18px;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(26, 58, 107, 0.28);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-accent-muted);
}

.btn-large {
    padding: 1rem 2.25rem;
    font-size: var(--text-base);
}

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

/* ============================================
   Hero Section — Centered Minimalist + Watermark
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Removed text-align: center and align-items: center so it can strictly left-align */
    padding: 9rem 0 var(--space-5xl);
    overflow: hidden;
    background: var(--bg-root);
}

/* Full background image (Portada.png) */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right 10%;
    /* Bajar la imagen para que la cabeza se vea completa */
    display: block;
}

/* Lighten the background image slightly so text pops more ("un poquito mas clarita") */
.hero-bg-lighten {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    /* Lighter without blur */
    /* Blur removed to keep it completely nitida */
}

/* Hero content left-aligned */
/* Hero content left-aligned */
.hero-inner-left {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: var(--space-lg);

    /* Align perfectly with the 1200px grid of the header/sections */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* Constrain text elements so they don't hit the character */
.hero-inner-left>* {
    max-width: 650px;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    animation: fadeInUp 0.7s ease-out both;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    animation: fadeInUp 0.7s ease-out 0.1s both;
}

.hero-title em {
    font-style: normal;
    color: var(--color-primary);
    font-weight: 300;
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    font-weight: 400;
    line-height: 1.7;
    animation: fadeInUp 0.7s ease-out 0.2s both;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: flex-start;
    animation: fadeInUp 0.7s ease-out 0.3s both;
}


/* Tech stack bar below hero CTA */
.hero-stack {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
    animation: fadeInUp 0.7s ease-out 0.4s both;
}

.hero-stack-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stack-tag {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    background: var(--bg-section-alt);
    border: 1px solid var(--border-light);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}

.stack-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Scroll Indicator — sits at bottom of left panel */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    /* approx center of left 55% panel */
    transform: translateX(-50%);
    color: var(--text-tertiary);
    animation: bounce 2s ease-in-out infinite;
    z-index: 5;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ============================================
   Section Common Styles
   ============================================ */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    display: block;
    margin-bottom: var(--space-md);
}

.section-header {
    margin-bottom: var(--space-3xl);
}

.section-header.centered {
    text-align: center;
}

.section-header.centered .section-description {
    margin: 0 auto;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.section-title em {
    font-style: normal;
    font-weight: 300;
    color: var(--text-secondary);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

/* ============================================
   Services / Pillars Section
   ============================================ */
.pillars-section {
    padding: var(--space-5xl) 0;
    background: var(--bg-section-alt);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.service-card:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-medium);
    transform: translateY(-4px);
}

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

.service-card.featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-md);
}

.service-card.featured::before {
    transform: scaleX(1);
}

.service-number {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: 0.1em;
}

.service-icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--color-accent-muted);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.service-icon-wrap .material-symbols-outlined {
    font-size: 26px;
    color: var(--color-primary);
}

.service-card:hover .service-icon-wrap {
    background: var(--color-primary);
}

.service-card:hover .service-icon-wrap .material-symbols-outlined {
    color: #fff;
}

.service-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.service-description {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: 1.65;
    flex: 1;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.service-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-primary);
    background: var(--color-accent-muted);
    border: 1px solid rgba(15, 122, 255, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.04em;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    transition: gap var(--transition-fast);
}

.service-link .material-symbols-outlined {
    font-size: 16px;
}

.service-link:hover {
    gap: 0.7rem;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    padding: var(--space-5xl) 0;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: start;
}

.about-left {
    position: sticky;
    top: 8rem;
}

.about-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.about-block {
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-xl);
}

.about-block-title {
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.about-block-text {
    color: var(--text-secondary);
    line-height: 1.75;
}

.about-block-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--space-md);
}

.highlight-chip {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    background: var(--bg-card);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
    padding: var(--space-5xl) 0;
    background: var(--bg-section-alt);
    border-top: 1px solid var(--border-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-4xl);
    align-items: start;
}

.contact-tagline {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
}

.contact-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--text-base);
    transition: color var(--transition-fast);
}

.contact-method:hover {
    color: var(--color-primary);
}

.contact-method .material-symbols-outlined {
    font-size: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-method span:last-child {
    font-size: var(--text-sm);
}

/* ---- Certifications block ---- */
.certifications-block {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
}

.cert-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: var(--space-lg);
}

.cert-badges {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

/* Coin flip: 3-D perspective container */
.badge-coin {
    perspective: 600px;
    cursor: pointer;
}

.badge-coin img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    /* Smooth base transition always present */
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.3s ease,
        box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
    filter: drop-shadow(0 2px 6px rgba(26, 58, 107, 0.12));
}

/* Coin flip on hover — full 360° Y rotation for the "coin" effect */
.badge-coin:hover img {
    transform: rotateY(360deg) scale(1.08);
    filter: drop-shadow(0 6px 18px rgba(26, 58, 107, 0.28));
}


/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-root);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.7rem 0.9rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    width: 100%;
    -webkit-appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(15, 122, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.form-group select {
    cursor: pointer;
}

/* ============================================
   Footer
   ============================================ */
.main-footer {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    padding: var(--space-4xl) 0 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-3xl);
    padding-bottom: var(--space-3xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo-img {
    height: 40px;
    width: auto;
    margin-bottom: var(--space-md);
    /* Remove the blank-making filter —  brightness(2)+invert gives a clean white logo on dark bg */
    filter: brightness(0) invert(1);
    opacity: 1;
}

.footer-tagline {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-on-dark);
    margin-bottom: 0.25rem;
}

.footer-tagline-sub {
    font-size: var(--text-sm);
    color: var(--text-on-dark-secondary);
    line-height: 1.5;
}

.footer-column h4 {
    font-size: var(--text-xs);
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-on-dark-secondary);
    margin-bottom: var(--space-lg);
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-column ul li a {
    font-size: var(--text-sm);
    color: var(--text-on-dark-secondary);
    transition: color var(--transition-fast);
}

.footer-column ul li a:hover {
    color: var(--text-on-dark);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark-secondary);
    transition: all var(--transition-fast);
}

.social-link svg {
    width: 16px;
    height: 16px;
}

.social-link:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-on-dark);
    background: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
    padding: var(--space-xl) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.footer-bottom p {
    font-size: var(--text-xs);
    color: var(--text-on-dark-secondary);
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    font-size: var(--text-xs);
    color: var(--text-on-dark-secondary);
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--text-on-dark);
}

/* ============================================
   Company Logos Ticker (auto-scroll)
   ============================================ */
.clients-section {
    padding: var(--space-4xl) 0;
    background: var(--bg-root);
    border-top: 1px solid var(--border-light);
    overflow: hidden;
}

.clients-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.clients-title {
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

/* The scrolling track — two copies of logos for seamless loop */
.clients-track-wrapper {
    position: relative;
    overflow: hidden;
    /* Fade out edges */
    mask-image: linear-gradient(to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%);
    -webkit-mask-image: linear-gradient(to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%);
}

.clients-track {
    display: flex;
    gap: var(--space-4xl);
    align-items: center;
    width: max-content;
    animation: logoScroll 28s linear infinite;
}

.clients-track:hover {
    animation-play-state: paused;
}

@keyframes logoScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.client-logo {
    height: 52px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    flex-shrink: 0;
    filter: grayscale(1);
    opacity: 0.55;
    transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}

.client-logo:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.08);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* ============================================
   Responsive — Tablet (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .about-left {
        position: static;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .hero-inner-left {
        padding: 0 var(--space-lg);
    }
}

/* ============================================
   Responsive — Mobile (≤768px)
   ============================================ */
@media (max-width: 768px) {

    /* ---- Hero ---- */
    .hero-section {
        min-height: 100svh;
        /* Safe viewport height on iOS */
        padding: 7rem 0 var(--space-4xl);
    }

    .hero-bg-img {
        /* On narrow screens push the character more to the right
           so the face stays in frame and text has breathing room on the left */
        object-position: 75% top;
    }

    /* Stronger overlay on mobile to keep text readable over busy background */
    .hero-bg-lighten {
        background: rgba(255, 255, 255, 0.62);
    }

    .hero-inner-left {
        padding: 0 1.5rem;
        gap: var(--space-md);
        max-width: 100%;
    }

    .hero-inner-left>* {
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
        line-height: 1.12;
    }

    .hero-subtitle {
        font-size: var(--text-base);
        line-height: 1.65;
    }

    .hero-eyebrow {
        font-size: 0.65rem;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .hero-cta-group .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        min-height: 48px;
        /* Comfortable touch target */
    }

    .scroll-indicator {
        display: none;
    }

    /* ---- Navigation ---- */
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-root);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-xl);
        z-index: 200;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        font-size: var(--text-xl);
    }

    .mobile-menu-btn {
        display: block;
        z-index: 201;
    }

    /* ---- Sections ---- */
    .section-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .section-container {
        padding: 0 1.5rem;
    }

    /* ---- Services ---- */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .service-card {
        padding: var(--space-xl);
    }

    /* ---- About ---- */
    .about-layout {
        gap: var(--space-2xl);
    }

    /* ---- Contact ---- */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .contact-tagline {
        font-size: clamp(1.4rem, 5.5vw, 1.9rem);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Make inputs comfortable for touch */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: var(--text-base);
        min-height: 48px;
    }

    /* ---- Certifications ---- */
    .certifications-block {
        margin-top: var(--space-xl);
    }

    .cert-badges {
        gap: var(--space-lg);
    }

    .badge-coin img {
        width: 80px;
        height: 80px;
    }

    /* ---- Clients ticker ---- */
    .clients-section {
        padding: var(--space-2xl) 0;
    }

    .client-logo {
        height: 38px;
        max-width: 100px;
    }

    .clients-track {
        gap: var(--space-2xl);
        /* Faster scroll on mobile for a snappier feel */
        animation-duration: 20s;
    }

    /* ---- Footer ---- */
    .footer-top {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }

    .footer-legal {
        justify-content: center;
    }
}

/* ============================================
   Responsive — Small phones (≤480px)
   ============================================ */
@media (max-width: 480px) {
    .main-header {
        padding: var(--space-sm) var(--space-md);
    }

    .hero-title {
        font-size: clamp(1.75rem, 9vw, 2.4rem);
    }

    /* The background character is too distracting on very small screens,
       push it further right so it mostly hides behind the edge */
    .hero-bg-img {
        object-position: 85% top;
    }

    .hero-bg-lighten {
        background: rgba(255, 255, 255, 0.72);
    }

    .section-container {
        padding: 0 1.25rem;
    }

    .service-card {
        padding: var(--space-lg);
    }

    .contact-form-wrapper {
        padding: var(--space-lg);
    }

    .certifications-block {
        margin-top: var(--space-lg);
    }

    .cert-badges {
        gap: var(--space-md);
    }

    .badge-coin img {
        width: 70px;
        height: 70px;
    }

    .btn {
        width: 100%;
        max-width: 340px;
    }
}

/* ============================================
   Corporate Video Section
   ============================================ */
.video-section {
    background: var(--bg-body);
}

.video-responsive-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-responsive-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}