/* Escaparate Proyectos_IA — paleta verde/tostado del portal padre */

/* ---------- Modo iframe (dentro del portal padre) ---------- */
/* La sub-cabecera y el aire extra se ocultan cuando el escaparate se carga */
/* como iframe del portal padre para no duplicar la barra de navegación. */
html.in-iframe .topbar          { display: none !important; }
html.in-iframe .hero            { padding-top: 40px !important; }
html.in-iframe .panel-hero      { padding-top: 32px !important; }
html.in-iframe .project-header  { padding-top: 32px !important; }
html.in-iframe .footer          { display: none !important; }

:root {
    --bg:        #f6f3ee;
    --bg-alt:    #fbfaf6;
    --card:      #ffffff;
    --ink:       #1c1a17;
    --muted:     #8b8478;
    --line:      #e8e2d6;
    --accent:    #5b6c5d;
    --accent-d:  #455146;
    --accent-l:  #748b76;
    --accent-vl: #dfe6df;
    --terra:     #a8664c;
    --gold:      #c9a227;
    --red:       #c44545;
    --green:     #2a8f62;
    --shadow-sm: 0 2px 8px rgba(28,26,23,.05);
    --shadow:    0 8px 32px rgba(28,26,23,.08);
    --shadow-lg: 0 16px 48px rgba(28,26,23,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

a { color: var(--accent-d); text-decoration: none; }
a:hover { color: var(--accent); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Barra superior ---------- */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
    position: sticky; top: 0; z-index: 10;
}
.topbar-inner { display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px; letter-spacing: -.02em;
}
.brand-name { font-size: .98rem; font-weight: 600; }
.brand-sub  { font-size: .78rem; color: var(--muted); }
.brand-by   { font-size: .78rem; font-weight: 400; color: var(--muted); margin-left: 4px; letter-spacing: 0; }

.top-nav { display: flex; gap: 4px; margin-left: 24px; flex: 1 1 auto; }
.top-nav a {
    padding: 6px 12px; border-radius: 8px;
    font-size: .88rem; font-weight: 500; color: var(--muted);
}
.top-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.top-nav a.is-active { background: var(--accent-vl); color: var(--accent-d); }

.top-cta {
    background: var(--accent); color: #fff;
    padding: 7px 14px; border-radius: 8px;
    font-size: .85rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px;
}
.top-cta:hover { background: var(--accent-d); color: #fff; }

/* ---------- Hero ---------- */
.hero {
    padding: 56px 0 40px;
    text-align: center;
}
.hero .eyebrow {
    display: inline-block;
    background: var(--accent-vl); color: var(--accent-d);
    font-size: .72rem; font-weight: 600;
    padding: 5px 12px; border-radius: 100px;
    letter-spacing: .06em; text-transform: uppercase;
    margin-bottom: 16px;
}
.hero h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700; margin: 0 0 12px;
    letter-spacing: -.02em; line-height: 1.15;
}
.hero p {
    max-width: 640px; margin: 0 auto;
    color: var(--muted); font-size: 1.05rem;
}

/* ---------- Grid de proyectos ---------- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0 60px;
}
.project-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent-l);
}
.project-card__thumb {
    height: 140px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-l) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 3rem;
    position: relative;
}
.project-card__badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255,255,255,.9); color: var(--accent-d);
    padding: 4px 10px; border-radius: 100px;
    font-size: .7rem; font-weight: 600; letter-spacing: .04em;
}
.project-card__body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.project-card__name { font-size: 1.05rem; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
.project-card__tag  { font-size: .82rem; color: var(--muted); margin: 0 0 12px; }
.project-card__desc { font-size: .88rem; color: var(--ink); margin: 0 0 14px; flex: 1; }
.project-card__foot {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; border-top: 1px solid var(--line);
}
.project-card__client { font-size: .74rem; color: var(--muted); font-weight: 500; }
.project-card__link {
    font-size: .82rem; font-weight: 600; color: var(--accent-d);
    display: inline-flex; align-items: center; gap: 4px;
}

/* ---------- Sección genérica ---------- */
.section-title {
    font-size: 1.35rem; font-weight: 600; margin: 40px 0 4px;
    letter-spacing: -.01em;
}
.section-sub {
    color: var(--muted); font-size: .92rem; margin: 0 0 24px;
}

/* ---------- Ficha proyecto ---------- */
.project-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    padding: 32px 0;
}
.project-header__meta {
    display: flex; gap: 8px; margin-bottom: 12px;
    font-size: .75rem; color: var(--muted);
}
.project-header__meta a { color: var(--muted); }
.project-header__title {
    font-size: 2rem; font-weight: 700; margin: 0 0 6px;
    letter-spacing: -.02em;
}
.project-header__tag { color: var(--accent-d); font-size: 1.1rem; margin: 0 0 20px; }

.project-body { padding: 40px 0 60px; }
.project-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: 32px;
}
@media (max-width: 800px) { .project-grid { grid-template-columns: 1fr; } }
.project-main h2 {
    font-size: 1.15rem; font-weight: 600; margin: 0 0 12px;
    letter-spacing: -.01em;
}
.project-main p { color: var(--ink); font-size: .96rem; }
.project-side .side-card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.side-card h3 {
    font-size: .72rem; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em;
    margin: 0 0 12px;
}
.tech-chip {
    display: inline-block; background: var(--bg-alt);
    color: var(--accent-d); padding: 4px 10px; border-radius: 100px;
    font-size: .78rem; margin: 2px; border: 1px solid var(--line);
}
.metric { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.metric__label { font-size: .82rem; color: var(--muted); }
.metric__value { font-size: .95rem; font-weight: 600; }
.btn-demo {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--accent); color: #fff;
    padding: 10px 18px; border-radius: 10px;
    font-size: .92rem; font-weight: 500;
    width: 100%;
    transition: background .15s;
}
.btn-demo:hover { background: var(--accent-d); color: #fff; }
.btn-demo.is-locked { background: var(--bg-alt); color: var(--muted); border: 1px dashed var(--line); }

.status-chip {
    display: inline-block;
    font-size: .72rem; font-weight: 600;
    padding: 3px 10px; border-radius: 100px;
    letter-spacing: .04em;
}
.status-chip.produccion  { background: rgba(42,143,98,.12); color: var(--green); }
.status-chip.demo        { background: rgba(201,162,39,.14); color: var(--gold); }

/* ---------- Panel interno ---------- */
.panel-hero {
    background: linear-gradient(135deg, var(--accent-d) 0%, var(--accent) 100%);
    color: #fff;
    padding: 32px 0;
}
.panel-hero .eyebrow { background: rgba(255,255,255,.15); color: #fff; }
.panel-hero h1 { color: #fff; }
.panel-hero p  { color: rgba(255,255,255,.85); }

.panel-card { border: 1px solid var(--line); }
.panel-card .project-card__foot { border-top: 1px solid var(--line); }
.panel-card__enter {
    background: var(--accent); color: #fff !important;
    padding: 6px 14px; border-radius: 8px; font-size: .8rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background .15s;
}
.panel-card__enter:hover { background: var(--accent-d); }

/* ---------- Footer ---------- */
.footer {
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 24px 0;
    font-size: .82rem; color: var(--muted);
    text-align: center;
}
