/* Responsive marketing layout. Shared theme metrics live in marketing-polish.css. */

@media (max-width: 768px) {
  html { scroll-padding-top: 96px; }
  .landing-page > .wrap { padding-inline: 16px; }
  .landing-page #main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 20px; }
  .site-header .main-nav {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 6px;
    height: 64px;
    min-height: 64px;
    padding: 0 14px;
  }
  .site-header .brand img { width: 34px; height: 34px; }
  .site-header .brand-wordmark { display: none; }
  .site-header .nav-links {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    width: max-content;
    height: 48px;
    min-height: 48px;
    padding: 4px 8px 0;
    gap: 4px;
    font-size: 13px;
    overflow: visible;
  }
  .site-header .nav-links > a,
  .site-header .nav-links .nav-interview {
    min-height: 42px;
    padding: 14px 8px 4px;
  }
  .site-header .theme-toggle {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .site-header .nav-links .nav-interview-label > .nav-exclusive-badge {
    top: -7px;
    right: -4px;
    padding: 1.5px 5px;
    font-size: 8px;
    gap: 0;
    translate: 0 -7px;
    transform: rotate(-2deg);
    transform-origin: center;
    animation-name: exclusiveBadgeGlow;
  }

  .landing-page .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-block: 36px 0;
  }
  .hero .hero-development-badge { gap: 7px; padding: 6px 12px 6px 8px; font-size: 10px; }
  .landing-page .hero .hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 340px;
    margin: 28px auto 0;
  }
  .landing-page .hero .hero-actions .hero-launch-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }
  .landing-page :is(h1, h2, h3), .hero-stack .job-info strong {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
  .hero-art {
    width: 100%;
    max-width: 520px;
    margin: 64px auto 0;
    padding: 24px 0 0;
    border-top: 1px solid rgba(148, 163, 184, .12);
    overflow: visible;
    pointer-events: none;
    animation: none;
    transform: none;
  }
  .hero-art .sheet-annotation { padding-left: 4px; font-size: 10px; }
  .landing-page .hero-stack {
    flex-direction: column;
    gap: 10px;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    overflow: visible;
    scroll-behavior: auto;
    scroll-snap-type: none;
    touch-action: auto;
    pointer-events: none;
    cursor: default;
    animation: none;
    transform: none;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .landing-page .hero-stack .hero-card {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    animation: none !important;
    transform: none;
    will-change: auto;
  }
  .landing-page .hero-stack .hero-card-offer {
    background: #172B56;
    border-radius: 16px;
  }
  .landing-page .hero-stack .hero-card-offer .ticket-main {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 16px 18px 12px;
  }
  .hero-card-offer .ticket-main > div:first-child { display: contents; }
  .hero-card-offer .ticket-main .mono {
    grid-column: 1;
    grid-row: 1;
    font-size: 10px;
    letter-spacing: .8px;
  }
  .hero-card-offer .ticket-main > .stamp {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .landing-page .hero-stack .hero-card-offer .stamp.big > span {
    padding: 3px 7px;
    font-size: 12px;
    letter-spacing: 1px;
  }
  .landing-page .hero-stack .hero-card-offer h3 {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    margin: 0;
    font-size: 18.5px;
    line-height: 1.2;
  }
  .hero-card-offer h3 br { display: none; }
  .hero-stack .hero-card-offer .hero-offer-description {
    grid-row: 3;
    margin: 0;
    font-size: 13px;
  }
  .landing-page .hero-stack .hero-card-offer .ticket-bottom { padding: 11px 18px 16px; gap: 10px; }
  .landing-page .hero-stack .hero-card-offer .hero-offer-action { min-height: 38px; padding: 8px 10px; font-size: 13px; }
  .landing-page .hero-stack .paper-job {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    margin: 0;
    border-radius: 13px;
  }
  .hero-stack .paper-job .company-tile {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-self: center;
    font-size: 16px;
  }
  .hero-stack .company-spotify { background: #DDF3E6; color: #17663D; }
  .hero-stack .company-revolut { background: #E7EBF3; color: #394962; }
  .hero-stack .paper-job .job-info { flex: 1 1 0; min-width: 0; }
  .hero-stack .paper-job strong { font-size: 14px; line-height: 1.25; }
  .hero-stack .paper-job small { font-size: 12px; line-height: 1.4; }
  .hero-stack .paper-job .stamp {
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
  }
  .hero-stack .paper-job .stamp > span {
    font-size: 10px;
    padding: 3px 7px;
    letter-spacing: .4px;
  }
  .landing-page .hero-art :is(.hero-desktop-only, .hero-preview-controls) { display: none; }
  .landing-page .hero-stack > .hero-mobile-only { display: flex; }

  #features { padding: 0; }
  .homepage-features .overview-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }
  .homepage-features .overview-heading > div { flex: 0 1 auto; }
  .homepage-features #overview-title { margin: 8px 0 0; font-size: 32px; }
  .homepage-features .feature-demo-badge {
    margin-left: 0;
    font-size: 9px;
    padding: 7px 11px;
  }
  .homepage-features .bento-grid { gap: 20px; }
  #features .feature-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 24px 18px 0;
    margin: 0;
  }
  .feature-card .feature-copy { margin-bottom: 0; }
  #features .feature-copy h2,
  #interview-prep .practice-copy h2,
  #launch .launch-copy h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.15; }
  #features .feature-copy h2 { margin-top: 10px; }
  #features .feature-copy > p,
  #interview-prep .practice-copy > p,
  #launch .launch-copy > p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.45; }
  #features .feature-checks,
  #launch .launch-perks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
  }
  #features .feature-checks li,
  #launch .launch-perks li {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    font-size: 12px;
    padding: 5px 10px;
    line-height: 1.3;
  }

  .landing-page .practice-feature { padding: 24px 18px; margin: 0; }
  .practice-feature .practice-topline {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
  }
  .practice-topline > .mono {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: .55px;
  }
  .practice-topline > .app-exclusive-badge {
    flex: 0 0 auto;
    margin: 0;
    font-size: 10px;
    padding: 5px 8px;
  }
  .practice-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'title' 'intro' 'features' 'preview' 'action';
    gap: 0;
  }
  .practice-copy { display: contents; }
  .practice-copy h2 { grid-area: title; }
  .practice-copy > p { grid-area: intro; }
  .practice-callouts { grid-area: features; margin: 0 0 12px; gap: 10px; }
  .practice-callouts li { gap: 10px; }
  .practice-callouts .practice-icon { flex-basis: 32px; width: 32px; height: 32px; }
  .practice-callouts strong { font-size: 15px; line-height: 1.3; }
  .practice-callouts li div > span { margin-top: 2px; font-size: 13px; line-height: 1.4; }
  .practice-cta { grid-area: action; width: 100%; min-height: 44px; margin-top: 12px; }
  .practice-feature .practice-preview { grid-area: preview; padding: 0; border: 0; background: none; }
  .practice-feature .interviewer-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-bottom: 10px;
  }
  .practice-feature .interviewer-choice {
    flex-direction: column;
    min-width: 0;
    min-height: 44px;
    gap: 3px;
    padding: 4px 3px;
    font-size: 12px;
    white-space: nowrap;
  }
  .practice-feature .interviewer-choice-avatar {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
  .practice-feature #interviewer-preview {
    padding: 12px;
    border: 1px solid #8D9AC04D;
    border-radius: 16px;
    background: #09111E40;
  }
  .selected-interviewer { flex-direction: row; text-align: left; gap: 12px; }
  .practice-app-avatar { width: 80px; height: 80px; flex-basis: 80px; }
  .selected-interviewer strong { font-size: 20px; }
  .interview-question { margin-top: 10px; padding: 10px 0 0; border: 0; border-top: 1px solid #8D9AC04D; border-radius: 0; background: none; }
  .interview-question blockquote { margin: 6px 0 10px; min-height: 0; font-size: 14px; line-height: 1.45; }
  .interview-preview-label { font-size: 10px; }
  .interview-response-pill { font-size: 10px; }

  .landing-page main #questions {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 0;
    /* html already supplies the 96px sticky-header clearance. */
    scroll-margin-top: 0;
  }
  #questions h2 { margin: 8px 0 0; font-size: 32px; line-height: 1.15; letter-spacing: -.02em; }
  #questions h2 br { display: none; }
  #questions details { padding: 12px 16px; margin-bottom: 10px; }
  #questions summary { min-height: 44px; gap: 12px; font-size: 15px; line-height: 1.35; }
  #questions details p { margin-top: 12px; font-size: 15px; line-height: 1.5; }

  /* One perforated ticket. The hero dialog retains its own layout and colors. */
  #launch {
    --launch-field: rgba(11, 19, 38, .65);
    --launch-field-edge: #6880A8;
    --launch-selected: rgba(34, 197, 94, .14);
    --launch-selected-ink: #BBF7D0;
    --launch-error-ink: #FECACA;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 16px;
    box-shadow: none;
  }
  #launch .launch-copy { padding: 18px 18px 0; }
  #launch > form { min-width: 0; padding: 0 18px 18px; }
  :root[data-theme="light"] #launch {
    --launch-field: #F8FAFC;
    --launch-field-edge: #94A3B8;
    --launch-selected: #DCFCE7;
    --launch-selected-ink: #166534;
    --launch-error-ink: #B91C1C;
  }
  #launch .launch-copy > .mono { margin-bottom: 7px; font-size: 11px; }
  #launch .launch-pass { border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--launch-ink); }
  #launch :is(.launch-ticket-top, .launch-ticket-bottom) { padding: 0; }
  #launch .launch-ticket-heading { gap: 8px; margin-bottom: 8px; }
  #launch .launch-ticket-heading > .mono { max-width: none; color: var(--launch-secondary); font-size: 10px; line-height: 1.45; letter-spacing: .05em; }
  #launch .launch-stamp { color: var(--launch-green); border-color: currentColor; font-size: 9px; padding: 5px 7px; }
  #launch .launch-platforms legend { margin-bottom: 5px; color: var(--launch-secondary); }
  #launch .launch-platform-row { gap: 6px; }
  #launch .launch-platform-option span { padding: 7px 4px; background: var(--launch-field); border-color: var(--launch-field-edge); color: var(--launch-ink); font-size: 13px; }
  #launch .launch-platform-option input:checked + span { background: var(--launch-selected); border-color: var(--launch-green); color: var(--launch-selected-ink); }
  #launch .launch-platform-option input:focus-visible + span { outline-color: var(--launch-green); }
  #launch .launch-tear { margin: 11px -18px; border-color: var(--launch-field-edge); }
  #launch .launch-tear::before, #launch .launch-tear::after { top: -8px; width: 14px; height: 14px; border-color: var(--launch-border); background: var(--bg); }
  #launch .launch-tear::before { left: -8px; border-left-color: transparent; }
  #launch .launch-tear::after { right: -8px; border-right-color: transparent; }
  #launch .launch-email-label { margin-bottom: 5px; color: var(--launch-ink); }
  #launch .launch-input-row { flex-direction: row; gap: 6px; }
  #launch .launch-input-row input { min-height: 44px; padding: 10px 12px; border-color: var(--launch-field-edge); background: var(--launch-field); color: var(--launch-ink); font-size: 16px; }
  #launch .launch-input-row input::placeholder { color: var(--launch-secondary); }
  #launch .launch-submit { width: auto; min-height: 44px; padding: 10px 13px; font-size: 13px; }
  #launch .launch-consent { margin-top: 8px; color: var(--launch-secondary); font-size: 12px; line-height: 1.45; }
  #launch .launch-error { color: var(--launch-error-ink); }
  #launch .launch-success h3 { color: var(--launch-ink); }
  #launch .launch-success p { color: var(--launch-secondary); }
  #launch :is(a, .launch-change, .launch-success > .mono) { color: var(--launch-selected-ink); }
  .site-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    padding-top: 28px;
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }
  .site-footer .brand { gap: 10px; font-size: 24px; }
  .site-footer .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    font-size: 14px;
  }
  .site-footer .footer-links a { display: flex; align-items: center; min-height: 44px; }
  .site-footer .copyright { width: 100%; font-size: 13px; }
  .legal-page .main-nav {
    height: auto;
    min-height: 76px;
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 12px;
  }
  .legal-page .main-nav .nav-actions { gap: 8px; flex-wrap: wrap; }
  .legal-page .main-nav .theme-toggle { width: 34px; height: 34px; }
  .legal-page .main-nav .button { min-height: 44px; font-size: 12px; padding: 8px 12px; }
}

@media (max-width: 430px) {
  #launch .launch-input-row { flex-direction: column; }
  #launch .launch-input-row input { flex-basis: auto; }
  #launch .launch-submit { width: 100%; }
}

@media (max-width: 360px) {
  .site-header .nav-links { gap: 2px; padding-inline: 4px; }
  .site-header .nav-links > a, .site-header .nav-links .nav-interview { padding-inline: 5px; }
  .hero .hero-development-badge { font-size: clamp(8px, calc((100vw - 82px) / 27.3), 10px); }
  .landing-page .hero-stack .paper-job { gap: 8px; }
  .hero-stack .paper-job .company-tile { width: 30px; height: 30px; flex-basis: 30px; }
  .hero-stack .paper-job strong { font-size: 13px; }
  .hero-stack .paper-job .stamp > span { font-size: 9px; padding-inline: 4px; }
  .practice-feature .interviewer-choice { padding-inline: 2px; font-size: 11px; gap: 3px; }
  .practice-feature .interviewer-choice-avatar { width: 20px; height: 20px; flex-basis: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stack .hero-card { animation: none !important; }
}
