/* ============================================================
   OGN STUDIOS — Apple-inspired dark design system, v4
   Signature: per-section gradient accents, glowing card hovers.
   Pure black. Inter. Big confident type.
   ============================================================ */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: optional;
}

:root {
    --bg: #000000;
    --card: #1d1d1f;
    --fg: #f5f5f7;
    --muted: #86868b;
    --line: rgba(255, 255, 255, 0.1);
    --blue: #2997ff;
    --blue-btn: #0071e3;
    --wa-green: #25D366;
    --font: 'Inter', -apple-system, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --nav-h: 52px;
    --radius: 22px;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.menu-open, body.modal-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: var(--font); }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Nav: logo + hamburger, always ---------- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1200;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav-inner {
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--fg);
}
.menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
}
.menu-btn span {
    width: 20px; height: 1.5px;
    background: var(--fg);
    margin: 0 auto;
    transition: transform 0.3s var(--ease);
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.3px) rotate(-45deg); }

/* ---------- Fullscreen menu overlay ---------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 max(22px, 12vw);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.menu-overlay.open { opacity: 1; visibility: visible; }
.menu-list { list-style: none; }
.menu-list li {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
    transition-delay: 0s;
}
.menu-overlay.open .menu-list li {
    opacity: 1;
    transform: none;
    transition-delay: calc(0.06s + var(--i) * 0.05s);
}
.menu-list a {
    display: inline-block;
    padding: 0.55rem 0;
    font-size: clamp(1.9rem, 5.5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--fg);
    transition: color 0.2s ease;
}
.menu-list a:hover { color: var(--blue); }
.menu-foot {
    position: absolute;
    bottom: 2.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------- Hero + aurora signature ---------- */
.hero {
    position: relative;
    padding: calc(var(--nav-h) + clamp(5rem, 15vh, 9.5rem)) 22px clamp(5.5rem, 13vh, 9rem);
    text-align: center;
    overflow: hidden;
}
.hero-title {
    font-size: clamp(3rem, 9vw, 6.4rem);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.03;
    background: linear-gradient(180deg, #ffffff 55%, #a8a8ad 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.3rem;
}
.hero-sub {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 2.4rem;
    line-height: 1.5;
}
.br-desk { display: none; }
@media (min-width: 700px) { .br-desk { display: block; } }
.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
    flex-wrap: wrap;
}

/* ---------- Buttons & links ---------- */
.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.7rem;
    min-height: 48px;
    font-weight: 500;
    font-size: 1.02rem;
    text-decoration: none;
    color: #fff;
    background: var(--blue-btn);
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s var(--ease);
}
.btn-pill:hover { background: #1483eb; transform: translateY(-1px); }
.btn-wa { background: var(--wa-green); }
.btn-wa:hover { background: #1fc65b; }
.btn-block { width: 100%; justify-content: center; }
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 1.02rem;
    color: var(--blue);
    text-decoration: none;
    min-height: 44px;
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow span { font-size: 1.15em; transition: transform 0.2s var(--ease); }
.link-arrow:hover span { transform: translateX(3px); }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 11vh, 8rem) 22px; }
.section-head { max-width: 720px; margin: 0 auto; text-align: center; }
.section-label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    display: inline-block;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* per-section identity colors */
.lab-web     { background-image: linear-gradient(90deg, #2997ff, #7b5bff); }
.lab-foto    { background-image: linear-gradient(90deg, #ff6482, #ffb02e); }
.lab-ia      { background-image: linear-gradient(90deg, #30d158, #00c8be); }
.lab-contact { background-image: linear-gradient(90deg, #2997ff, #30d158); }

.section-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.08;
    margin-bottom: 1rem;
}
.section-sub {
    font-size: clamp(1.02rem, 1.6vw, 1.25rem);
    color: var(--muted);
    line-height: 1.55;
}
.section-cta { text-align: center; margin-top: 2.6rem; }

/* ---------- Showcase (Diseño Web) ---------- */
.showcase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    max-width: 1024px;
    margin: 3.2rem auto 0;
}
.showcase-card {
    display: block;
    text-decoration: none;
    border-radius: var(--radius);
    transition: transform 0.35s var(--ease);
}
.showcase-card:hover { transform: translateY(-4px); }
.showcase-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.2rem 0 0.3rem;
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
}
.visit { font-size: 0.85rem; font-weight: 500; color: var(--blue); }
.visit.soon { color: var(--muted); }
.showcase-card > p { color: var(--muted); font-size: 0.98rem; max-width: 46ch; }
.sc-browser {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.showcase-card:hover .sc-browser {
    border-color: rgba(41, 151, 255, 0.45);
    box-shadow: 0 0 42px rgba(41, 151, 255, 0.12);
}
.sc-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid var(--line);
}
.sc-chrome span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.sc-chrome p { margin-left: 0.8rem; font-size: 0.76rem; color: var(--muted); }
.sc-screen {
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.4rem;
}
.sc-mint {
    background:
        radial-gradient(circle at 78% 18%, rgba(41, 151, 255, 0.22), transparent 52%),
        linear-gradient(165deg, #15181d 0%, #0b0d10 100%);
}
.sc-estate {
    background:
        radial-gradient(circle at 22% 22%, rgba(123, 91, 255, 0.2), transparent 55%),
        linear-gradient(200deg, #14121c 0%, #0b0a10 100%);
}
.sc-brand { font-weight: 700; font-size: 1.5rem; letter-spacing: 0.05em; color: var(--fg); }
.sc-note { font-size: 0.85rem; color: var(--muted); }

/* ---------- Niche cards: one per category, uniform 2x2 ---------- */
.niche-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1080px;
    margin: 3.2rem auto 0;
}
.niche-card {
    position: relative;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    cursor: pointer;
    padding: 0;
    transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
}
.niche-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 100, 130, 0.45);
    box-shadow: 0 0 42px rgba(255, 100, 130, 0.1);
}
.niche-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}
.niche-card:hover img { transform: scale(1.05); }
.niche-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 45%);
}
.niche-label {
    position: absolute;
    left: 0; right: 0;
    bottom: 1.05rem;
    z-index: 1;
    font-size: 1.18rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.01em;
}
.niche-label::after {
    content: '›';
    margin-left: 0.35rem;
    color: var(--blue);
}

/* ---------- Gallery modal ---------- */
.gallery-modal {
    width: min(96vw, 1100px);
    max-height: 88dvh;
    margin: auto;
    background: #101012;
    color: var(--fg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    display: none;
    flex-direction: column;
}
.gallery-modal[open] { display: flex; }
.gallery-modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}
.gm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--line);
}
.gm-head h3 { font-size: 1.15rem; font-weight: 600; }
.gm-close {
    width: 40px; height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.gm-close:hover { background: rgba(255, 255, 255, 0.16); }
.gm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
    padding: 1.2rem 1.4rem;
    overflow-y: auto;
}
.gm-grid img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 14px;
}
.gm-note {
    padding: 0.9rem 1.4rem 1.2rem;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--line);
}

/* ---------- Chat demo (IA) ---------- */
.chat-demo {
    max-width: 560px;
    margin: 3.2rem auto 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.chat-demo:hover {
    border-color: rgba(48, 209, 88, 0.4);
    box-shadow: 0 0 42px rgba(48, 209, 88, 0.08);
}
.chat-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}
.chat-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    background: linear-gradient(135deg, #30d158, #00c8be);
    color: #fff;
}
.chat-name { font-weight: 600; font-size: 0.95rem; }
.chat-status { font-size: 0.78rem; color: var(--wa-green); }
.chat-body {
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.bubble {
    max-width: 82%;
    padding: 0.7rem 1rem;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.45;
}
.bubble.in { align-self: flex-start; background: #2c2c2e; border-bottom-left-radius: 6px; }
.bubble.out { align-self: flex-end; background: #0a5c33; border-bottom-right-radius: 6px; }
.bubble.typing {
    align-self: flex-end;
    background: #0a5c33;
    display: flex;
    gap: 4px;
    padding: 0.85rem 1rem;
}
.bubble.typing span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: typing 1.3s infinite;
}
.bubble.typing span:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}
.chat-caption {
    padding: 0 1.3rem 1.2rem;
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
}

/* ---------- Contacto ---------- */
.contact-wrap { max-width: 560px; margin: 2.6rem auto 0; text-align: center; }
.contact-or { margin: 1.6rem 0; font-size: 0.88rem; color: var(--muted); }
form { text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    min-height: 48px;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--fg);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--blue); }
.form-group textarea { min-height: 110px; resize: vertical; }
.hp { display: none; }
.success-message {
    display: none;
    margin-top: 1.1rem;
    padding: 0.95rem 1.2rem;
    border-radius: 12px;
    background: rgba(41, 151, 255, 0.1);
    border: 1px solid rgba(41, 151, 255, 0.4);
    font-weight: 500;
    text-align: center;
}
.success-message.show { display: block; }

/* ---------- Marcas ---------- */
.brands-section {
    text-align: center;
    border-top: 1px solid var(--line);
    padding-top: 3.6rem;
    padding-bottom: 3.6rem;
}
.brands-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
}
.brands {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3.2rem;
}
.brands img {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(3.2) contrast(0.9);
    opacity: 0.75;
    transition: opacity 0.25s ease, filter 0.25s ease;
}
.brands img:hover { opacity: 1; filter: grayscale(0) brightness(1.6); }

/* ---------- Footer ---------- */
footer {
    padding: 1.6rem 22px 2.2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--line);
    background: #0a0a0c;
}

/* ---------- WhatsApp FAB: pinned bottom-right, always ---------- */
.wa-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1300;
    width: 56px; height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--wa-green);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s var(--ease);
}
.wa-fab:hover { transform: scale(1.07); }

/* ---------- Reveals ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); }
html.js .reveal.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.js .reveal { opacity: 1; transform: none; transition: none; }
    .bubble.typing span { animation: none; }
    .niche-card img, .wa-fab, .link-arrow span, .showcase-card { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .showcase-grid { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 700px) {
    .niche-grid { grid-template-columns: 1fr; gap: 0.8rem; }
    .hero-ctas { flex-direction: column; gap: 1rem; }
    .form-row { grid-template-columns: 1fr; }
    .brands { gap: 2rem; }
    .brands img { height: 36px; }
}
