/*
 * EASY HOME mobile-first polish layer
 * Loaded last so the mobile experience is predictable even when legacy
 * component styles are still present. This layer only changes presentation;
 * it does not change project values, routes, or booking state.
 */
:root {
  --eh-mobile-gutter: clamp(18px, 5vw, 28px);
  --eh-surface: #f7f8f8;
  --eh-surface-strong: #eef1f2;
  --eh-card: #ffffff;
  --eh-ink: #202326;
  --eh-muted: #657078;
  --eh-line: #d9dee1;
  --eh-gold: #a8813f;
  --eh-button: #e8ebed;
  --eh-button-hover: #dce1e4;
  --eh-safe-bottom: max(20px, env(safe-area-inset-bottom));
}

html { scroll-behavior: smooth; background: #fff; }
body {
  min-width: 0;
  overflow-x: clip;
  background: #fff;
  color: var(--eh-ink);
  -webkit-text-size-adjust: 100%;
}
body.eh-menu-open { overflow: hidden; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }

/* Keep every actionable element comfortable on touch screens. */
.header button,
.header a,
.menu-toggle,
.eh-cinematic-hero-actions a,
.eh-v2-button,
.button,
.neo-home-selector button,
.eh-home-collection-v2__tabs button,
.eh-space-collection-v2__tabs button,
.gallery-toolbar button,
.eh-cinematic-hero-controls button,
.floorplan-viewer button,
.selection-choice,
.footer-column summary { min-height: 48px; }

/* Light, quiet header: the dark legacy header is intentionally overridden. */
.announcement { background: #f2f4f4; color: #5f686e; padding-inline: var(--eh-mobile-gutter); }
.header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px var(--eh-mobile-gutter);
  border-bottom: 1px solid rgba(30,38,42,.1);
  background: rgba(255,255,255,.96);
  color: var(--eh-ink);
  box-shadow: 0 4px 18px rgba(33,41,45,.05);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.brand { min-width: 0; gap: 9px; color: var(--eh-ink); }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand strong { color: var(--eh-ink); font-size: 13px; letter-spacing: .08em; }
.brand small { color: #727c82; font-size: 9px; }
.menu-toggle {
  display: inline-flex;
  grid-column: 3;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  width: 48px;
  padding: 0;
  border: 1px solid var(--eh-line);
  border-radius: 999px;
  background: var(--eh-button);
  color: var(--eh-ink);
  font-size: 0;
}
.menu-toggle::before { content: '⋮'; font-size: 25px; line-height: 1; }
.menu-toggle[aria-expanded="true"]::before { content: '×'; font-size: 25px; }
.header-find-home {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 9px 15px;
  border: 1px solid var(--eh-line);
  border-radius: 999px;
  background: var(--eh-button);
  color: var(--eh-ink);
  font-weight: 700;
  text-decoration: none;
}
.header-find-home:hover, .header-find-home:focus-visible { background: var(--eh-button-hover); color: var(--eh-ink); }
.header-find-home-full { display: inline; }
.header-find-home-short { display: none; }
.header-tools, .header-login-menu { display: none; }

.nav {
  position: fixed;
  inset: 65px 0 0;
  z-index: 79;
  display: flex;
  visibility: hidden;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px var(--eh-mobile-gutter) calc(28px + var(--eh-safe-bottom));
  border-top: 1px solid var(--eh-line);
  background: rgba(255,255,255,.98);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.nav.nav-open { visibility: visible; opacity: 1; transform: none; }
@media (max-width: 699px) {
  .header .nav,
  .header .nav.nav-open {
    position: absolute;
    top: 100%;
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 90;
    height: calc(100svh - 65px);
    max-height: calc(100svh - 65px);
    display: flex;
    padding: 18px var(--eh-mobile-gutter) calc(28px + var(--eh-safe-bottom));
  }
  .header { overflow: visible; }
}
.nav > a,
.nav .nav-item > a,
.header-login,
.header-tools .language-mega-trigger,
.header-tools .notification-trigger,
.header-tools .search-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 11px 5px;
  border: 0;
  border-bottom: 1px solid var(--eh-line);
  border-radius: 0;
  background: transparent;
  color: var(--eh-ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}
.nav > a::after, .nav .nav-item > a::after { content: '›'; color: var(--eh-gold); font-size: 22px; }
.nav > a:hover, .nav > a:focus-visible,
.nav .nav-item > a:hover, .nav .nav-item > a:focus-visible { color: var(--eh-gold); outline: none; }
.nav .nav-item { display: block; }
.nav .mega-menu-panel {
  position: static;
  display: none;
  max-height: none;
  padding: 8px 0 12px 10px;
  border: 0;
  border-left: 2px solid #d6bf91;
  border-radius: 0;
  background: #f7f8f8;
  box-shadow: none;
}
.nav .nav-item.is-open .mega-menu-panel,
.nav .nav-item:focus-within .mega-menu-panel { display: block; }
.nav .mega-menu-panel a { min-height: 48px; color: #4d585e; }
.nav .mega-menu-panel a:hover, .nav .mega-menu-panel a:focus-visible { color: var(--eh-gold); }
.nav .nav-item > a[aria-expanded="true"] { color: var(--eh-gold); }
.nav .nav-item > a[aria-expanded="true"]::after { content: '⌄'; }
.mobile-menu-extras { display: grid; gap: 0; margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--eh-line); }
.mobile-menu-extras a, .mobile-menu-extras button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 54px; padding: 11px 5px; border: 0; border-bottom: 1px solid var(--eh-line); background: transparent; color: var(--eh-ink); font: 600 16px/1.3 'DM Sans', sans-serif; text-align: left; text-decoration: none; }
.mobile-menu-extras a span, .mobile-menu-extras button span { color: var(--eh-gold); font-size: 22px; }
.mobile-menu-extras a:hover, .mobile-menu-extras a:focus-visible, .mobile-menu-extras button:hover, .mobile-menu-extras button:focus-visible { color: var(--eh-gold); outline: none; }

/* Hero: no forced carousel on small screens; the existing controls remain available. */
.eh-cinematic-hero { min-height: min(760px, calc(100svh - 64px)); background: #dfe4e6; }
.eh-cinematic-hero-media { min-height: inherit; }
.eh-cinematic-hero-media > img,
.eh-cinematic-hero-media picture img { object-position: 55% center; }
.eh-cinematic-hero-content {
  left: var(--eh-mobile-gutter);
  right: var(--eh-mobile-gutter);
  bottom: clamp(46px, 10vh, 88px);
  max-width: 38rem;
}
.eh-cinematic-hero-eyebrow { font-size: 10px; letter-spacing: .13em; }
.eh-cinematic-hero-content h1 { max-width: 10ch; font-size: clamp(44px, 13vw, 78px); line-height: .94; }
.eh-cinematic-hero-lede { max-width: 32rem; font-size: 15px; line-height: 1.55; }
.eh-cinematic-hero-actions { align-items: stretch; flex-direction: column; gap: 8px; max-width: 25rem; }
.eh-cinematic-hero-actions a { width: 100%; justify-content: center; }
.eh-project-reimagined__actions { align-items: stretch; flex-direction: column; gap: 8px; }
.eh-project-reimagined__actions a, .eh-v2-final .eh-v2-button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 11px 15px; border: 1px solid var(--eh-line); border-radius: 999px; background: var(--eh-button); color: var(--eh-ink); text-decoration: none; }
.eh-project-reimagined__actions a:hover, .eh-project-reimagined__actions a:focus-visible, .eh-v2-final .eh-v2-button:hover, .eh-v2-final .eh-v2-button:focus-visible { background: var(--eh-button-hover); color: var(--eh-ink); }
.eh-cinematic-hero-stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; max-width: 25rem; }
.eh-cinematic-hero-stats span { padding: 10px 8px; }
.eh-cinematic-hero-stats strong { font-size: 19px; }
.eh-cinematic-hero-side-note, .eh-cinematic-hero-topbar { display: none; }
.eh-cinematic-hero-controls { right: var(--eh-mobile-gutter); bottom: 12px; left: var(--eh-mobile-gutter); justify-content: space-between; gap: 6px; }
.eh-cinematic-hero-controls button { min-width: 48px; padding-inline: 10px; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.16); }
.eh-cinematic-hero-dots { gap: 5px; }

/* Common section rhythm and readable mobile type. */
.eh-home-v2 > section:not(.eh-cinematic-hero),
.section, .premium-section, .directory-section, .booking-section { scroll-margin-top: 80px; }
.eh-v2-anchor-rail { display: flex; gap: 7px; overflow-x: auto; padding: 10px var(--eh-mobile-gutter); scrollbar-width: none; }
.eh-v2-anchor-rail::-webkit-scrollbar { display: none; }
.eh-v2-anchor-rail a { flex: 0 0 auto; min-width: 122px; min-height: 66px; }
.eh-vision-reimagined, .eh-project-reimagined, .eh-home-collection-v2, .eh-space-collection-v2 { overflow: hidden; }
.eh-vision-reimagined__inner, .eh-project-reimagined__inner, .eh-home-collection-v2__inner, .eh-space-collection-v2__inner { padding-inline: var(--eh-mobile-gutter); }
.eh-vision-reimagined__heading h2, .eh-project-reimagined h2, .eh-home-collection-v2__heading h2, .eh-space-collection-v2__heading h2 { max-width: 12ch; font-size: clamp(40px, 12vw, 66px); line-height: .96; }

/* Home/BHK collection: one readable card per row on small screens. */
.eh-home-collection-v2__cards { display: flex; flex-direction: column; gap: 12px; }
.eh-home-collection-v2 .neo-home-selector button { width: 100%; min-height: 180px; }
.eh-home-collection-v2__detail { grid-template-columns: 1fr; }
.eh-home-collection-v2__detail-visual, .eh-home-collection-v2__detail-visual img { min-height: 285px; height: 285px; }
.eh-home-collection-v2__detail-copy { padding: 26px 20px 30px; }
.eh-home-collection-v2__actions { align-items: stretch; flex-direction: column; }
.eh-home-collection-v2__actions a { width: 100%; justify-content: center; }

/* Rooms: horizontal only inside the intentional selector rail; details never overflow. */
.eh-space-collection-v2__tabs { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: thin; }
.eh-space-collection-v2__tabs button { flex: 0 0 min(230px, 72vw); min-height: 86px; }
.eh-space-collection-v2__detail { grid-template-columns: 1fr; min-height: 0; }
.eh-space-collection-v2__visual, .eh-space-collection-v2__visual img { min-height: 300px; height: 300px; }
.eh-space-collection-v2__copy { padding: 26px 20px 30px; }
.eh-space-collection-v2__copy h3 { font-size: clamp(32px, 10vw, 45px); }
.eh-space-collection-v2__actions { align-items: stretch; flex-direction: column; }
.eh-space-collection-v2__actions a { width: 100%; justify-content: center; }

/* Floor-plan viewer and booking steps. */
.floorplan-viewer, .floorplan-viewer-shell, .selection-panel, .booking-panel, .support { margin-inline: var(--eh-mobile-gutter); }
.floorplan-viewer__toolbar, .floorplan-controls, .selection-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.floorplan-viewer button, .floorplan-controls button, .selection-toolbar button { width: 100%; min-height: 48px; }
.floorplan-viewer__canvas, .floorplan-canvas, .floorplan-stage { min-height: 300px; max-height: 62svh; }
.home-selection-rail, .selection-path, .steps, .booking-summary, .registration-form, .support-form { min-width: 0; }
.home-selection-rail { grid-template-columns: 1fr; gap: 10px; }
.home-select-field select, .registration-form input, .registration-form select, .registration-form textarea, .support-form input, .support-form textarea { min-height: 50px; width: 100%; font-size: 16px; }
.choices, #choices, .choice-grid { grid-template-columns: 1fr; }
.selection-choice, .choice-card { min-height: 74px; }

/* Gallery/video: viewport-friendly media without cropping core information. */
.gallery, .image-gallery, .video-gallery, .project-video { margin-inline: var(--eh-mobile-gutter); }
.gallery-grid, .image-gallery-grid { grid-template-columns: 1fr; }
.gallery-toolbar, .gallery-controls { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.gallery-toolbar button, .gallery-controls button { width: 100%; }
.gallery-modal, .image-lightbox { padding: 12px; }
.gallery-modal img, .image-lightbox img { max-height: 78svh; object-fit: contain; }
.project-video video, .video-frame, .video-gallery video { width: 100%; aspect-ratio: 16 / 9; min-height: 0; object-fit: cover; }

/* All buttons remain light; text/icons retain contrast. */
.button, .eh-v2-button, .eh-cinematic-primary, .primary-button, .cta-button, .card-link, .submit-button,
.header-find-home, .menu-toggle, .gallery-toolbar button, .gallery-controls button,
.floorplan-viewer button, .floorplan-controls button, .selection-toolbar button {
  border-color: var(--eh-line);
  background: var(--eh-button);
  color: var(--eh-ink);
  box-shadow: none;
}
.button:hover, .eh-v2-button:hover, .eh-cinematic-primary:hover, .primary-button:hover, .cta-button:hover, .card-link:hover, .submit-button:hover,
.header-find-home:hover, .menu-toggle:hover, .gallery-toolbar button:hover, .gallery-controls button:hover,
.floorplan-viewer button:hover, .floorplan-controls button:hover, .selection-toolbar button:hover { background: var(--eh-button-hover); color: var(--eh-ink); }

/* Footer is a real mobile accordion, with safe-area breathing room. */
.site-footer { padding-bottom: var(--eh-safe-bottom); }
.footer-inner { padding-inline: var(--eh-mobile-gutter); }
.footer-public-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px 12px; }
.footer-directory { display: block; }
.footer-column { border-bottom: 1px solid var(--eh-line); }
.footer-column summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; }
.footer-column summary::-webkit-details-marker { display: none; }
.footer-column summary::after { content: '+'; color: var(--eh-gold); font-size: 22px; }
.footer-column[open] summary::after { content: '−'; }
.footer-column-content { padding: 0 0 16px; }
.footer-bottom { display: grid; gap: 14px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.footer-actions { display: flex; justify-content: flex-end; margin: 20px 0 4px; }
.site-footer .back-to-top { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 48px !important; padding: 11px 16px !important; border: 1px solid var(--eh-line) !important; border-radius: 999px !important; background: var(--eh-button) !important; color: var(--eh-ink) !important; font: 700 12px/1.2 'DM Sans', sans-serif !important; cursor: pointer; }
.site-footer .back-to-top:hover, .site-footer .back-to-top:focus-visible { background: var(--eh-button-hover) !important; color: var(--eh-ink) !important; outline: 2px solid var(--eh-gold); outline-offset: 2px; }

/* Mobile header order: brand (logo + full tagline), Find Your Home, then menu. */
@media (max-width: 699px) {
  .header { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; min-height: 64px; }
  .brand { grid-column: 1; grid-row: 1; min-width: 0; gap: 7px; }
  .brand img { flex: 0 0 32px; width: 32px; height: 32px; }
  .brand span { min-width: 0; display: grid; gap: 2px; }
  .brand strong { font-size: 11px; line-height: 1.05; white-space: nowrap; }
  .header .brand small { display: block !important; font-size: 8px; line-height: 1.1; letter-spacing: 0; white-space: nowrap; }
  .header > .header-find-home { grid-column: 2; grid-row: 1; display: inline-flex; width: auto; min-width: 88px; min-height: 44px !important; height: 44px !important; padding: 8px 9px; font-size: 9px; line-height: 1.15; letter-spacing: 0; white-space: nowrap; }
  .header-find-home-full { display: inline; }
  .header-find-home-short { display: none; }
  .header .menu-toggle { grid-column: 3; grid-row: 1; width: 42px !important; min-width: 42px !important; min-height: 44px !important; height: 44px !important; }
}

@media (max-width: 350px) {
  .header { gap: 4px; padding-inline: 12px; }
  .brand img { flex-basis: 29px; width: 29px; height: 29px; }
  .brand strong { font-size: 10px; }
  .header .brand small { display: block !important; font-size: 7.5px; }
  .header > .header-find-home { min-width: 84px; padding-inline: 7px; font-size: 8.5px; }
  .header .menu-toggle { width: 40px !important; min-width: 40px !important; }
}

@media (min-width: 700px) {
  .header { grid-template-columns: auto 1fr auto auto; }
  .menu-toggle { display: none; }
  .header-find-home { display: inline-flex; }
  .header-find-home-short { display: none; }
  .header-login-menu, .header-tools { display: flex; align-items: center; gap: 6px; }
  .nav { position: static; visibility: visible; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 2px; overflow: visible; padding: 0; border: 0; background: transparent; opacity: 1; transform: none; }
  .nav > a, .nav .nav-item > a { width: auto; min-height: 48px; padding-inline: 9px; border: 0; font-size: 13px; }
  .nav > a::after, .nav .nav-item > a::after { display: none; }
  .nav .mega-menu-panel { position: absolute; }
  .eh-cinematic-hero-content { bottom: 11%; }
  .eh-cinematic-hero-actions { align-items: center; flex-direction: row; max-width: none; }
  .eh-cinematic-hero-actions a { width: auto; }
  .eh-home-collection-v2__cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .eh-space-collection-v2__tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); overflow: visible; }
  .eh-space-collection-v2__tabs button { flex-basis: auto; }
  .footer-directory { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
  .footer-column summary { cursor: default; }
  .footer-column summary::after { display: none; }
  .footer-column-content { display: block !important; }
}
@media (min-width: 1100px) {
  .header { padding-inline: clamp(24px, 4vw, 64px); }
  .nav > a, .nav .nav-item > a { padding-inline: 13px; }
  .eh-cinematic-hero-content { left: clamp(42px, 8vw, 140px); }
  .eh-cinematic-hero-controls { left: clamp(42px, 8vw, 140px); right: clamp(42px, 8vw, 140px); }
  .footer-directory { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
