/* =====================================================
   ApOG — Consultoría · main.css
   ===================================================== */

:root {
    --bg: #0a0a0c;
    --bg-soft: #111114;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #f4f4f6;
    --muted: #9b9ba6;
    --muted-2: #6e6e7a;
    --red: #ff2942;
    --red-2: #ff5b6e;
    --red-soft: rgba(255, 41, 66, 0.14);
    --grad: linear-gradient(135deg, #ff5b6e 0%, #ff2942 50%, #c4122a 100%);
    --radius: 18px;
    --radius-lg: 26px;
    --maxw: 1160px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { width: 100%; height: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .brand__name { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; }

/* ---------- Background decoration ---------- */
.bg-mesh {
    position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(60vw 60vw at 75% -10%, rgba(255, 41, 66, 0.18), transparent 60%),
        radial-gradient(50vw 50vw at 0% 30%, rgba(255, 91, 110, 0.08), transparent 55%),
        radial-gradient(60vw 60vw at 50% 120%, rgba(196, 18, 42, 0.10), transparent 60%);
}
.bg-grid {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
}

/* ---------- Navbar ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    transition: all 0.35s var(--ease);
}
.nav__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 76px;
}
.nav.scrolled {
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav.scrolled .nav__inner { height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: auto; }
.brand__name { font-size: 1.25rem; font-weight: 700; }

.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
    font-size: 0.94rem; color: var(--muted); font-weight: 500;
    padding: 9px 14px; border-radius: 100px; transition: color 0.2s, background 0.2s;
}
.nav__link:hover { color: var(--text); }
.nav__cta {
    color: var(--text); border: 1px solid var(--border-strong);
    margin-left: 8px;
}
.nav__cta:hover { background: var(--red-soft); border-color: var(--red); color: #fff; }

.nav__toggle {
    display: none; flex-direction: column; gap: 5px; background: none;
    border: none; cursor: pointer; padding: 8px;
}
.nav__toggle span {
    width: 24px; height: 2px; background: var(--text); border-radius: 2px;
    transition: 0.3s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.98rem;
    padding: 14px 26px; border-radius: 100px; cursor: pointer; border: 1px solid transparent;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s;
    white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; }
.btn .ico path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary {
    background: var(--grad); color: #fff;
    box-shadow: 0 8px 30px -8px rgba(255, 41, 66, 0.6);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(255, 41, 66, 0.7); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn--full { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 168px 0 80px; }
.hero__inner { max-width: 880px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 0.85rem; color: var(--muted); font-weight: 500;
    padding: 7px 15px; border: 1px solid var(--border); border-radius: 100px;
    background: var(--surface); margin-bottom: 28px;
}
.eyebrow .dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--red);
    box-shadow: 0 0 0 4px var(--red-soft); animation: pulse 2.4s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }

.hero__title {
    font-size: clamp(2.6rem, 6.5vw, 5rem); font-weight: 700; line-height: 1.04;
}
.grad {
    background: var(--grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero__lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted);
    max-width: 620px; margin-top: 26px;
}
.hero__cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.hero__chips {
    display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin-top: 46px;
}
.hero__chips li {
    font-size: 0.84rem; color: var(--muted); font-weight: 500;
    padding: 8px 16px; border: 1px solid var(--border); border-radius: 100px;
    background: var(--surface);
}

/* ---------- Stats ---------- */
.stats { margin-top: 30px; }
.stats__grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.stat { background: var(--bg-soft); padding: 34px 26px; text-align: center; }
.stat__num {
    font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700; background: var(--grad); -webkit-background-clip: text;
    background-clip: text; -webkit-text-fill-color: transparent; line-height: 1;
}
.stat__label { font-size: 0.88rem; color: var(--muted); margin-top: 12px; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.kicker {
    text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem;
    font-weight: 600; color: var(--red-2); margin-bottom: 16px;
}
.section__title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; line-height: 1.08; }
.section__head { max-width: 640px; margin-bottom: 56px; }
.section__sub { color: var(--muted); margin-top: 18px; font-size: 1.05rem; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.about__body p { color: var(--muted); margin-bottom: 18px; font-size: 1.06rem; }
.about__meta { display: flex; gap: 40px; margin-top: 34px; flex-wrap: wrap; }
.about__meta div { display: flex; flex-direction: column; gap: 4px; }
.about__meta strong { font-family: 'Space Grotesk', sans-serif; font-size: 0.95rem; }
.about__meta span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Services / cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
    position: relative; padding: 34px; border: 1px solid var(--border);
    border-radius: var(--radius-lg); background: var(--surface);
    overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.card::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(120% 100% at 100% 0%, var(--red-soft), transparent 55%);
    opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card__icon {
    width: 52px; height: 52px; border-radius: 14px; padding: 13px; margin-bottom: 22px;
    background: var(--red-soft); border: 1px solid rgba(255, 41, 66, 0.25); color: var(--red-2);
}
.card__icon svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 1rem; margin-bottom: 20px; }
.card__list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.card__list li {
    position: relative; padding-left: 22px; font-size: 0.92rem; color: var(--text);
}
.card__list li::before {
    content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px;
    border-radius: 3px; background: var(--grad);
}

/* ---------- Approach / steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
    padding: 30px 26px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); transition: border-color 0.3s, transform 0.3s var(--ease);
}
.step:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.step__num {
    font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 700;
    color: var(--red-2); display: inline-block; margin-bottom: 18px;
    padding: 4px 12px; border: 1px solid rgba(255, 41, 66, 0.25); border-radius: 100px;
    background: var(--red-soft);
}
.step h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: start; }
.contact__lead { color: var(--muted); margin-top: 18px; font-size: 1.05rem; }
.contact__list { list-style: none; margin-top: 38px; display: flex; flex-direction: column; gap: 18px; }
.contact__list li { display: flex; align-items: center; gap: 14px; font-size: 1.02rem; }
.contact__list a:hover { color: var(--red-2); }
.contact__ico {
    width: 42px; height: 42px; flex: 0 0 42px; padding: 11px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); color: var(--red-2);
}
.contact__ico svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.contact__form-wrap {
    padding: 36px; border: 1px solid var(--border); border-radius: var(--radius-lg);
    background: var(--bg-soft);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; margin-bottom: 16px; }
.field input, .field textarea {
    width: 100%; padding: 18px 16px 8px; background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px; font: inherit; font-size: 0.98rem;
    transition: border-color 0.25s, background 0.25s; resize: vertical;
}
.field textarea { min-height: 120px; }
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--red); background: var(--surface-2);
}
.field label {
    position: absolute; left: 16px; top: 15px; color: var(--muted-2);
    font-size: 0.98rem; pointer-events: none; transition: 0.2s var(--ease);
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
    top: 7px; font-size: 0.72rem; color: var(--red-2);
}
.form__messages { font-size: 0.95rem; margin-bottom: 4px; }
.form__messages.show { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; }
.form__messages.ok { background: rgba(46, 204, 113, 0.12); border: 1px solid rgba(46, 204, 113, 0.3); color: #7ee2a8; }
.form__messages.err { background: var(--red-soft); border: 1px solid rgba(255, 41, 66, 0.3); color: var(--red-2); }
.btn.is-loading { opacity: 0.7; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer__copy { color: var(--muted-2); font-size: 0.9rem; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
    width: 40px; height: 40px; padding: 10px; border-radius: 11px; color: var(--muted);
    border: 1px solid var(--border); background: var(--surface); transition: 0.25s;
}
.footer__social a:hover { color: #fff; border-color: var(--red); background: var(--red-soft); }
.footer__social svg { fill: currentColor; }
.footer__social svg path { fill: currentColor; }
.footer__social a[aria-label="Email"] svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about__grid, .contact__grid { grid-template-columns: 1fr; gap: 36px; }
    .stats__grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .nav__toggle { display: flex; }
    .nav__links {
        position: fixed; inset: 0 0 auto 0; top: 0; flex-direction: column; align-items: stretch;
        gap: 4px; padding: 92px 24px 28px; background: rgba(10, 10, 12, 0.96);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-110%); transition: transform 0.4s var(--ease);
    }
    .nav__links.open { transform: none; }
    .nav__link { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
    .nav__cta { margin-left: 0; text-align: center; margin-top: 8px; }
    .cards { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }
    .hero { padding: 130px 0 60px; }
    .section { padding: 72px 0; }
    .about__meta { gap: 26px; }
}

@media (max-width: 460px) {
    .stats__grid, .steps { grid-template-columns: 1fr; }
    .contact__form-wrap { padding: 24px; }
}
