/* ==========================================================================
   HOTEL AB PALACE - INDORE (FRONT-END DESIGN SYSTEM)
   ========================================================================== */

/* Google Fonts Import: Marcellus (Display), Karla (Body), IBM Plex Mono (Utility) */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Karla:ital,wght@0,400;0,500;0,700;1,400&family=Marcellus&display=swap');

:root {
  /* Exact Brand Custom Properties */
  --maroon: #5E1B26;
  --maroon-deep: #3A0F17;
  --cream: #F7F2E9;
  --ivory: #FFFFFF;
  --stone: #9A938A;
  --brass: #B08D4F;

  /* Typography Roles */
  --font-display: 'Marcellus', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-utility: 'IBM Plex Mono', monospace;

  /* Fluid Type Scale */
  --type-display: clamp(2.5rem, 5.5vw, 5rem);
  --type-h2: clamp(1.8rem, 3.2vw, 2.75rem);
  --type-h3: 1.35rem;
  --type-body: 1.0625rem;
  --type-utility: 0.75rem;

  /* Layout & Borders */
  --max-width: 1280px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-padding: clamp(4rem, 8vw, 8rem);
  --radius: 2px;
  --border-stone: 1px solid var(--stone);
  --border-brass: 1px solid var(--brass);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--cream);
  color: var(--maroon-deep);
}

body {
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: 1.7;
  color: var(--maroon-deep);
  background-color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Accessible Focus Rings */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}

/* Typography Classes */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.25;
  color: var(--maroon);
}

h1 { font-size: var(--type-display); letter-spacing: -0.02em; }
h2 { font-size: var(--type-h2); letter-spacing: 0.01em; }
h3 { font-size: var(--type-h3); }

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Front-Desk Register Utility Font */
.mono-utility {
  font-family: var(--font-utility);
  font-size: var(--type-utility);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--stone);
}

.mono-utility-brass {
  font-family: var(--font-utility);
  font-size: var(--type-utility);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brass);
}

/* Layout System */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

/* Asymmetric Editorial Splits */
.split-7-5 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split-7-5 > .col-7 { grid-column: span 7; }
.split-7-5 > .col-5 { grid-column: span 5; }

.split-5-7 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split-5-7 > .col-5 { grid-column: span 5; }
.split-5-7 > .col-7 { grid-column: span 7; }

/* Buttons & Links (No Pill Shapes, No Gold Gradients) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.btn-maroon {
  background-color: var(--maroon);
  color: var(--cream);
  border: 1px solid var(--maroon);
}

.btn-maroon:hover {
  background-color: var(--maroon-deep);
  border-color: var(--maroon-deep);
}

.btn-brass-outline {
  background-color: transparent;
  color: var(--maroon);
  border: 1px solid var(--brass);
}

.btn-brass-outline:hover {
  background-color: var(--brass);
  color: var(--ivory);
}

.link-brass {
  color: var(--maroon);
  text-decoration: none;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.link-brass::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--brass);
  transition: width 0.3s ease;
}

.link-brass:hover::after {
  width: 100%;
}

/* Navigation Header - Premium Frosted Maroon Glass */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  background: rgba(58, 15, 23, 0.92); /* Deep Maroon Glass */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(176, 141, 79, 0.4); /* 1px Brass Hairline */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: padding 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled {
  padding: 12px 0;
  background: rgba(58, 15, 23, 0.98);
  border-bottom: 1px solid var(--brass);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  animation: headerSlideDown 0.4s ease-out;
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-20px);
    opacity: 0.8;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.nav-brand:hover {
  transform: translateY(-1px);
}

.nav-brand img {
  filter: drop-shadow(0 0 8px rgba(176, 141, 79, 0.4));
  transition: filter 0.3s ease;
}

.nav-brand:hover img {
  filter: drop-shadow(0 0 12px rgba(176, 141, 79, 0.7));
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--cream);
  letter-spacing: 0.05em;
  transition: color 0.4s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cream);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

/* Animated Left-to-Right Brass Underline */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brass);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 8px rgba(176, 141, 79, 0.6);
}

.nav-links a:hover, 
.nav-links a.active {
  color: var(--brass) !important;
}

.nav-links a:hover::after, 
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: var(--brass);
  transform: scale(1.1);
}

/* Hero Section & Jharokha Arch Mask */
.hero-section {
  position: relative;
  padding-top: 140px;
  padding-bottom: clamp(4rem, 8vw, 7rem);
  background-color: var(--cream);
  overflow: hidden;
}

.hero-arch-wrapper {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.jharokha-svg-mask {
  position: relative;
  width: 100%;
  padding-top: 135%; /* Aspect ratio for Arch */
}

.jharokha-img-clipped {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: path('M 0,600 L 0,160 C 0,80 150,20 270,0 C 390,20 540,80 540,160 L 540,600 Z');
  border-radius: var(--radius);
}

/* Fallback border SVG for Arch */
.jharokha-brass-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.jharokha-path-stroke {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2;
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s ease-out;
}

.hero-text-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-headline {
  font-size: var(--type-display);
  margin-top: 12px;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 32px;
  max-width: 520px;
  color: var(--maroon-deep);
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* Flat Room Cards with Arch Top */
.room-card {
  background-color: var(--ivory);
  border: var(--border-stone);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.3s ease;
}

.room-card:hover {
  border-color: var(--brass);
}

.room-card-arch-img {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.room-card-arch-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: path('M 0,240 L 0,40 C 0,15 100,5 180,0 C 260,5 360,15 360,40 L 360,240 Z');
  transition: transform 0.5s ease;
}

.room-card:hover .room-card-arch-img img {
  transform: scale(1.03);
}

.room-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.room-card-title {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.room-card-desc {
  font-size: 0.95rem;
  color: var(--maroon-deep);
  margin-bottom: 16px;
  flex-grow: 1;
}

.room-card-specs {
  border-top: 1px solid var(--cream);
  border-bottom: 1px solid var(--cream);
  padding: 10px 0;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}

/* Section Divider Hairlines */
.section-divider {
  width: 100%;
  height: 1px;
  background-color: var(--stone);
  opacity: 0.3;
  margin: 0;
}

.brass-line-accent {
  width: 60px;
  height: 1px;
  background-color: var(--brass);
  margin-bottom: 16px;
}

/* Full Width Booking Band */
.booking-strip-band {
  background-color: var(--maroon-deep);
  color: var(--cream);
  padding: 4rem 0;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
}

.booking-strip-band h2 {
  color: var(--cream);
}

.booking-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.channel-card {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(176, 141, 79, 0.4);
  padding: 20px;
  border-radius: var(--radius);
  color: var(--cream);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.channel-card:hover {
  background-color: rgba(176, 141, 79, 0.15);
  border-color: var(--brass);
}

/* Grouped Amenities List (1px Brass Icons, No Boxes) */
.amenities-list-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.amenity-item-single {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(154, 147, 138, 0.2);
}

.amenity-icon-svg {
  width: 24px;
  height: 24px;
  stroke: var(--brass);
  stroke-width: 1.5;
  fill: none;
}

/* Hairline Policy Blocks */
.policy-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.policy-col {
  padding-right: 20px;
  border-right: 1px solid var(--stone);
}

.policy-col:last-child {
  border-right: none;
}

/* Footer */
.site-footer {
  background-color: var(--maroon-deep);
  color: var(--cream);
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--brass);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 40px;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--brass);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-links-list {
  list-style: none;
}

.footer-links-list li {
  margin-bottom: 8px;
}

.footer-links-list a {
  color: var(--stone);
  text-decoration: none;
  font-size: 0.95rem;
}

.footer-links-list a:hover {
  color: var(--cream);
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  font-size: 0.85rem;
  color: var(--stone);
}

/* Form Styles for book.html */
.booking-form-wrap {
  background-color: var(--ivory);
  border: var(--border-stone);
  padding: 40px;
  border-radius: var(--radius);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group-full {
  margin-bottom: 20px;
}

.form-field-label {
  display: block;
  font-family: var(--font-utility);
  font-size: var(--type-utility);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--maroon);
  margin-bottom: 8px;
}

.form-control-input, .form-control-select, .form-control-textarea {
  width: 100%;
  padding: 14px;
  background-color: var(--cream);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--maroon-deep);
  outline: none;
}

.form-control-input:focus, .form-control-select:focus, .form-control-textarea:focus {
  border-color: var(--brass);
}

/* Mobile Sticky Bottom Action Bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: var(--maroon-deep);
  border-top: 1px solid var(--brass);
  padding: 12px var(--gutter);
}

.mobile-sticky-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Gallery Masonry & Lightbox */
.gallery-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.gallery-filter-btn {
  background: transparent;
  border: 1px solid var(--stone);
  color: var(--maroon-deep);
  padding: 8px 18px;
  font-family: var(--font-utility);
  font-size: var(--type-utility);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
}

.gallery-filter-btn.active, .gallery-filter-btn:hover {
  background-color: var(--maroon);
  color: var(--cream);
  border-color: var(--maroon);
}

.gallery-masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item-card {
  cursor: pointer;
  overflow: hidden;
  position: relative;
  border: var(--border-stone);
}

.gallery-item-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item-card:hover img {
  transform: scale(1.04);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(58, 15, 23, 0.95);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border: 1px solid var(--brass);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--cream);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Animations & Motion */
.scroll-rise {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-rise.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .jharokha-path-stroke {
    stroke-dashoffset: 0 !important;
  }
  .scroll-rise {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Responsive Media Queries & Mobile Optimizations */
@media (max-width: 1024px) {
  .grid-12 {
    gap: 20px;
  }
  .grid-12 > [style*="grid-column: span 3"] {
    grid-column: span 6 !important;
  }
}

@media (max-width: 900px) {
  .split-7-5, .split-5-7 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .split-7-5 > .col-7, .split-7-5 > .col-5,
  .split-5-7 > .col-5, .split-5-7 > .col-7 {
    grid-column: span 1;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .policy-columns {
    grid-template-columns: 1fr;
  }
  .policy-col {
    border-right: none;
    border-bottom: 1px solid var(--stone);
    padding-bottom: 20px;
    padding-right: 0;
  }
  .hero-arch-wrapper {
    max-width: 420px;
  }
}

@media (max-width: 768px) {
  /* Prevent iOS input auto-zoom */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Fullscreen Mobile Navigation Drawer */
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(42, 11, 17, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 1000;
  }

  .nav-links.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    color: var(--cream) !important;
    font-size: 1.35rem;
    font-family: var(--font-display);
    letter-spacing: 0.05em;
    padding: 10px;
  }

  .mobile-menu-toggle {
    display: block;
    z-index: 1001;
    position: relative;
  }

  /* Mobile Sticky Bottom Action Bar with Safe Area inset */
  .mobile-sticky-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: var(--maroon-deep);
    border-top: 1px solid var(--brass);
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .mobile-sticky-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .mobile-sticky-inner .btn {
    padding: 12px 10px;
    font-size: 0.85rem;
  }

  body {
    padding-bottom: 80px; /* Prevent sticky bar from hiding footer/page bottom */
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding-top: 110px;
    padding-bottom: 3rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .booking-channels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .grid-12 > [style*="grid-column: span"] {
    grid-column: span 12 !important;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .gallery-masonry-grid {
    grid-template-columns: 1fr;
  }
  .amenities-list-group {
    grid-template-columns: 1fr;
  }
  .booking-form-wrap {
    padding: 24px 16px;
  }
}

