/* ==========================================================================
   CDEscapes — responsive.css
   Breakpoints, touch refinements and reduced-motion support.
   ========================================================================== */

@media (max-width: 1180px) {
  .results-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.8rem;
  }
}

@media (max-width: 1100px) {
  .pre-search-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .preferences-panel {
    grid-template-columns: 1fr 1fr;
  }

  .preferences-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }

  .nav-links {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand-desc {
    max-width: 420px;
  }
}

@media (max-width: 980px) {
  .results-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  body.filters-drawer-open {
    overflow: hidden;
  }

  .filters-panel {
    display: none;
  }

  .results-layout.is-filters-open .filters-panel {
    position: fixed;
    inset: 0;
    z-index: 800;
    display: flex;
    flex-direction: column;
    max-height: none;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 0;
    background: var(--cream);
    animation: fadeIn 0.22s var(--ease);
  }

  .results-layout.is-filters-open .filters-head {
    position: sticky;
    top: 0;
    z-index: 3;
    flex-shrink: 0;
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(252, 250, 247, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .results-layout.is-filters-open .filters-body {
    flex-shrink: 0;
    padding: 1.1rem 1.25rem 1.5rem;
  }

  .filters-close {
    display: inline-flex;
  }

  .filters-toggle {
    display: inline-flex;
  }

  .results-layout.is-filters-open .filters-done {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: block;
    flex-shrink: 0;
    width: 100%;
    height: 3.4rem;
    min-height: 3.4rem;
    margin: 0;
    padding: 0 1.25rem;
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: 0 -8px 24px rgba(26, 26, 26, 0.1);
  }

  .stays-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .login-panel {
    grid-template-columns: 1fr;
    width: min(560px, 100%);
    overflow-y: auto;
  }

  .login-visual {
    display: none;
  }

  .login-form-wrap {
    overflow: visible;
    padding: 2.6rem 2.5rem;
  }

  .modal-close {
    background: rgba(252, 250, 247, 0.95);
  }

  .stay-detail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.5rem;
  }
}

@media (max-width: 900px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0;
  }

  .feature-row.reverse .feature-media {
    order: 0;
  }

  .feature-media img {
    height: 350px;
  }

  .feature-text {
    max-width: 620px;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .exp-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 860px) {
  .section {
    padding: 6rem 0;
  }

  .section-header {
    margin-bottom: 3rem;
  }

  .hero-content {
    padding: 7rem 1.5rem 6.5rem;
  }

  .hero-sub {
    font-size: 0.98rem;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .results-intro {
    padding: 2rem 1.6rem;
  }

  .search-gate {
    padding: 3rem 2rem;
  }

  .cta-section {
    padding: 6rem 0;
  }

  .footer-bottom-inner {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .stays-grid {
    grid-template-columns: 1fr;
  }

  .stay-media {
    height: 15rem;
  }

  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-controls {
    width: 100%;
    justify-content: space-between;
  }

  .filters-toggle {
    margin-left: auto;
  }

  .sort-wrap {
    margin-left: auto;
  }

  .feature-media img {
    height: 300px;
  }

  .card-grid {
    gap: 1rem;
  }

  .testimonial-card {
    padding: 2rem 1.6rem;
  }

  .stats-section {
    padding: 5rem 0;
  }

  .stat-card {
    padding: 1.8rem 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding-top: 4rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 1.5rem;
  }

  .header {
    padding: 1rem 0;
  }

  .header.is-scrolled {
    padding: 0.65rem 0;
  }

  .header-actions {
    display: none;
  }

  .menu-toggle {
    margin-left: auto;
  }

  .logo-wordmark {
    font-size: 1.24rem;
  }

  .logo-mark {
    width: 2.1rem;
    height: 2.1rem;
  }

  .hero-stat-item:nth-child(2) {
    display: none;
  }

  .hero-stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stat-item {
    padding: 0.95rem 1rem;
    font-size: 0.58rem;
  }

  .hero-scroll-indicator {
    display: none;
  }

  .pre-search {
    padding: 1.2rem;
  }

  .pre-search-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .field--destination {
    grid-column: 1 / -1;
  }

  .field--submit {
    grid-column: 1 / -1;
  }

  .preferences-panel {
    grid-template-columns: 1fr;
  }

  .preferences-note {
    grid-column: auto;
  }

  .form-hint {
    display: none;
  }

  .search-gate {
    padding: 2.6rem 1.4rem;
  }

  .gate-perks {
    flex-direction: column;
    align-items: flex-start;
    max-width: 290px;
    margin-right: auto;
    margin-left: auto;
  }

  .section-header .h2::before {
    margin-bottom: 1rem;
  }

  .results-toolbar {
    gap: 1rem;
  }

  .results-controls {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .results-count {
    order: 3;
    width: 100%;
  }

  .feature-tags {
    margin-bottom: 1rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-img-wrap {
    height: 13rem;
  }

  .exp-card {
    padding: 2.1rem 1.4rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions .btn-primary,
  .cta-actions .btn-outline {
    width: 100%;
  }

  .modal-backdrop {
    padding: 1rem;
  }

  .login-form-wrap {
    padding: 2.4rem 1.5rem;
  }

  .login-form-wrap .h3 {
    font-size: 1.75rem;
  }

  .stay-modal-panel {
    max-height: calc(100svh - 2rem);
  }

  .stay-detail-media {
    height: 210px;
  }

  .stay-detail-body {
    padding: 1.6rem 1.4rem 2rem;
  }

  .stay-detail-amenities ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .stay-detail-rate {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .stay-detail-price {
    font-size: 1.3rem;
  }

  .stay-detail-actions {
    flex-direction: column;
  }

  .stay-detail-actions .btn-primary,
  .stay-detail-actions .btn-outline {
    width: 100%;
  }

  .toast-stack {
    bottom: 1rem;
  }
}

@media (max-width: 540px) {
  .section {
    padding: 4.75rem 0;
  }

  .hero-content {
    padding: 6.5rem 1.15rem 6rem;
  }

  .hero-h1 {
    font-size: clamp(2.75rem, 12.5vw, 3.8rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    width: 100%;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .silver-rule {
    margin-top: 1.4rem;
  }

  .feature-media img {
    height: 250px;
  }

  .feature-price {
    font-size: 1.12rem;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .stat-card {
    padding: 1.5rem 0.75rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.58rem;
  }

  .testimonial-card {
    padding: 1.8rem 1.3rem;
  }

  .testimonial-quote-mark {
    font-size: 4rem;
    left: 1rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom nav {
    gap: 1.1rem;
  }

  .sort-wrap {
    width: 100%;
    margin-left: 0;
  }

  .select-wrap--small {
    flex: 1;
  }

  .select-wrap--small select {
    width: 100%;
  }

  .filters-toggle {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .active-filters {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .stay-footer {
    flex-wrap: wrap;
  }

  .stay-link {
    margin-top: 0.5rem;
  }

  .login-panel {
    max-height: calc(100svh - 2rem);
  }

  .login-row {
    flex-wrap: wrap;
  }

  .stay-detail-grid {
    gap: 0.85rem 1rem;
  }

  .stay-detail-amenities ul {
    grid-template-columns: 1fr;
  }

  .stay-detail-rate {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .logo-wordmark {
    font-size: 1.1rem;
  }

  .pre-search-grid {
    grid-template-columns: 1fr;
  }

  .field--destination,
  .field--submit {
    grid-column: auto;
  }

  .hero-h1 {
    font-size: 2.2rem;
  }
}

/* --------------------------------------------------------------------------
   Cinematic and signature media
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .film-section {
    min-height: 80vh;
    min-height: 80svh;
  }

  .film-inner {
    flex-direction: column;
    gap: 2rem;
    padding-top: 7rem;
    padding-bottom: 3rem;
  }

  .film-overlay {
    background:
      linear-gradient(180deg, rgba(13, 12, 10, 0.4) 0%, rgba(13, 12, 10, 0.12) 30%, rgba(13, 12, 10, 0.7) 64%, rgba(13, 12, 10, 0.94) 100%),
      linear-gradient(90deg, rgba(13, 12, 10, 0.7) 0%, rgba(13, 12, 10, 0.1) 80%);
  }

  .film-copy {
    max-width: 620px;
  }

  .film-meta {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    padding-bottom: 0;
  }

  .signature-grid {
    grid-template-columns: 1fr;
  }

  .signature-card--coast,
  .signature-card--deep {
    grid-column: 1 / -1;
  }

  .signature-card--coast,
  .signature-card--deep {
    min-height: 380px;
  }

}

@media (max-width: 640px) {
  .hero-media img {
    object-position: 34% center;
  }

  .film-section {
    min-height: 84vh;
    min-height: 84svh;
  }

  .film-inner {
    gap: 1.5rem;
    padding-top: 6rem;
    padding-bottom: 2.5rem;
  }

  .film-copy .h2 {
    font-size: clamp(1.95rem, 8.4vw, 2.8rem);
  }

  .film-copy .body-lg {
    margin-bottom: 1.4rem;
    font-size: 0.94rem;
  }

  .film-copy .btn-outline {
    justify-content: center;
    width: 100%;
    max-width: 300px;
  }

  .film-note {
    display: none;
  }

  .film-meta {
    gap: 0.75rem;
  }

  .signature-section {
    padding: 4.75rem 0;
  }

  .signature-card--coast,
  .signature-card--deep {
    min-height: 340px;
  }


  .signature-copy {
    padding: 1.4rem 1.25rem;
  }

  .signature-copy .body {
    font-size: 0.8rem;
  }

  .signature-index {
    top: 1rem;
    right: 1.1rem;
  }

  .signature-actions {
    margin-top: 1.8rem;
  }

  .signature-actions .btn-outline {
    justify-content: center;
    width: 100%;
    max-width: 320px;
  }

  .cta-media img {
    object-position: center 55%;
  }

  .cta-section--media .cta-scrim {
    background: linear-gradient(180deg, rgba(18, 16, 13, 0.72) 0%, rgba(18, 16, 13, 0.58) 48%, rgba(18, 16, 13, 0.88) 100%);
  }
}

@media (max-width: 380px) {
  .film-copy .h2 {
    font-size: 2rem;
  }

  .signature-card--coast,
  .signature-card--deep {
    min-height: 300px;
  }

}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.js-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }

  html.js-ready .hero-word > span,
  html.js-ready .hero-swap-line,
  html.js-ready .hero-swap > span,
  html.js-ready .hero-eyebrow,
  html.js-ready .hero-sub,
  html.js-ready .hero-actions,
  html.js-ready .hero-line {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-media img {
    transform: scale(1.04);
  }

  .ticker-track {
    animation: none;
  }
}
