/* ============================================================
   EEFB Home — Mobile Responsive (≤ 768px)
   Loaded after home.css. Desktop styles remain untouched
   above 768px. All rules below are mobile-only.
   ============================================================ */

/* ---------- Hamburger + Drawer — visible only on mobile ---------- */
.hp-hamburger { display: none; }
.hp-drawer, .hp-drawer-scrim { display: none; }
.hp-microbar-short { display: none; }

@media (max-width: 768px) {

  /* ============================================================
     GLOBAL
     ============================================================ */
  .mk-container { padding: 0 20px; }

  /* ============================================================
     HEADER — microbar simplified, hamburger menu
     ============================================================ */
  .hp-microbar-full { display: none; }
  .hp-microbar-short { display: inline-flex; }
  .hp-microbar-inner { padding: 7px 20px; font-size: 10.5px; }
  .hp-microbar-msg { gap: 8px; }

  .hp-nav-inner {
    padding: 14px 20px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .hp-nav-links { display: none; }
  .hp-nav-access { display: none; }
  .hp-cta-primary {
    padding: 9px 12px; font-size: 12px;
  }

  /* Brand: shrink + hide sub-line/divider */
  .hp-brand-sub { display: none; }
  .hp-brand-divider { display: none; }
  .hp-brand-name { font-size: 20px !important; }
  .hp-brand-mark { width: 22px !important; height: 22px !important; }
  .hp-brand { gap: 10px; }

  /* Hamburger button */
  .hp-hamburger {
    display: inline-flex; flex-direction: column;
    justify-content: center; align-items: center; gap: 4px;
    width: 38px; height: 38px;
    background: transparent; border: 1px solid var(--line-300);
    border-radius: 8px; cursor: pointer;
    transition: background .15s var(--ease-standard), border-color .15s var(--ease-standard);
    padding: 0;
  }
  .hp-hamburger:hover { background: rgba(217,119,87,0.06); border-color: var(--terracotta-300); }
  .hp-hamburger span {
    display: block; width: 16px; height: 1.5px;
    background: var(--ink-800); border-radius: 1px;
    transition: transform .22s var(--ease-standard), opacity .15s var(--ease-standard);
  }
  .hp-hamburger.is-open { border-color: var(--terracotta-500); background: var(--terracotta-050); }
  .hp-hamburger.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); background: var(--terracotta-700); }
  .hp-hamburger.is-open span:nth-child(2) { opacity: 0; }
  .hp-hamburger.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); background: var(--terracotta-700); }

  /* Drawer */
  .hp-drawer-scrim {
    display: block; position: fixed; inset: 0; z-index: 49;
    background: rgba(20,24,33,0.30); backdrop-filter: blur(2px);
    animation: hp-fade-in .22s var(--ease-standard);
  }
  @keyframes hp-fade-in { from { opacity: 0; } to { opacity: 1; } }

  .hp-drawer {
    display: block;
    position: fixed; top: 0; right: 0;
    height: 100dvh; width: min(86vw, 360px);
    background: var(--bone);
    z-index: 60;
    transform: translateX(100%);
    transition: transform .32s var(--ease-emphasized);
    box-shadow: -20px 0 60px -20px rgba(40,28,14,0.18);
    overflow-y: auto;
  }
  .hp-drawer.is-open { transform: translateX(0); }
  .hp-drawer-inner {
    display: flex; flex-direction: column;
    height: 100%;
    padding: 84px 28px 32px;
  }
  .hp-drawer-links {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column;
    border-top: 1px solid var(--line-200);
  }
  .hp-drawer-links li { border-bottom: 1px solid var(--line-200); }
  .hp-drawer-links a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 4px;
    font-family: var(--font-serif); font-size: 22px; font-weight: 400;
    letter-spacing: -0.015em; color: var(--ink-900);
    text-decoration: none;
    transition: color .15s var(--ease-standard), padding-left .2s var(--ease-standard);
  }
  .hp-drawer-links a svg { color: var(--ink-400); transition: transform .2s var(--ease-standard), color .15s var(--ease-standard); }
  .hp-drawer-links a:hover, .hp-drawer-links a.active {
    color: var(--terracotta-700); padding-left: 8px;
  }
  .hp-drawer-links a:hover svg, .hp-drawer-links a.active svg {
    color: var(--terracotta-500); transform: translateX(4px);
  }
  .hp-drawer-cta {
    margin-top: 28px;
    display: flex; flex-direction: column; gap: 14px;
  }
  .hp-drawer-cta .mk-btn-primary { padding: 14px 20px; font-size: 14px; }
  .hp-drawer-access {
    text-align: center;
    font-family: var(--font-sans); font-size: 13px; font-weight: 500;
    color: var(--ink-600); text-decoration: none; padding: 8px;
    letter-spacing: 0;
  }
  .hp-drawer-access:hover { color: var(--terracotta-700); }
  .hp-drawer-foot {
    margin-top: auto; padding-top: 24px;
    border-top: 1px solid var(--line-200);
    font-family: var(--font-mono); font-size: 10.5px;
    letter-spacing: 0.04em; color: var(--ink-500);
    line-height: 1.5;
  }

  /* ============================================================
     HERO
     ============================================================ */
  .mk-hero { padding: 44px 0 56px; }
  .mk-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .mk-hero-title { font-size: 38px; line-height: 1.06; letter-spacing: -0.022em; margin: 14px 0 18px; }
  .mk-hero-lead { font-size: 16px; line-height: 1.55; }
  .mk-hero-actions {
    flex-direction: column; align-items: stretch;
    gap: 12px; margin-top: 26px;
  }
  .mk-hero-actions .mk-btn-primary {
    width: 100%; justify-content: center;
    padding: 15px 20px; font-size: 14px;
  }
  .mk-hero-actions .mk-btn-link {
    justify-content: center;
    padding: 12px 0;
  }
  .mk-hero-meta {
    flex-direction: row; gap: 14px;
    margin-top: 36px; padding-top: 22px;
    flex-wrap: wrap;
  }
  .mk-hero-meta > div { flex: 1 1 calc(33% - 14px); min-width: 80px; }
  .mk-hero-meta strong { font-size: 26px; }
  .mk-hero-meta span { font-size: 11px; }

  /* Estimator */
  .mk-estimator-head { padding: 18px 22px 14px; }
  .mk-estimator-head h3 { font-size: 22px; }
  .mk-estimator-body { padding: 18px 22px 22px; gap: 16px; }
  .mk-estimator-result { padding: 14px 16px; }
  .mk-estimator-result .mk-estimator-num { font-size: 34px; }
  .hp-est-pct-n { font-size: 18px; }
  .hp-est-pct-l { font-size: 9px; }
  .hp-est-num-row { gap: 12px; }
  .hp-segmented { grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 3px; }
  .hp-seg { padding: 7px 4px; }
  .hp-seg-l { font-size: 11px; }
  .hp-seg-r { font-size: 9.5px; }
  .mk-range output { font-size: 11px; }

  /* ============================================================
     PROBLEM
     ============================================================ */
  .hp-problem { padding: 64px 0; }
  .hp-problem-grid { grid-template-columns: 1fr; gap: 28px; }
  .hp-problem-title { font-size: 32px; letter-spacing: -0.022em; }
  .hp-problem-row {
    grid-template-columns: 36px 1fr; gap: 14px;
    padding: 22px 0;
  }
  .hp-problem-row h4 { font-size: 18px; line-height: 1.3; margin-bottom: 6px; }
  .hp-problem-row p { font-size: 13.5px; }

  /* ============================================================
     VALUE CHAIN — vertical on mobile
     ============================================================ */
  .hp-chain-section { padding: 64px 0; }
  .hp-chain-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
  .hp-chain-head h2 { font-size: 32px; }
  .hp-chain-head p { font-size: 15px; max-width: 100%; }

  .hp-chain-rail {
    grid-template-columns: 1fr; gap: 0;
    position: relative;
    padding-left: 24px;
  }
  .hp-chain-rail::after {
    content: ""; position: absolute;
    left: 6px; top: 24px; bottom: 24px; right: auto;
    border-top: 0;
    border-left: 1px dashed rgba(250,247,240,0.20);
  }
  .hp-chain-node {
    border-left: 0 !important; border-right: 0 !important;
    padding: 20px 0;
    min-height: auto;
    border-bottom: 1px solid rgba(250,247,240,0.08);
    gap: 10px;
  }
  .hp-chain-node:last-child { border-bottom: 0; }
  .hp-chain-node .marker {
    left: -23px; top: 22px;
    width: 13px; height: 13px;
  }
  .hp-chain-node h4 { font-size: 19px; }
  .hp-chain-node p { font-size: 13.5px; }

  /* ============================================================
     PROFILES — stacked cards w/ vertical phases
     ============================================================ */
  .hp-profiles-section { padding: 64px 0; }
  .hp-profiles-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 32px; }
  .hp-profiles-head h2 { font-size: 34px; line-height: 1.06; }
  .hp-profiles-head p { font-size: 15px; max-width: 100%; }

  .hp-rails {
    border-top: 0;
    display: flex; flex-direction: column; gap: 16px;
    /* Use the page's pattern: convert rails into stacked editorial cards */
  }
  .hp-rail {
    grid-template-columns: 1fr; gap: 18px;
    padding: 24px;
    background: var(--paper);
    border: 1px solid var(--line-200);
    border-radius: 12px;
    border-bottom: 1px solid var(--line-200);
    align-items: stretch;
  }
  .hp-rail:hover {
    background: var(--paper);
    padding-left: 24px;
  }
  .hp-rail:hover .hp-rail-name h3 { color: var(--terracotta-700); }
  .hp-rail-name {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 8px;
    padding-bottom: 18px; border-bottom: 1px solid var(--line-100);
  }
  .hp-rail-name h3 { font-size: 24px; line-height: 1.15; }
  .hp-rail-name .mk-eyebrow { display: none; }
  .hp-rail-name > span:last-child {
    font-family: var(--font-serif) !important;
    font-size: 15px !important;
    color: var(--ink-600) !important;
    line-height: 1.4 !important;
    text-align: left !important;
    max-width: 100% !important;
    margin-top: 2px;
  }
  .hp-rail-phases {
    grid-template-columns: 1fr;
    gap: 10px;
    position: relative;
    padding-left: 18px;
  }
  .hp-rail-phases::before {
    left: 5px; right: auto; top: 14px; bottom: 14px;
    border-top: 0; border-left: 1px dashed var(--line-300);
  }
  .hp-phase {
    padding: 14px 16px 13px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    position: relative;
  }
  .hp-phase::before {
    content: ""; position: absolute;
    left: -19px; top: 22px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--paper);
    border: 1.5px solid var(--terracotta-400);
  }
  .hp-phase-i {
    font-size: 9.5px;
    letter-spacing: 0.14em;
  }
  .hp-phase-name {
    font-size: 15px;
    line-height: 1.3;
    margin: 1px 0 2px;
  }
  .hp-phase-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--ink-500);
    text-transform: lowercase;
    margin: 0;
    text-align: left;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .hp-phase-meta::before {
    content: ""; display: inline-block;
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--terracotta-400);
    flex-shrink: 0;
  }
  .hp-phase-i { font-size: 9.5px; }
  .hp-phase-name { font-size: 13.5px; }
  .hp-phase-meta { font-size: 10px; margin-top: 0; text-align: right; }
  .hp-rail-meta {
    text-align: left;
    display: flex; flex-direction: row; align-items: baseline; gap: 10px;
    padding-top: 14px; border-top: 1px solid var(--line-100);
  }
  .hp-rail-meta strong {
    font-size: 18px; margin-bottom: 0;
    font-style: normal;
  }
  .hp-rail-meta span { font-size: 12px; }
  .hp-rails-foot {
    flex-direction: column; align-items: stretch; gap: 16px;
    margin-top: 28px;
  }
  .hp-rails-foot p { font-size: 14.5px; max-width: 100%; }
  .hp-rails-foot > div {
    flex-direction: column !important; align-items: stretch !important;
    gap: 10px !important;
  }
  .hp-rails-foot .mk-btn-secondary, .hp-rails-foot .mk-btn-link {
    width: 100%; justify-content: center;
  }

  /* ============================================================
     BENEFITS
     ============================================================ */
  .hp-benefits-section { padding: 64px 0; }
  .hp-benefits-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 32px; }
  .hp-benefits-head h2 { font-size: 32px; }
  .hp-benefits-head p { font-size: 15px; max-width: 100%; }
  .hp-benefits-grid { grid-template-columns: 1fr; gap: 14px; }
  .hp-benefit {
    grid-template-columns: 52px 1fr;
    gap: 18px;
    padding: 24px;
  }
  .hp-benefit-num { font-size: 40px; }
  .hp-benefit h3 { font-size: 19px; }
  .hp-benefit p { font-size: 14px; }
  .hp-benefit-meta { font-size: 10.5px; margin-top: 12px; padding-top: 12px; }

  /* ============================================================
     EMOTIONAL
     ============================================================ */
  .hp-emotional-section { padding: 80px 0; }
  .hp-emotional h2 { font-size: 36px; line-height: 1.08; }
  .hp-emotional p { font-size: 16px; }
  .hp-emotional-mark { font-size: 64px; }
  .hp-emotional-sig { font-size: 10.5px; }
  .hp-emotional-sig::before, .hp-emotional-sig::after { width: 24px; }

  /* ============================================================
     STEPS — 6 pasos
     ============================================================ */
  .hp-steps-section { padding: 64px 0; }
  .hp-steps-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 36px; }
  .hp-steps-head h2 { font-size: 34px; }
  .hp-steps-head p { font-size: 15px; max-width: 100%; }
  .hp-steps-grid { grid-template-columns: 1fr; border-radius: 12px; }
  .hp-step6 {
    padding: 26px 22px;
    min-height: auto;
  }
  .hp-step6-num { font-size: 36px; }
  .hp-step6 h4 { font-size: 18px; }
  .hp-step6 p { font-size: 13.5px; }
  .hp-step6-foot { font-size: 10px; padding-top: 12px; }

  /* ============================================================
     FINAL CTA
     ============================================================ */
  .hp-cta-final { padding: 72px 0; }
  .hp-cta-inner h2 { font-size: 38px; line-height: 1.06; }
  .hp-cta-inner p { font-size: 16px; }
  .hp-cta-actions {
    flex-direction: column; align-items: stretch;
    gap: 12px; width: 100%;
  }
  .hp-cta-actions .mk-btn-primary,
  .hp-cta-actions .mk-btn-secondary {
    width: 100%; justify-content: center;
    padding: 15px 20px; font-size: 14px;
  }
  .hp-cta-foot {
    flex-direction: column; gap: 12px;
    align-items: flex-start; padding: 20px 0 0;
    font-size: 11px;
  }

  /* ============================================================
     FOOTER
     ============================================================ */
  .mk-footer { padding: 56px 0 24px; }
  .mk-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
    padding-bottom: 36px;
  }
  .mk-footer-brand { grid-column: 1 / -1; }
  .mk-footer-col h4 { font-size: 11px; margin-bottom: 10px; }
  .mk-footer-col a { font-size: 13px; }

  .hp-footer-fields { max-width: 100%; }
  .hp-footer-fields li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }
  .hp-footer-field-l { font-size: 10px; }
  .hp-footer-field-r { font-size: 11px; }

  .hp-footer-tag { font-size: 17px; max-width: 100%; }
  .mk-footer-base {
    flex-direction: column; align-items: flex-start; gap: 8px;
    font-size: 11px; padding-top: 18px;
  }
}

/* ---------- Smaller phones (≤ 380px) ---------- */
@media (max-width: 380px) {
  .mk-hero-title { font-size: 32px; }
  .hp-problem-title, .hp-chain-head h2, .hp-benefits-head h2 { font-size: 28px; }
  .hp-profiles-head h2, .hp-steps-head h2 { font-size: 30px; }
  .hp-emotional h2, .hp-cta-inner h2 { font-size: 32px; }
  .mk-hero-meta strong { font-size: 22px; }
  .hp-segmented { grid-template-columns: repeat(2, 1fr); }
  .hp-brand-name { font-size: 18px !important; }
}
