/* ============================================================
   LeefH2™ Calculator
   Responsive breakpoints + print stylesheet
============================================================ */

/* ============================================================
   LARGE (992px–1200px)
============================================================ */
@media (max-width: 1200px) {
  .container { max-width: 100%; }
  .hero-headline { font-size: clamp(26px, 3.6vw, 38px); }
  .header-title { font-size: 13px; }
}

/* ============================================================
   TABLET (768px–992px)
============================================================ */
@media (max-width: 992px) {
  .hero-section { padding: 56px 0 44px; }
  .hero-headline { font-size: clamp(26px, 5vw, 36px); }
  .how-card { margin-top: 24px; }

  .calc-card { padding: 24px 22px; }
  .card-title { font-size: 20px; }

  .step-line { max-width: 60px; }

  /* Trust strip — 2x2 */
  .trust-item--divider:nth-child(2) { border-right: none; }
  .trust-item { margin-bottom: 8px; }
}

/* ============================================================
   MOBILE (< 768px)
============================================================ */
@media (max-width: 768px) {
  body { font-size: 14px; }

  /* Header */
  .site-header .navbar { height: 60px; }
  .hno-logo-img { height: 34px; }
  .leefh2-logo-img { height: 28px; }
  .header-title { display: none; }

  /* Hero */
  .hero-section {
    padding: 40px 0 32px;
    background-size: 16px 16px;
  }
  .eyebrow { font-size: 10px; }
  .hero-headline {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 16px;
  }
  .hero-sub { font-size: 15px; }

  .hero-badges {
    gap: 10px !important;
  }
  .stat-badge {
    min-width: 0;
    flex: 1 1 calc(50% - 5px);
    padding: 12px 14px;
  }
  .stat-badge__value { font-size: 22px; }
  .stat-badge__value--small { font-size: 14px; }
  .stat-badge__label { font-size: 10px; }
  .stat-badge--dark { flex: 1 1 100%; }

  .scroll-cta { margin-top: 20px; }

  /* Calculator */
  .calculator-area { padding: 40px 0; }
  .calc-card {
    padding: 20px 16px;
    margin-bottom: 18px;
  }
  .card-title { font-size: 18px; }
  .card-subtitle { font-size: 13px; }

  .step-indicator {
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .step-circle { width: 32px; height: 32px; font-size: 13px; }
  .step-label { font-size: 10px; }
  .step-line { max-width: 30px; margin: 0 4px 28px; }
  .step { min-width: 70px; }

  /* Touch targets */
  .form-control, .form-select {
    min-height: 44px;
    font-size: 15px; /* prevent iOS zoom */
  }
  .input-group-text { font-size: 14px; }

  .unit-input-group .btn-step {
    min-height: 44px;
    min-width: 44px;
  }

  /* Engine rows fully stacked */
  .engine-row { padding: 16px; }
  .engine-row__header { margin-bottom: 12px; }

  /* Period toggle */
  .period-toggle {
    display: flex;
    width: 100%;
  }
  .period-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 12px;
  }

  /* Metric cards: 2x3 grid */
  .metric-card { padding: 16px 12px; }
  .metric-value { font-size: 22px; }
  .metric-icon { font-size: 18px; margin-bottom: 8px; }
  .metric-label { font-size: 10px; }
  .metric-sub { font-size: 10px; }

  /* Charts shorter */
  .chart-wrap--bar { height: 240px; }
  .chart-wrap--line { height: 200px; }

  .chart-tabs .nav-link {
    font-size: 12px;
    padding: 8px 12px;
  }
  .chart-tabs .nav-link i { display: none; }

  /* Table */
  .breakdown-table { min-width: 600px; font-size: 12px; }
  .breakdown-table thead th { padding: 10px 10px; font-size: 10px; }
  .breakdown-table tbody td { padding: 10px 10px; }

  /* Environment cards */
  .env-card { padding: 14px 10px; }
  .env-pct { font-size: 22px; }

  /* Export buttons stacked */
  .export-buttons { flex-direction: column; }
  .export-buttons .btn { width: 100%; }

  /* Trust strip */
  .trust-strip { padding: 28px 0; }
  .trust-item { padding: 8px; }
  .trust-item--divider { border-right: none; }
  .trust-icon { width: 44px; height: 44px; font-size: 18px; }
  .trust-title { font-size: 12px; }
  .trust-sub { font-size: 11px; }

  /* Footer */
  .site-footer { padding: 36px 0 0; text-align: center; }
  .footer-hno-logo,
  .footer-leefh2-logo { margin-left: auto; margin-right: auto; }
  .footer-links { justify-content: center; }
  .footer-list li i { width: auto; margin-right: 6px; }
  .footer-bottom { padding: 14px 0; font-size: 10px; }
}

/* Extra small phones */
@media (max-width: 480px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .calc-card { padding: 18px 14px; }
  .stat-badge { flex: 1 1 100%; }
  .metric-value { font-size: 20px; }
}

/* ============================================================
   PRINT STYLESHEET
============================================================ */
@media print {
  @page {
    size: landscape;
    margin: 2cm;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  /* Hide non-essential UI */
  .site-header,
  .hero-section,
  .step-indicator,
  .calc-card--green,
  .calc-card--blue,
  .period-toggle,
  .chart-tabs,
  .chart-content,
  .export-buttons,
  .trust-strip,
  .site-footer,
  .toast-container,
  .scroll-cta,
  .info-alert,
  .brand-slider,
  .help-icon {
    display: none !important;
  }

  /* Show print header */
  .print-only { display: block !important; }
  .print-header {
    text-align: center;
    margin-bottom: 24pt;
  }
  .print-header h1 {
    font-size: 18pt;
    font-weight: 800;
    color: #1E7A2E;
    margin-bottom: 8pt;
  }
  .print-header .print-sub {
    font-size: 11pt;
    color: #333333;
    margin-bottom: 4pt;
  }
  .print-header .print-meta {
    font-size: 10pt;
    color: #666666;
  }
  .print-header hr {
    border: none;
    border-top: 1px solid #CCCCCC;
    margin: 12pt 0;
  }

  .calculator-area {
    padding: 0 !important;
    background: #FFFFFF !important;
  }

  .calc-card--orange {
    border: 1px solid #CCCCCC !important;
    border-left: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    page-break-inside: auto;
  }

  .card-eyebrow, .card-title, .card-subtitle { display: none; }

  /* Metric cards as print rows */
  .metrics-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8pt !important;
    margin: 0 0 16pt !important;
  }
  .metrics-row > [class*="col-"] {
    flex: 1 1 18% !important;
    max-width: none !important;
    padding: 4pt !important;
  }
  .metric-card {
    background: #F8F8F8 !important;
    color: #000000 !important;
    border: 1px solid #CCCCCC !important;
    padding: 12pt 8pt !important;
  }
  .metric-card * { color: #000000 !important; }
  .metric-card--success .metric-value,
  .metric-card--success .metric-label,
  .metric-card--success .metric-sub,
  .metric-card--success .metric-icon { color: #1E7A2E !important; }
  .metric-value { font-size: 16pt !important; }
  .metric-label { font-size: 9pt !important; }
  .metric-sub { font-size: 8pt !important; }

  /* Breakdown table */
  .breakdown-table {
    width: 100% !important;
    font-size: 10pt !important;
    page-break-inside: avoid;
  }
  .breakdown-table thead th {
    background: #F0F0F0 !important;
    color: #000000 !important;
    border: 1px solid #CCCCCC !important;
  }
  .breakdown-table tbody td {
    border: 1px solid #CCCCCC !important;
    color: #000000 !important;
  }
  .breakdown-table .usd-cell { color: #1E7A2E !important; }
  .breakdown-table tfoot td {
    background: #E8E8E8 !important;
    color: #000000 !important;
  }
  .breakdown-table tfoot .usd-cell { color: #1E7A2E !important; }

  .pm-badge {
    background: #FFFFFF !important;
    border: 1px solid #1E7A2E !important;
    color: #1E7A2E !important;
  }

  /* Environmental cards */
  .env-row {
    display: flex !important;
    gap: 8pt !important;
    margin: 16pt 0 !important;
    page-break-inside: avoid;
  }
  .env-card {
    background: #FFFFFF !important;
    border: 1px solid #CCCCCC !important;
    padding: 8pt !important;
  }

  .subsection-title {
    font-size: 11pt !important;
    color: #000000 !important;
    margin-top: 14pt;
  }

  .section-divider {
    background: #CCCCCC !important;
    margin: 12pt 0 !important;
  }

  .disclaimer {
    font-size: 8pt !important;
    color: #333333 !important;
    border-top: 1px solid #CCCCCC !important;
    margin-top: 16pt !important;
    page-break-inside: avoid;
  }

  /* No background images */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
