/* =====================================================
   PMR STUDIO – STYLE.CSS (CLEAN / CONSOLIDATED)
   + MOBILE HEADER FIX + TIERS/AI POLISH
   ===================================================== */

/* =========================
   1) TOKENS / BASE
   ========================= */
:root{
  --bg:#f7fbf9;
  --bg2:#ffffff;
  --text:#0f172a;
  --muted:rgba(15,23,42,0.70);

  --card:#ffffff;
  --card2:#f1faf5;

  --line:rgba(15,23,42,0.10);
  --line2:rgba(15,23,42,0.16);

  --accent:#0ea35a;
  --accent2:#0b7a44;
  --accentSoft:rgba(14,163,90,0.14);

  --shadow:0 10px 30px rgba(15,23,42,0.08);
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:linear-gradient(180deg,var(--bg),#eef7f2);
  color:var(--text);
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial;
}

html{
  scroll-behavior:smooth;
  scroll-padding-top: var(--header-offset, 92px);
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
}

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

:focus-visible{
  outline:2px solid rgba(14,163,90,.45);
  outline-offset:2px;
  border-radius:12px;
}

.container{
  width:min(1120px,92%);
  margin:0 auto;
}

section[id]{
  scroll-margin-top: var(--header-offset, 92px);
}

/* =========================
   2) TYPOGRAPHY
   ========================= */
h1{
  margin:14px 0 10px;
  font-size:clamp(30px,4vw,48px);
  letter-spacing:-0.02em;
  line-height:1.08;
}

h2{
  margin:0 0 10px;
  font-size:26px;
  font-weight:800;
  letter-spacing:-0.01em;
}

h3{ margin:0 0 10px; font-weight:800; }
h4{ margin:0 0 8px; font-weight:800; }

.lead{
  color:var(--muted);
  font-size:19px;
  line-height:1.65;
  margin:0;
  max-width:62ch;
}

.sub{
  color:var(--muted);
  margin:0 0 18px;
}

.small{
  font-size:13px;
  color:var(--muted);
  line-height:1.5;
}

/* =========================
   3) HEADER / NAV
   ========================= */
.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 0;
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(247,251,249,.78);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}

.brand-logo img{
  width:110px;
  height:110px;
  object-fit:contain;
  transition:transform .25s ease;
}

.brand-logo:hover img{ transform:scale(1.03); }

/* NAV WRAP: desktop inline, mobile becomes panel */
.nav-wrap{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex:1;
  gap:16px;
}

.nav{
  display:flex;
  gap:12px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.nav a{
  padding:8px 10px;
  border-radius:12px;
  color:var(--muted);
  border:1px solid transparent;
}

.nav a:hover{
  background:rgba(15,23,42,.04);
  color:var(--text);
  border-color:var(--line);
}

.nav a.is-active{
  background:rgba(14,163,90,.10);
  border-color:rgba(14,163,90,.25);
  color:var(--accent2);
  font-weight:700;
}

/* ACTIONS: languages always visible + burger */
.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.lang{ display:flex; gap:8px; }

.chip{
  border:1px solid var(--line);
  background:#fff;
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  color:var(--muted);
}

.chip.is-active{
  background:var(--accentSoft);
  border-color:rgba(14,163,90,.35);
  color:var(--accent2);
  font-weight:800;
}

.burger{
  display:none;
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
  cursor:pointer;
  padding:10px;
  align-items:center;
  justify-content:center;
}

.burger span{
  display:block;
  height:2px;
  width:20px;
  background:rgba(15,23,42,.7);
  border-radius:999px;
  margin:4px 0;
  transition:transform .18s ease, opacity .18s ease;
}

/* Burger animation when open */
body.nav-open .burger span:nth-child(1){
  transform:translateY(6px) rotate(45deg);
}
body.nav-open .burger span:nth-child(2){
  opacity:0;
}
body.nav-open .burger span:nth-child(3){
  transform:translateY(-6px) rotate(-45deg);
}

/* =========================
   4) BUTTONS
   ========================= */
.cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.btn{
  padding:11px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
}

.btn:hover{
  border-color:var(--line2);
  background:rgba(15,23,42,0.02);
}

.btn.primary{
  background:var(--accentSoft);
  border-color:rgba(14,163,90,.35);
  color:var(--accent2);
  font-weight:900;
}

.btn.ghost{ color:var(--muted); }

/* =========================
   5) SECTIONS / GRID
   ========================= */
.section{
  padding:44px 0;
  position:relative;
}

.section::after{
  content:"";
  position:absolute;
  bottom:0;
  left:50%;
  width:60%;
  height:1px;
  background:linear-gradient(to right, transparent, rgba(14,163,90,0.35), transparent);
  transform:translateX(-50%);
}

.grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

/* =========================
   6) CARDS
   ========================= */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}

.lift{
  transition:transform .2s ease, box-shadow .2s ease;
}

.lift:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow);
}

/* =========================
   7) HERO (FIX: no stretch + premium)
   ========================= */
.hero{
  padding:56px 0 34px;
  border-bottom:1px solid var(--line);
}

.hero-inner{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap:22px;
  align-items:start;
}

.hero-copy{ min-width:0; }

.pill{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(14,163,90,.10);
  border:1px solid rgba(14,163,90,.25);
  color:var(--accent2);
  font-weight:800;
  font-size:14px;
  letter-spacing:0.2px;
}

.hero-micro{
  margin:10px 0 0;
  font-size:14px;
  line-height:1.55;
  color:rgba(15,23,42,0.78);
  max-width:72ch;
}

/* Hero card (derecha) */
.hero-card{
  padding:18px;
  border-radius:18px;

  background:
    radial-gradient(900px 400px at 0% 0%, rgba(14,163,90,0.10), transparent 55%),
    linear-gradient(180deg,#fff,#f1faf5);

  border:1px solid var(--line);
  box-shadow:0 14px 36px rgba(15,23,42,0.10);

  align-self:start;
  height:fit-content;
}

.hero-card h3{
  margin:2px 0 12px;
  font-size:16px;
  font-weight:900;
  letter-spacing:0.2px;
}

.checklist{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.checklist li{
  padding-left:22px;
  position:relative;
  font-size:14px;
  color:var(--muted);
  line-height:1.45;
}

.checklist li::before{
  content:"✔";
  position:absolute;
  left:0;
  top:0;
  color:var(--accent);
  font-weight:900;
}

.hero-kpis{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
  display:grid;
  gap:10px;
}

.hero-kpi{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
}

.hero-kpi strong{
  font-weight:900;
  font-size:13px;
  letter-spacing:0.2px;
  color:var(--text);
  white-space:nowrap;
}

.hero-kpi span{
  font-size:13px;
  color:var(--muted);
  text-align:right;
  line-height:1.35;
}

/* =========================
   7.5) TIERS + AI micro polish
   ========================= */
.price{
  font-size:34px;
  font-weight:950;
  letter-spacing:-0.02em;
}

.price span{
  font-size:14px;
  font-weight:800;
  color:var(--muted);
  margin-left:6px;
}

.tier-highlight{
  border-color:rgba(14,163,90,.28);
  box-shadow:0 14px 36px rgba(15,23,42,0.10);
  background:
    radial-gradient(800px 300px at 0% 0%, rgba(14,163,90,0.10), transparent 55%),
    #fff;
}

.badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}

.badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(14,163,90,.25);
  background:rgba(14,163,90,.08);
  color:var(--accent2);
  font-weight:800;
  font-size:12px;
}

/* =========================
   8) PROCESS
   ========================= */
.steps{
  margin:18px 0 0;
  padding-left:18px;
}

.steps li{
  padding:16px 0;
  border-bottom:1px solid rgba(15,23,42,.06);
}

.steps li:last-child{ border-bottom:none; }

.steps strong{
  font-weight:900;
  letter-spacing:.2px;
}

.step-output{
  margin-top:12px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid rgba(14,163,90,.25);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(14,163,90,.12), transparent 55%),
    #fff;
}

.step-output-label{
  font-weight:950;
  font-size:16px;
}

.step-output-value{
  font-weight:900;
  font-size:18px;
  color:var(--accent2);
}

/* =========================
   9) OTHER GRIDS
   ========================= */
.tiers-grid,
.portfolio-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.ai-grid,
.contact-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

/* =========================
   10) FOOTER
   ========================= */
.footer{
  padding:24px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
}

.footer a{
  text-decoration:underline;
  text-underline-offset:3px;
  color:inherit;
}

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

/* =========================
   11) REVEAL
   ========================= */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s ease, transform .6s ease;
}

.reveal.is-visible{
  opacity:1;
  transform:none;
}

/* =========================
   12) RESPONSIVE
   ========================= */
@media (max-width:980px){
  .hero-inner,
  .grid,
  .tiers-grid,
  .portfolio-grid,
  .ai-grid,
  .contact-grid{
    grid-template-columns:1fr;
  }

  .hero-kpi{
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    gap:2px;
  }

  .hero-kpi span{ text-align:left; }
}

@media (max-width:900px){
  /* Logo más chico en mobile (evita cortes raros en sticky) */
  .brand-logo img{
    width:86px;
    height:86px;
  }

  .burger{ display:flex; }

  /* Menú mobile: panel debajo del header usando el offset real */
  .nav-wrap{
    position:fixed;
    top: calc(var(--header-offset, 92px) - 14px);
    left:50%;
    transform:translateX(-50%);
    width:min(1120px,92%);
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:12px;
    display:none;
    box-shadow:0 18px 40px rgba(15,23,42,.12);
  }

  body.nav-open .nav-wrap{ display:block; }

  .nav{
    display:flex;
    flex-direction:column;
    gap:6px;
  }

  .nav a{
    padding:10px 12px;
    border-radius:14px;
  }
}

/* TIERS: cards estiradas y CTA al fondo sin superposición */
.tiers-grid{ align-items:stretch; }

#tiers .tier{
  height:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
}

#tiers .tier ul{ margin:6px 0 0; }
#tiers .tier p.small{ margin:0; }

#tiers .tier .btn{
  margin-top:auto;
  align-self:flex-start;
}

/* AI: más aire antes del bloque de guardrails */
.ai-grid .card .ai-meta{ margin-top:18px; }
