/* Alapuerta — Página B2B de empaque plegadizo (/cajas-plegadizas/) · oct 2026 */
.ape{font-family:var(--ap-font);color:var(--ap-text);}
.ape *{box-sizing:border-box;}
.ape-wrap{max-width:var(--ap-container);margin:0 auto;padding:0 24px;}
.ape-sec{padding:72px 0;border-bottom:1px solid var(--ap-border);background:var(--ap-surface);}
.ape-sec--raised{background:var(--ap-gray-50);}
.ape-label{font-family:var(--ap-mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--ap-text-muted);font-weight:500;margin-bottom:14px;}
.ape-label::before{content:"";display:inline-block;width:18px;height:1px;background:var(--ap-accent);vertical-align:middle;margin-right:10px;}
.ape-h1{font-size:clamp(34px,4.6vw,58px);line-height:1.04;letter-spacing:-.03em;font-weight:780;margin:0 0 20px;}
.ape-h2{font-size:clamp(26px,3vw,38px);line-height:1.08;letter-spacing:-.02em;font-weight:750;margin:0 0 28px;max-width:820px;}
.ape h3{font-size:18px;font-weight:700;letter-spacing:-.01em;margin:0 0 8px;line-height:1.2;}
.ape-lead{font-size:18px;line-height:1.6;color:var(--ap-text-secondary);max-width:640px;margin:0 0 28px;}
.ape-p{font-size:16.5px;line-height:1.65;color:var(--ap-text-secondary);max-width:760px;margin:-8px 0 24px;}
.ape-small{font-size:13px;color:var(--ap-text-muted);margin:14px 0 0;line-height:1.5;}
.ape-small a{color:inherit;text-decoration:underline;text-decoration-color:var(--ap-accent);text-underline-offset:3px;}
.ape-note{font-family:var(--ap-mono);font-size:12px;color:var(--ap-text-muted);margin:18px 0 0;}
.ape-mono{font-family:var(--ap-mono);}

/* Botones */
.ape-ctas{display:flex;flex-wrap:wrap;gap:12px;}
.ape-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 22px;border-radius:6px;font-weight:600;font-size:15px;text-decoration:none!important;border:1px solid transparent;cursor:pointer;transition:background var(--ap-duration) var(--ap-ease),border-color var(--ap-duration) var(--ap-ease),color var(--ap-duration) var(--ap-ease);font-family:var(--ap-font);}
.ape-btn--accent{background:var(--ap-accent);border-color:var(--ap-accent);color:#000!important;}
.ape-btn--accent:hover{background:var(--ap-accent-hover);border-color:var(--ap-accent-hover);color:#000!important;}
.ape-btn--ghost{background:#fff;border-color:var(--ap-border-strong);color:#000!important;}
.ape-btn--ghost:hover{border-color:#000;}
.ape-btn--ghost-dark{background:transparent;border-color:rgba(255,255,255,.3);color:#fff!important;}
.ape-btn--ghost-dark:hover{border-color:var(--ap-accent);color:var(--ap-accent)!important;}
.ape-btn--block{width:100%;margin-top:8px;}
.ape-btn[disabled]{opacity:.6;cursor:default;}

/* Hero */
.ape-hero{padding:72px 0 64px;border-bottom:1px solid var(--ap-border);background:#fff;}
.ape-hero__grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:56px;align-items:center;}
.ape-stats{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--ap-border);border-radius:8px;overflow:hidden;}
.ape-stats li{padding:24px 20px;border-right:1px solid var(--ap-border);border-bottom:1px solid var(--ap-border);}
.ape-stats li:nth-child(2n){border-right:0;}
.ape-stats li:nth-last-child(-n+2){border-bottom:0;}
.ape-stats strong{display:block;font-size:22px;letter-spacing:-.02em;font-weight:750;margin-bottom:6px;}
.ape-stats strong::after{content:"";display:block;width:24px;height:2px;background:var(--ap-accent);margin-top:10px;}
.ape-stats span{font-size:13.5px;color:var(--ap-text-secondary);line-height:1.45;}

/* Tarjetas */
.ape-grid{display:grid;gap:16px;}
.ape-grid--3{grid-template-columns:repeat(3,minmax(0,1fr));}
.ape-grid--4{grid-template-columns:repeat(4,minmax(0,1fr));}
.ape-card,.ape-sector{background:#fff;border:1px solid var(--ap-border);border-radius:8px;padding:26px 24px;transition:border-color var(--ap-duration) var(--ap-ease);}
.ape-card:hover,.ape-sector:hover{border-color:var(--ap-border-strong);}
.ape-card p,.ape-sector p{margin:0;font-size:15px;line-height:1.6;color:var(--ap-text-secondary);}
.ape-num{display:inline-block;font-family:var(--ap-mono);font-size:12px;color:#000;background:var(--ap-accent);border-radius:4px;padding:3px 7px;margin-bottom:16px;}
.ape-sec--raised .ape-sector{background:#fff;}
.ape-sector h3::before{content:"";display:block;width:24px;height:2px;background:var(--ap-accent);margin-bottom:14px;}

/* Pasos */
.ape-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid var(--ap-border);border-radius:8px;background:#fff;counter-reset:ape;overflow:hidden;}
.ape-steps li{padding:26px 24px;border-right:1px solid var(--ap-border);border-bottom:1px solid var(--ap-border);counter-increment:ape;}
.ape-steps li:nth-child(3n){border-right:0;}
.ape-steps li:nth-last-child(-n+3){border-bottom:0;}
.ape-steps li::before{content:counter(ape,decimal-leading-zero);display:block;font-family:var(--ap-mono);font-size:12px;color:var(--ap-text-muted);margin-bottom:12px;}
.ape-steps strong{display:block;font-size:17px;margin-bottom:6px;}
.ape-steps span{font-size:14.5px;line-height:1.55;color:var(--ap-text-secondary);}

/* Tabla de mínimos */
.ape-tablewrap{overflow-x:auto;border:1px solid var(--ap-border);border-radius:8px;background:#fff;}
.ape-table{width:100%;border-collapse:collapse;font-size:15px;min-width:560px;}
.ape-table th{text-align:left;font-family:var(--ap-mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--ap-text-muted);font-weight:500;padding:14px 18px;border-bottom:1px solid var(--ap-border);background:var(--ap-gray-50);}
.ape-table td{padding:14px 18px;border-bottom:1px solid var(--ap-border);}
.ape-table tr:last-child td{border-bottom:0;}

/* Formulario */
.ape-form__grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:56px;align-items:start;}
.ape-form__intro{position:sticky;top:24px;}
.ape-calc{border:1px solid var(--ap-border);border-radius:8px;padding:20px;background:var(--ap-gray-50);}
.ape-calc__row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:8px 0;border-bottom:1px dashed var(--ap-border);font-size:14.5px;color:var(--ap-text-secondary);}
.ape-calc__row strong{font-family:var(--ap-mono);font-size:16px;color:#000;}
.ape-calc__bar{height:6px;background:var(--ap-gray-200);border-radius:3px;margin:16px 0 12px;overflow:hidden;}
.ape-calc__bar i{display:block;height:100%;width:0;background:var(--ap-gray-500);transition:width .3s var(--ap-ease);}
.ape-calc.is-ok .ape-calc__bar i{background:var(--ap-ok);}
.ape-calc.is-near .ape-calc__bar i{background:var(--ap-accent);}
.ape-calc.is-low .ape-calc__bar i{background:var(--ap-oferta,#D92D20);}
.ape-calc__msg{margin:0;font-size:14px;line-height:1.5;color:var(--ap-text);}
.ape-form{border:1px solid var(--ap-border);border-radius:8px;padding:28px;background:#fff;}
.ape-form fieldset{border:0;margin:0 0 18px;padding:0;}
.ape-form legend{font-family:var(--ap-mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--ap-text-muted);margin-bottom:12px;padding:0;}
.ape-form label{display:block;font-size:13.5px;font-weight:600;color:var(--ap-text);margin-bottom:12px;}
.ape-form input[type=text],.ape-form input[type=email],.ape-form input[type=tel],.ape-form input[type=number],.ape-form select,.ape-form textarea{display:block;width:100%;margin-top:6px;min-height:46px;padding:10px 12px;border:1px solid var(--ap-border-strong);border-radius:6px;background:#fff;font:400 15px/1.4 var(--ap-font);color:#000;transition:border-color var(--ap-duration) var(--ap-ease),box-shadow var(--ap-duration) var(--ap-ease);}
.ape-form textarea{min-height:88px;resize:vertical;}
.ape-form input:focus,.ape-form select:focus,.ape-form textarea:focus{outline:none;border-color:#000;box-shadow:0 0 0 3px var(--ap-accent-soft);}
.ape-form .is-err{border-color:var(--ap-oferta,#D92D20)!important;}
.ape-f2{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;}
.ape-f3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:0 14px;}
.ape-check{display:flex!important;gap:10px;align-items:flex-start;font-weight:400!important;font-size:14px!important;color:var(--ap-text-secondary)!important;}
.ape-check input{margin-top:3px;width:18px;height:18px;accent-color:#000;flex:none;}
.ape-check.is-err{color:var(--ap-oferta,#D92D20)!important;}
.ape-check a{color:inherit;text-decoration:underline;text-decoration-color:var(--ap-accent);text-underline-offset:3px;}
.ape-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden;}
.ape-result{margin-top:16px;padding:14px 16px;border-radius:6px;font-size:14.5px;line-height:1.5;border:1px solid var(--ap-border);}
.ape-result.is-ok{background:rgba(47,191,113,.1);border-color:rgba(47,191,113,.45);}
.ape-result.is-err{background:rgba(217,45,32,.07);border-color:rgba(217,45,32,.4);color:#8f1d14;}
.ape-result strong{display:block;margin-bottom:4px;}

/* FAQ */
.ape-faq{max-width:900px;}
.ape-q{border-bottom:1px solid var(--ap-border);}
.ape-q:first-of-type{border-top:1px solid var(--ap-border);}
.ape-q summary{list-style:none;cursor:pointer;padding:20px 40px 20px 0;font-weight:650;font-size:17px;position:relative;}
.ape-q summary::-webkit-details-marker{display:none;}
.ape-q summary::after{content:"+";position:absolute;right:4px;top:50%;transform:translateY(-50%);font-family:var(--ap-mono);font-size:20px;color:var(--ap-text-muted);}
.ape-q[open] summary::after{content:"−";color:#000;}
.ape-q p{margin:0 0 20px;font-size:16px;line-height:1.65;color:var(--ap-text-secondary);max-width:780px;}

/* CTA final */
.ape-cta{background:#000;color:#fff;padding:64px 0;}
.ape-cta .ape-h2{color:#fff;margin:0;}
.ape-cta__grid{display:flex;align-items:center;justify-content:space-between;gap:32px;flex-wrap:wrap;}

/* Responsivo */
@media (max-width:1024px){
  .ape-hero__grid,.ape-form__grid{grid-template-columns:1fr;gap:36px;}
  .ape-form__intro{position:static;}
  .ape-grid--3,.ape-grid--4{grid-template-columns:repeat(2,minmax(0,1fr));}
  .ape-steps{grid-template-columns:repeat(2,minmax(0,1fr));}
  .ape-steps li:nth-child(3n){border-right:1px solid var(--ap-border);}
  .ape-steps li:nth-child(2n){border-right:0;}
  .ape-steps li:nth-last-child(-n+3){border-bottom:1px solid var(--ap-border);}
  .ape-steps li:nth-last-child(-n+2){border-bottom:0;}
}
@media (max-width:767px){
  .ape-wrap{padding:0 16px;}
  .ape-sec{padding:52px 0;}
  .ape-hero{padding:44px 0;}
  .ape-lead{font-size:16.5px;}
  .ape-grid--3,.ape-grid--4,.ape-steps{grid-template-columns:1fr;}
  .ape-steps li{border-right:0!important;border-bottom:1px solid var(--ap-border)!important;}
  .ape-steps li:last-child{border-bottom:0!important;}
  .ape-stats strong{font-size:19px;}
  .ape-stats li{padding:18px 14px;}
  .ape-f2{grid-template-columns:1fr;}
  .ape-f3{grid-template-columns:1fr 1fr 1fr;gap:0 8px;}
  .ape-form{padding:20px 16px;}
  .ape-ctas .ape-btn{flex:1 1 100%;}
  .ape-cta{padding:48px 0;}
}
@media (prefers-reduced-motion:reduce){.ape-calc__bar i{transition:none;}}

/* Especificidad sobre .ap-page h1/h2/h3 globales */
.ape .ape-h1{margin:0 0 20px;}
.ape .ape-h2{margin:0 0 28px;}
.ape-cta .ape-h2{margin:0!important;}
.ape h3,.ape .ape-card h3,.ape .ape-sector h3{text-transform:none;letter-spacing:-.01em;font-size:18px;margin:0 0 8px;}
