/* The approved mobile layout stays in styles.css. Adapt to space, not device names. */

/* Small tablets, including portrait: use the available width and comfortable dialogs. */
@media (min-width: 600px) {
  :root { --page-width: 1280px; --page-gutter: clamp(24px, 4vw, 48px); }
  html { scroll-padding-top: 100px; }
  main { width: 100%; max-width: var(--page-width); margin-inline: auto; padding-inline: var(--page-gutter); }
  .header-inner { max-width: calc(var(--page-width) + 16px); min-height: 76px; padding-inline: var(--page-gutter); gap: 16px; flex-wrap: wrap; }
  .brand { flex-shrink: 0; }
  .desktop-nav { display: flex; margin-left: auto; align-items: center; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  .desktop-nav > a { display: none; }
  .desktop-nav .btn { min-height: 46px; padding-inline: 20px; }
  .menu-toggle { display: inline-flex; }
  .hero { padding-block: 32px 36px; }
  .hero-copy { padding: 0; }
  .hero-copy h1 { max-width: 650px; font-size: clamp(2.5rem, 5.3vw, 3.25rem); }
  .hero-copy .eyebrow { font-size: .8125rem; margin-bottom: 16px; }
  .lead { font-size: 1.0625rem; line-height: 1.6; max-width: 600px; }
  .hero-photo { border-radius: 12px; overflow: hidden; }
  .hero-offer { padding: 24px 0 0; max-width: 390px; }
  .hero-offer .btn { min-height: 50px; font-size: 1rem; }
  .price-from { font-size: 2rem; }
  .price-caption { margin-bottom: 16px; }
  .section { padding: 32px 0; min-width: 0; }
  .section h2 { font-size: 1.9rem; }
  .section-intro { margin-bottom: 22px; }
  .report-card { padding: 20px; border-radius: 10px; }
  .report-heading { margin-bottom: 16px; }
  .report-heading strong { font-size: 1.05rem; }
  .finding { font-size: .9375rem; margin-bottom: 14px; }
  .warning-label { margin-top: 11px; }
  .report-card .btn { min-height: 46px; }
  .video-preview { margin-bottom: 14px; }
  .categories { gap: 14px; }
  .category { gap: 11px; }
  .category [data-photo] { border-radius: 8px; }
  .category strong { font-size: .9375rem; min-height: 0; }
  .category-note { margin-top: 20px; line-height: 1.6; }
  .inspection-list summary { min-height: 56px; font-size: 1rem; }
  .process-section { border: 0; padding-top: 14px; }
  .process-panel { padding: 30px 22px; border-radius: 12px; }
  .process-panel h2 { font-size: 1.75rem; }
  .steps { margin-top: 26px; gap: 24px; }
  .steps li > span { width: 40px; height: 40px; margin-bottom: 13px; }
  .steps li:not(:last-child)::after { top: 20px; }
  .steps p { font-size: .9375rem; line-height: 1.5; }
  .faq-section { border: 0; padding-top: 14px; }
  .faq-list { gap: 10px; }
  .faq-list summary { font-size: 1rem; min-height: 56px; padding: 14px 16px; }
  .faq-list details > p { padding: 0 16px 16px; }
  .site-footer { padding: 30px var(--page-gutter) 122px; }
  .footer-inner, .prototype-note { max-width: calc(var(--page-width) - var(--page-gutter) * 2); }
  .footer-brand { font-size: 1.4rem; }
  .footer-links { gap: 22px; }
  .footer-links button { font-size: .875rem; min-height: 44px; }
  .sticky-booking { padding: 12px var(--page-gutter) calc(12px + env(safe-area-inset-bottom)); }
  .sticky-inner { max-width: calc(var(--page-width) - var(--page-gutter) * 2); }
  .sticky-price { font-size: 1.25rem; }
  .sticky-inner .btn { flex: 0 1 300px; min-height: 48px; font-size: 1rem; }

  /* Headers and footers belong to their dialog, not the whole desktop viewport. */
  .booking-dialog, .report-dialog {
    width: min(620px, calc(100vw - 48px));
    height: auto;
    max-width: none;
    max-height: calc(100dvh - 48px);
    margin: auto;
    border-radius: 16px;
    overflow: hidden;
  }
  .booking-dialog[open], .report-dialog[open] { display: flex; flex-direction: column; }
  .booking-header, .report-dialog > .dialog-top { position: relative; flex: 0 0 auto; padding: 14px 20px; }
  #booking-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; width: 100%; max-width: none; margin: 0; padding: 28px; }
  .booking-bottom { position: relative; flex: 0 0 auto; padding: 16px 20px; }
  .booking-progress { margin-bottom: 30px; gap: 16px; }
  .booking-progress li { font-size: .875rem; gap: 10px; }
  .booking-progress li:not(:last-child)::after { width: 24px; }
  .booking-progress span { width: 34px; height: 34px; }
  .booking-intro h1 { font-size: 1.95rem; }
  .booking-intro p { font-size: 1rem; }
  .field-row { gap: 18px; }
  .type-options { gap: 12px; }
  .type-option span { font-size: .875rem; padding-block: 15px; }
  .type-option input:checked + span { padding-block: 14px; }
  .booking-summary { font-size: .875rem; }
  .quote-card { padding: 24px; }
  .quote-price { font-size: 3.4rem; }
  .quote-includes { font-size: .9375rem; }
  .report-dialog { width: min(800px, calc(100vw - 48px)); }
  .full-report-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; width: 100%; max-width: none; margin: 0; padding: 26px 28px 30px; }
  .report-cta { position: relative; flex: 0 0 auto; padding: 14px 28px; }
  .report-tabs button { font-size: .9375rem; min-height: 48px; }
  .media-dialog, .info-dialog { width: min(680px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); }
  .dialog-top { padding: 20px 24px; }
  #media-content, #info-content { padding: 24px; }
}

/* Full-size tablets, portrait and landscape: two columns with touch navigation. */
@media (min-width: 768px) {
  .hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); grid-template-rows: auto auto; column-gap: 30px; padding-block: 42px 46px; align-items: start; }
  .hero-copy { grid-column: 1; grid-row: 1; }
  .hero-copy h1 { font-size: clamp(2.15rem, 3.9vw, 3rem); }
  .hero-photo { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .hero-offer { grid-column: 1; grid-row: 2; padding-top: 8px; width: 100%; }
  .hero-copy .lead { font-size: 1rem; margin-bottom: 16px; }
  .hero-offer .btn { font-size: .9375rem; padding-inline: 12px; gap: 14px; }
  .content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 30px; }
  .report-section { grid-column: 1; grid-row: 1 / span 2; }
  .categories-section { grid-column: 2; grid-row: 1; }
  .inspection-section { grid-column: 2; grid-row: 2; }
  .section h2 { font-size: clamp(1.65rem, 2.8vw, 2.1rem); }
  .categories { gap: 8px; }
  .category strong { font-size: .875rem; line-height: 1.4; }
  .report-card { padding: 16px; }
  .inspection-list summary { font-size: .9375rem; gap: 11px; }
  .inspection-list details > p { padding-left: 4px; }
  .process-section, .faq-section { grid-column: 1 / -1; }
  .process-section { padding-block: 20px 36px; }
  .process-panel { padding: 34px; }
  .process-panel h2 { font-size: 1.9rem; }
  .steps { max-width: 850px; margin-inline: auto; gap: 42px; }
  .steps li:not(:last-child)::after { left: 70%; right: -40%; }
  .steps p { font-size: 1rem; }
  .faq-section { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 30px; padding-block: 12px 48px; align-items: start; }
  .faq-section h2 { padding-top: 14px; }
  .faq-list { margin: 0; }
}

/* Desktop: full navigation, a larger hero and grouped inspection controls. */
@media (min-width: 1100px) {
  .header-inner { min-height: 86px; gap: 28px; }
  .header-inner > .brand { font-size: 1.95rem; }
  .desktop-nav { gap: clamp(16px, 1.8vw, 28px); font-size: .875rem; }
  .desktop-nav > a { display: flex; align-items: center; min-height: 44px; white-space: nowrap; }
  .desktop-nav > a:hover { color: var(--blue); }
  .desktop-nav .btn { white-space: nowrap; font-size: .9375rem; }
  .menu-toggle { display: none; }
  .hero { padding-block: 64px 62px; column-gap: 52px; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
  .hero-copy h1 { font-size: clamp(3rem, 4.1vw, 3.75rem); line-height: 1.06; margin-bottom: 22px; }
  .hero-copy .eyebrow { margin-bottom: 20px; }
  .hero-copy .lead { font-size: 1.125rem; line-height: 1.65; }
  .hero-photo { border-radius: 16px; }
  .hero-offer { max-width: 380px; padding-top: 14px; }
  .hero-offer .btn { min-height: 54px; font-size: 1rem; }
  .price-from { font-size: 2.2rem; }
  .content-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); column-gap: 48px; }
  .section { padding-block: 36px; }
  .section h2 { font-size: 2.1rem; }
  .section-intro { font-size: 1.0625rem; }
  .report-card { padding: 24px; }
  .report-heading { margin-bottom: 18px; }
  .report-heading strong { font-size: 1.125rem; }
  .report-heading > div > span { font-size: .8125rem; }
  .report-card .finding { font-size: 1rem; }
  .categories { gap: 16px; }
  .category { gap: 12px; }
  .category strong { font-size: 1rem; }
  .inspection-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 20px; }
  .inspection-list details { align-self: start; }
  .inspection-list details:last-child { border-bottom: 0; }
  .inspection-list summary { min-height: 68px; padding-block: 14px; gap: 10px; }
  .inspection-list details > p { font-size: .875rem; padding-right: 10px; }
  .line-icon { width: 24px; height: 24px; flex-basis: 24px; }
  .process-section { padding-block: 28px 48px; }
  .process-panel { padding: 40px; }
  .process-panel h2 { font-size: 2rem; }
  .steps { margin-top: 30px; }
  .faq-section { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); column-gap: 70px; padding-block: 0 64px; }
  .faq-section h2 { font-size: 2.5rem; }
  .site-footer { padding-top: 36px; }
  .prototype-note { text-align: left; margin-top: 20px; }

  /* Keep the price alongside the entered address, before personal details. */
  .booking-dialog { width: 660px; }
  .booking-dialog[data-step="1"] { width: min(960px, calc(100vw - 80px)); }
  #booking-content { padding: 32px; }
  .booking-dialog[data-step="1"] .booking-progress { max-width: 520px; }
  .booking-dialog[data-step="1"] .booking-intro { max-width: 650px; margin-bottom: 28px; }
  #address-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); grid-template-rows: auto auto 1fr; column-gap: 32px; align-items: start; }
  #address-form > .field { grid-column: 1; grid-row: 1; }
  #address-form > .field-row { grid-column: 1; grid-row: 2; }
  #address-form > .text-button { grid-column: 1; grid-row: 3; text-align: left; justify-self: start; }
  #quote-area { grid-column: 2; grid-row: 1 / span 3; min-width: 0; }
  #quote-area > .quote-card, #quote-area > .information-strip:first-child { margin-top: 0; }
  .booking-intro h1 { font-size: 2.15rem; }
  .booking-bottom { font-size: .875rem; }
  .report-dialog { width: min(900px, calc(100vw - 80px)); }
  .full-report-body { padding: 28px 32px 34px; }
  #report-synthesis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  #report-synthesis > h3, #report-synthesis > p { grid-column: 1 / -1; margin-bottom: 0; }
  #report-synthesis > .report-item { margin-top: 0; }
  .report-item .photo-btn { max-width: none; }
  .report-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
  .report-cta { padding-inline: 32px; }
  .report-cta .btn { max-width: 380px; margin-left: auto; margin-right: 0; }
}

/* Large monitors remain readable instead of stretching text across the screen. */
@media (min-width: 1500px) {
  :root { --page-width: 1400px; }
  .hero { padding-block: 76px 72px; column-gap: 64px; }
  .hero-copy h1 { font-size: 4rem; }
  .content-grid { column-gap: 64px; }
  .section h2 { font-size: 2.25rem; }
}

/* Landscape tablets and short laptop windows retain reachable dialog controls. */
@media (min-width: 600px) and (max-height: 600px) {
  .booking-dialog, .report-dialog, .media-dialog, .info-dialog { max-height: calc(100dvh - 24px); }
  .booking-header, .report-dialog > .dialog-top { padding-block: 6px; }
  #booking-content, .full-report-body { padding-block: 18px; }
  .booking-progress { margin-bottom: 18px; }
  .booking-bottom, .report-cta { padding-block: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
