/* ============================================
   HH DIGITAL SERVICES — SISTEMA DE DISEÑO
   ============================================ */
:root {
    --white: #ffffff;
    --off: #faf7f2;
    /* crema cálida corporativa para secciones alternas */
    --cream: #f7f0e8;
    --ink: #1c1c1a;
    --ink-soft: #494741;
    /* 7.4:1 sobre blanco — cumple WCAG AA */
    --gray: #6c6960;
    /* 4.8:1 sobre blanco — cumple WCAG AA */
    --line: #ebe7df;
    --line-strong: #ddd7cb;

    /* Marca HH Digital Services (terracota) */
    --brand: #a83e2b;
    --brand-dark: #8a3122;
    --brand-soft: #f7e9e5;

    /* HHub Shop (teal) — solo para la banda de producto */
    --teal: #0e8c7f;
    --teal-dark: #0b7167;
    --teal-soft: #e4f3f1;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;
    --s-8: 32px;
    --s-10: 40px;
    --s-12: 48px;
    --s-16: 64px;
    --s-20: 80px;
    --s-24: 96px;
    --s-32: 128px;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

section {
    scroll-margin-top: 88px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--s-6);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-bottom: var(--s-4);
}

.eyebrow::before {
    content: "";
    width: 16px;
    height: 1px;
    background: var(--brand);
}

.section-head {
    max-width: 640px;
    margin-bottom: var(--s-12);
}

.section-head h2 {
    font-size: clamp(28px, 3.6vw, 38px);
    margin-bottom: var(--s-4);
}

.section-head p {
    color: var(--ink-soft);
    font-size: 16px;
}

/* ============================================
   ICONOS "BOCETO" — filtro SVG global
   ============================================ */
.sketch {
    filter: url(#sketchy);
}

.icon {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon.accent {
    stroke: var(--brand);
}

/* ============================================
   NAV
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.nav.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: var(--s-4) var(--s-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: var(--s-3);
    letter-spacing: -0.01em;
}

.logo img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    flex-shrink: 0;
}

.logo b {
    font-weight: 700;
}

.logo span.logo-sub {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 11px;
    color: var(--brand);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: var(--s-8);
    font-size: 14px;
    font-weight: 500;
}

.nav-links a {
    color: var(--ink-soft);
    position: relative;
    padding: var(--s-1) 0;
    transition: color .2s var(--ease);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1.5px;
    background: var(--brand);
    transition: width .25s var(--ease);
}

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

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

.nav-cta {
    font-size: 14px;
    font-weight: 600;
    padding: var(--s-2) var(--s-5);
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: var(--white);
    transition: background .2s var(--ease), transform .2s var(--ease);
}

.nav-cta:hover {
    background: var(--brand);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--s-2);
}

.nav-toggle span {
    width: 22px;
    height: 1.6px;
    background: var(--ink);
    transition: transform .25s var(--ease), opacity .2s var(--ease);
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(6.6px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-6.6px) rotate(-45deg);
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    padding: var(--s-3) var(--s-6);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.btn-primary {
    background: var(--ink);
    color: var(--white);
}

.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--brand);
    transform: translateX(-101%);
    transition: transform .3s var(--ease);
    z-index: 0;
}

.btn-primary span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
}

.btn-primary:hover::before {
    transform: translateX(0);
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-2px);
}

.btn-teal {
    background: var(--teal);
    color: var(--white);
}

.btn-teal:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: calc(var(--s-32) + var(--s-8)) 0 var(--s-24);
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s-16);
    align-items: center;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: var(--s-6);
}

.hero h1 em {
    font-style: normal;
    color: var(--brand);
}

.hero p.lead {
    font-size: 18px;
    color: var(--ink-soft);
    max-width: 480px;
    margin-bottom: var(--s-8);
}

.hero-actions {
    display: flex;
    gap: var(--s-4);
    flex-wrap: wrap;
    margin-bottom: var(--s-12);
}

.hero-meta {
    display: flex;
    gap: var(--s-8);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray);
}

.hero-meta div {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.hero-meta b {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--ink);
    font-weight: 600;
}

.hero-visual {
    aspect-ratio: 1/1;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--off);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-12);
    position: relative;
}

.hero-visual::after {
    content: "orden desde el caos";
    position: absolute;
    bottom: var(--s-5);
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray);
    letter-spacing: 0.04em;
}

.hero-draw path,
.hero-draw circle {
    fill: none;
    stroke: var(--ink);
    stroke-width: 1.5;
    stroke-linecap: round;
}

.hero-draw .node-fill {
    fill: var(--white);
    stroke: var(--ink);
}

.hero-draw .accent-node {
    stroke: var(--brand);
}

.hero-draw .accent-node.node-fill {
    fill: var(--brand-soft);
}

.hero-draw path.line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.4s var(--ease);
}

.hero-draw.animate path.line {
    stroke-dashoffset: 0;
}

.hero-draw circle {
    opacity: 0;
    transform-origin: center;
    transform: scale(.4);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
}

.hero-draw.animate circle {
    opacity: 1;
    transform: scale(1);
}

.hero-draw circle:nth-of-type(1) {
    transition-delay: .9s;
}

.hero-draw circle:nth-of-type(2) {
    transition-delay: 1.05s;
}

.hero-draw circle:nth-of-type(3) {
    transition-delay: 1.2s;
}

.hero-draw circle:nth-of-type(4) {
    transition-delay: 1.35s;
}

.hero-draw circle:nth-of-type(5) {
    transition-delay: 1.5s;
}

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.reveal-stagger.is-visible>* {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.is-visible>*:nth-child(1) {
    transition-delay: .03s;
}

.reveal-stagger.is-visible>*:nth-child(2) {
    transition-delay: .09s;
}

.reveal-stagger.is-visible>*:nth-child(3) {
    transition-delay: .15s;
}

.reveal-stagger.is-visible>*:nth-child(4) {
    transition-delay: .21s;
}

.reveal-stagger.is-visible>*:nth-child(5) {
    transition-delay: .27s;
}

.reveal-stagger.is-visible>*:nth-child(6) {
    transition-delay: .33s;
}

.reveal-stagger.is-visible>*:nth-child(7) {
    transition-delay: .39s;
}

/* ============================================
   SECCIONES GENERALES
   ============================================ */
.section {
    padding: var(--s-24) 0;
}

.section.alt {
    background: var(--off);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* Nosotros */
.about-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--s-12);
    align-items: center;
}

.about-photo {
    position: relative;
    width: 260px;
    height: 300px;
    flex-shrink: 0;
}

.about-mark {
    width: 260px;
    height: 300px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--s-10);
}

.about-mark img {
    width: 100%;
    height: auto;
}

.about-text p {
    font-size: 17px;
    color: var(--ink-soft);
    max-width: 640px;
    margin-bottom: var(--s-4);
}

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

/* Servicios / sectores */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-4);
}

.sector-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--s-6) var(--s-5);
    background: var(--white);
    transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.sector-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
    box-shadow: 0 12px 24px -14px rgba(168, 62, 43, 0.28);
}

.sector-card .icon-wrap {
    width: 40px;
    height: 40px;
    margin-bottom: var(--s-5);
}

.sector-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: var(--s-2);
}

.sector-card p {
    font-size: 13.5px;
    color: var(--gray);
}

.sector-card.wide {
    grid-column: span 2;
}

/* Servicios — tarjetas grandes con enlace */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-5);
}

.service-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--s-8);
    background: var(--white);
    transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand);
    box-shadow: 0 16px 32px -20px rgba(168, 62, 43, 0.3);
}

.service-card .icon-wrap {
    width: 44px;
    height: 44px;
    margin-bottom: var(--s-6);
}

.service-card h3 {
    font-size: 19px;
    margin-bottom: var(--s-3);
}

.service-card p {
    font-size: 14.5px;
    color: var(--ink-soft);
    margin-bottom: var(--s-6);
    flex: 1;
}

.service-card .card-link {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    transition: gap .2s var(--ease);
}

.service-card:hover .card-link {
    gap: var(--s-3);
}

/* ============================================
   BANDA DE PRODUCTO — HHUB SHOP
   ============================================ */
.product-band {
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--s-16) var(--s-12);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s-12);
    align-items: center;
    position: relative;
    overflow: hidden;
}

.product-band::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(20, 163, 152, 0.28), transparent 70%);
    pointer-events: none;
}

.product-band .eyebrow {
    color: #5fd6c9;
}

.product-band .eyebrow::before {
    background: #5fd6c9;
}

.product-band h2 {
    color: var(--white);
    font-size: clamp(26px, 3.4vw, 34px);
    margin-bottom: var(--s-4);
}

.product-band p {
    color: #c9c7c2;
    font-size: 16px;
    margin-bottom: var(--s-6);
    max-width: 460px;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-bottom: var(--s-8);
}

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    font-size: 14.5px;
    color: #e6e4df;
}

.product-features li svg {
    width: 18px;
    height: 18px;
    stroke: var(--teal);
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    margin-top: 1px;
}

.product-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-visual .product-mascot {
    width: 100%;
    max-width: 280px;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45));
}

/* Página de producto: cinta superior teal */
.brand-hhub .eyebrow,
.brand-hhub .card-link {
    color: var(--teal);
}

.brand-hhub .eyebrow::before {
    background: var(--teal);
}

.brand-hhub .service-card:hover {
    border-color: var(--teal);
    box-shadow: 0 16px 32px -20px rgba(14, 140, 127, 0.35);
}

.brand-hhub .icon.accent {
    stroke: var(--teal);
}

/* Proyectos */
.project-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--white);
    padding: var(--s-8);
    margin-bottom: var(--s-6);
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.project-card:hover {
    border-color: var(--line-strong);
    box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.18);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--s-6);
    margin-bottom: var(--s-6);
    flex-wrap: wrap;
}

.project-top h3 {
    font-size: 22px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--s-1) var(--s-3);
    border-radius: 20px;
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    white-space: nowrap;
}

.tag.status {
    color: var(--brand);
    border-color: var(--brand);
    background: var(--brand-soft);
}

.project-body {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--s-8);
}

.project-col h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
    margin-bottom: var(--s-3);
}

.project-col p {
    font-size: 14.5px;
    color: var(--ink-soft);
}

.project-col ul li {
    font-size: 14px;
    color: var(--ink-soft);
    padding-left: var(--s-4);
    position: relative;
    margin-bottom: var(--s-2);
}

.project-col ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brand);
}

/* Experiencia — timeline */
.timeline {
    position: relative;
    padding-left: var(--s-12);
}

.timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 1.5px;
    background: var(--line-strong);
}

.timeline-fill {
    position: absolute;
    left: 5px;
    top: 6px;
    width: 1.5px;
    height: 0;
    background: var(--brand);
    transition: height 1.1s var(--ease);
}

.timeline.is-visible .timeline-fill {
    height: 100%;
}

.timeline-item {
    position: relative;
    padding-bottom: var(--s-12);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--s-12) + 1px);
    top: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--ink);
    z-index: 1;
    transition: border-color .3s var(--ease), background .3s var(--ease);
}

.timeline-item.is-visible::before {
    border-color: var(--brand);
    background: var(--brand);
}

.timeline-item h3 {
    font-size: 19px;
    margin-bottom: var(--s-2);
}

.timeline-item p.desc {
    font-size: 14.5px;
    color: var(--ink-soft);
    max-width: 620px;
    margin-bottom: var(--s-4);
}

.timeline-item .chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}

.chip {
    font-size: 13px;
    font-family: var(--font-mono);
    color: var(--ink-soft);
    background: var(--off);
    border: 1px solid var(--line);
    padding: var(--s-1) var(--s-3);
    border-radius: var(--radius-sm);
}

.timeline-item-inner {
    display: flex;
    gap: var(--s-8);
    align-items: flex-start;
    flex-wrap: wrap;
}

.timeline-thumb {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--white);
    padding: var(--s-3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s var(--ease), border-color .3s var(--ease);
}

.timeline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.timeline-item:hover .timeline-thumb {
    transform: translateY(-3px);
    border-color: var(--brand);
}

.timeline-content {
    flex: 1;
    min-width: 220px;
}

.store-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-4);
}

.store-link {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 500;
    padding: var(--s-2) var(--s-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
    transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}

.store-link svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    flex-shrink: 0;
}

.store-link:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-2px);
}

/* Tecnologías */
.tech-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3);
}

.tech-pill {
    font-family: var(--font-mono);
    font-size: 13.5px;
    padding: var(--s-2) var(--s-4);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: var(--white);
    transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
    cursor: default;
}

.tech-pill:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
    transform: translateY(-2px);
}

/* Proceso */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-6);
    position: relative;
}

.process-grid::before {
    content: "";
    position: absolute;
    top: 27px;
    left: 6%;
    right: 6%;
    height: 1px;
    background: var(--line-strong);
    z-index: 0;
}

.process-step {
    position: relative;
    z-index: 1;
}

.process-num {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--white);
    border: 1.5px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--s-5);
    transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.process-step:hover .process-num {
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-3px);
}

.process-step h3 {
    font-size: 16px;
    margin-bottom: var(--s-2);
}

.process-step p {
    font-size: 13.5px;
    color: var(--gray);
}

/* Por qué */
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4) var(--s-8);
}

.why-item {
    display: flex;
    gap: var(--s-4);
    align-items: flex-start;
    padding: var(--s-5) 0;
    border-bottom: 1px solid var(--line);
}

.why-item .icon-wrap {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.why-item p {
    font-size: 15px;
    color: var(--ink-soft);
}

/* Contacto */
.contact-box {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--ink);
    color: var(--white);
    padding: var(--s-16) var(--s-12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-box h2 {
    color: var(--white);
    font-size: clamp(26px, 4vw, 36px);
    margin-bottom: var(--s-4);
}

.contact-box p {
    color: #c9c7c2;
    max-width: 480px;
    margin: 0 auto var(--s-10);
    font-size: 16px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: var(--s-4);
    flex-wrap: wrap;
}

.contact-links a {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: 14.5px;
    font-weight: 600;
    padding: var(--s-3) var(--s-6);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}

.contact-links a:hover {
    border-color: var(--brand);
    background: rgba(168, 62, 43, 0.18);
    transform: translateY(-2px);
}

.contact-links svg {
    width: 16px;
    height: 16px;
    stroke: var(--white);
}

footer {
    padding: var(--s-12) 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray);
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    margin-bottom: var(--s-3);
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 500;
}

.footer-brand img {
    width: 22px;
    height: 22px;
    border-radius: 5px;
}

.footer-legal {
    margin-top: var(--s-2);
}

.footer-legal a {
    color: var(--gray);
    transition: color .2s var(--ease);
}

.footer-legal a:hover {
    color: var(--brand);
}

/* ============================================
   PÁGINA LEGAL / SUBPÁGINAS — encabezado
   ============================================ */
.legal-hero {
    padding: calc(var(--s-24) + var(--s-8)) 0 var(--s-12);
    background: var(--off);
    border-bottom: 1px solid var(--line);
}

.legal-back {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray);
    margin-bottom: var(--s-8);
    transition: color .2s var(--ease);
}

.legal-back:hover {
    color: var(--brand);
}

.legal-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    max-width: 760px;
    margin-bottom: var(--s-3);
}

.legal-sub {
    font-size: 17px;
    color: var(--ink-soft);
    margin-bottom: var(--s-4);
    max-width: 640px;
}

.legal-updated {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--gray);
}

.legal-container {
    max-width: 760px;
}

.legal-intro {
    font-size: 16.5px;
    color: var(--ink-soft);
    margin-bottom: var(--s-5);
}

.legal-block {
    padding-top: var(--s-10);
    margin-top: var(--s-10);
    border-top: 1px solid var(--line);
}

.legal-block h2 {
    font-size: clamp(20px, 2.6vw, 24px);
    margin-bottom: var(--s-5);
}

.legal-block>p {
    font-size: 16px;
    color: var(--ink-soft);
    margin-bottom: var(--s-4);
}

.legal-list {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-bottom: var(--s-4);
}

.legal-list li {
    position: relative;
    padding-left: var(--s-5);
    font-size: 15.5px;
    color: var(--ink-soft);
    line-height: 1.6;
}

.legal-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.legal-list strong,
.legal-intro strong,
.legal-block p strong {
    color: var(--ink);
    font-weight: 600;
}

.legal-note {
    border-left: 3px solid var(--brand);
    background: var(--brand-soft);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--s-5) var(--s-6);
    font-size: 15px;
    color: var(--ink-soft);
    line-height: 1.65;
    margin-top: var(--s-4);
}

.legal-contact {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    margin-top: var(--s-2);
}

.legal-contact li {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.legal-contact-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray);
}

.legal-contact a {
    font-size: 16px;
    font-weight: 600;
    color: var(--brand);
    transition: color .2s var(--ease);
    width: fit-content;
}

.legal-contact a:hover {
    color: var(--brand-dark);
}

/* ============================================
   FAQ
   ============================================ */
.faq {
    max-width: 780px;
    border-top: 1px solid var(--line);
}

.faq-item {
    border-bottom: 1px solid var(--line);
}

.faq-item summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: var(--s-5) var(--s-8) var(--s-5) 0;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    transition: color .2s var(--ease);
}

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

.faq-item summary:hover {
    color: var(--brand);
}

.faq-item summary::after {
    content: "";
    position: absolute;
    right: var(--s-2);
    top: 50%;
    width: 12px;
    height: 2px;
    background: var(--brand);
    transform: translateY(-50%);
}

.faq-item summary::before {
    content: "";
    position: absolute;
    right: calc(var(--s-2) + 5px);
    top: 50%;
    width: 2px;
    height: 12px;
    background: var(--brand);
    transform: translateY(-50%);
    transition: opacity .2s var(--ease);
}

.faq-item[open] summary::before {
    opacity: 0;
}

.faq-item p {
    padding: 0 var(--s-8) var(--s-6) 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.7;
    max-width: 680px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width:920px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav.mobile-open .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        padding: var(--s-6);
        gap: var(--s-5);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--s-10);
    }

    .hero-visual {
        max-width: 340px;
        margin: 0 auto;
    }

    .about-grid {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: left;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

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

    .sector-card.wide {
        grid-column: span 1;
    }

    .product-band {
        grid-template-columns: 1fr;
        padding: var(--s-12) var(--s-8);
        gap: var(--s-8);
    }

    .product-visual {
        order: -1;
    }

    .product-visual .product-mascot {
        max-width: 200px;
    }

    .project-body {
        grid-template-columns: 1fr;
        gap: var(--s-5);
    }

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

    .process-grid::before {
        display: none;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width:560px) {
    .container {
        padding: 0 var(--s-4);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-meta {
        gap: var(--s-6);
        flex-wrap: wrap;
    }

    .sector-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .contact-box {
        padding: var(--s-10) var(--s-5);
    }

    .logo span.logo-name {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .reveal,
    .reveal-stagger>* {
        opacity: 1;
        transform: none;
    }
}