/* =========================================================
   Livinns Thekkady – Responsive Stylesheet
   Breakpoints: 320–374 | 375–767 | 768–1023 | 1024+
   ========================================================= */

:root {
  --beige: #E8BF8C;
  --beige-light: #EFCB9C;
  --brown: #432E17;
  --brown-deep: #36240F;
  --cream: #FFF5E8;
  --tan: #B49B78;
  --tan-dark: #9C8261;
  --text-dark: #3D2A14;
  --text-light: #F4D9B4;
  --white: #FFFFFF;
  --radius: 14px;
  --radius-sm: 8px;
  --gutter: 16px;
  --font-head: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-pill: 999px;
  --shadow: 0 6px 20px rgba(0,0,0,.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--beige);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid #FFB547; outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--cream); padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Plain beige background ---------- */
.pattern { background: var(--beige); }
.dark { background: var(--brown); color: var(--text-light); }

/* ---------- Image frames ---------- */
.ph {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 10px 20px;
  border-radius: var(--radius-pill); border: 2px solid transparent;
  font: 600 15px var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-dark { background: var(--brown); color: var(--cream); }
.btn-dark:hover { background: var(--brown-deep); }
.btn-outline { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn-outline:hover { background: rgba(67,46,23,.08); }
.btn-light { background: var(--cream); color: var(--brown); }
.btn-light:hover { background: var(--white); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  padding: 8px var(--gutter);
  background: var(--beige);
}
.header-bar {
  position: relative;
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brown); color: var(--cream);
  border-radius: 10px; padding: 8px 12px 8px 16px;
  min-height: 60px;
  box-shadow: var(--shadow);
}
.brand { display: block; width: 120px; }
.ph-logo { aspect-ratio: 3 / 1; }
.ph-logo img { object-fit: contain; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.hamburger {
  width: 44px; height: 44px; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 5px; cursor: pointer;
  border-radius: var(--radius-sm);
}
.hamburger span {
  width: 24px; height: 2px; background: var(--cream); border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--brown); border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px 16px 16px;
  display: none;
}
.nav-toggle:checked ~ .main-nav { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li a:not(.btn) {
  display: flex; align-items: center; min-height: 48px;
  text-decoration: none; font-size: 16px;
  border-bottom: 1px solid rgba(255,245,232,.12);
}
.nav-cta { margin-top: 12px; }
.nav-cta .btn { width: 100%; }
.nav-phone {
  display: flex; align-items: center; justify-content: center; min-height: 44px;
  margin-top: 8px; text-decoration: none; color: var(--text-light); font-size: 14px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: 28px 0 44px; }
.hero-grid { display: flex; flex-direction: column; gap: 28px; }

.hero-text { text-align: center; }
.hero-text h1 { font-size: clamp(28px, 8vw, 34px); font-weight: 800; line-height: 1.02; letter-spacing: -.01em; color: var(--brown); margin-bottom: 14px; }
.hero-text p { font-size: 15px; font-weight: 500; line-height: 1.35; }
.tagline { font-weight: 600 !important; }

.ph-hotel-logo {
  width: 200px; margin: 8px auto 20px; aspect-ratio: 2 / 1;
}
.ph-hotel-logo img { object-fit: contain; }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn { flex: 1 1 140px; max-width: 220px; }

.hero-media { position: relative; order: -1; }   /* image first on mobile */
.hero-frame .ph { border-radius: var(--radius); box-shadow: var(--shadow); border: 3px solid var(--cream); }
.hero-inset, .dots { display: none; }             /* collage only on desktop */

/* =========================================================
   SECTION TITLES
   ========================================================= */
.section-title {
  font-family: var(--font-head);
  font-size: clamp(26px, 7.5vw, 30px);
  font-weight: 800; text-transform: uppercase; letter-spacing: .01em;
  text-align: center; margin-bottom: 14px;
}
.section-title.left { text-align: left; }
.section-intro { max-width: 760px; margin: 0 auto 28px; text-align: center; font-weight: 500; }
.dark .section-title { color: var(--cream); }
.gallery .section-title, .places .section-title { color: var(--brown); }

/* =========================================================
   ABOUT / ROOMS
   ========================================================= */
.about { padding: 48px 0 56px; }
.rooms { display: grid; grid-template-columns: 1fr; gap: 20px; }
.room-card {
  background: var(--cream); color: var(--text-dark);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.room-card .ph { aspect-ratio: 4 / 3; }
.room-body { padding: 16px 18px 18px; text-align: center; display: flex; flex-direction: column; flex: 1; }
.room-body h3 { font-family: var(--font-head); font-size: 15px; font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.room-body p { font-size: 14px; flex: 1; }
.room-link {
  align-self: center; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 600; color: var(--brown); text-decoration: none; border-bottom: 2px solid var(--tan);
}

/* =========================================================
   GALLERY
   ========================================================= */
.gallery { padding: 48px 0 40px; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.g-item {
  padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius-sm); overflow: hidden;
}
.g-item .ph { aspect-ratio: 5 / 3; transition: transform .3s ease; }
.g-item:hover .ph { transform: scale(1.03); }

.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 90vh;
}
.lightbox::backdrop { background: rgba(20,12,4,.88); }
.lightbox img { max-width: 96vw; max-height: 86vh; border-radius: var(--radius-sm); }
.lb-close {
  position: fixed; top: 12px; right: 12px; width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: var(--cream); color: var(--brown);
  font-size: 30px; line-height: 1; cursor: pointer;
}

/* =========================================================
   PLACES
   ========================================================= */
.places { padding: 8px 0 40px; }
.places-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.places-list li {
  background: rgba(255,245,232,.6); border: 1px solid rgba(67,46,23,.15);
  border-radius: var(--radius-sm); padding: 12px; text-align: center;
  font-weight: 500; font-size: 14px; color: var(--brown);
}

/* =========================================================
   CONTACT + FOOTER
   ========================================================= */
.contact-wrap { padding: 16px 0 24px; }
.contact-card {
  background: var(--brown); color: var(--cream);
  border-radius: 18px; padding: 32px 20px 24px;
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
.contact-info p { font-size: 15px; }
address { font-style: normal; margin: 18px 0; line-height: 1.7; }
address a { color: var(--cream); font-weight: 600; text-decoration: none; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.contact-actions .btn { flex: 1 1 90px; font-size: 14px; padding: 10px 12px; }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.socials svg { width: 32px; height: 32px; fill: var(--cream); }

.enquiry-form { display: grid; grid-template-columns: 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-light); }
.enquiry-form input, .enquiry-form select, .enquiry-form textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--tan); color: var(--brown-deep);
  border: 2px solid transparent; border-radius: 6px;
  font: 500 16px var(--font-body);   /* 16px prevents iOS zoom */
  appearance: none; -webkit-appearance: none;
}
.enquiry-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--brown) 50%), linear-gradient(135deg, var(--brown) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.enquiry-form textarea { resize: vertical; min-height: 110px; }
.enquiry-form input:focus, .enquiry-form select:focus, .enquiry-form textarea:focus {
  outline: none; border-color: var(--cream); background: #C3AB88;
}
.enquiry-form .invalid { border-color: #FF8A6B; }
.error { color: #FFB49C; font-size: 12px; min-height: 0; }
.btn-submit {
  background: var(--white); color: var(--brown-deep); min-height: 52px; margin-top: 6px;
  font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: .03em; text-transform: uppercase;
}
.btn-submit:disabled { opacity: .7; cursor: wait; }
.btn-submit:hover { background: var(--cream); }
.form-success {
  background: rgba(255,245,232,.12); border-left: 4px solid #9BD48A;
  padding: 12px 14px; border-radius: 6px; font-size: 14px; margin: 0;
}

.site-footer { border-top: 1px solid rgba(255,245,232,.15); padding-top: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.site-footer nav a { text-decoration: none; font-size: 14px; min-height: 36px; display: inline-flex; align-items: center; }
.site-footer p {
  font-family: var(--font-head); font-size: 11px; letter-spacing: .03em; text-transform: uppercase; margin: 0;
}

/* =========================================================
   SMALL MOBILE 320–374
   ========================================================= */
@media (max-width: 374px) {
  :root { --gutter: 14px; }
  body { font-size: 14px; }
  .brand { width: 104px; }
  .hero-text h1 { font-size: 27px; }
  .section-title { font-size: 24px; }
  .gallery-grid { gap: 6px; }
  .places-list { grid-template-columns: 1fr; }
  .contact-card { padding: 26px 16px 20px; }
}

/* =========================================================
   STANDARD MOBILE 375–767 → defaults above
   ========================================================= */
@media (min-width: 480px) {
  :root { --gutter: 20px; }
  .enquiry-form { grid-template-columns: 1fr 1fr; }
  .enquiry-form .full { grid-column: 1 / -1; }
  .field:has(textarea) { grid-column: 1 / -1; }
}

/* =========================================================
   TABLET 768–1023
   ========================================================= */
@media (min-width: 768px) {
  :root { --gutter: 28px; }
  body { font-size: 16px; }
  .hero { padding: 40px 0 60px; }
  .hero-frame .ph { aspect-ratio: 16 / 9; }
  .rooms { grid-template-columns: repeat(2, 1fr); }
  .rooms .room-card:last-child { grid-column: 1 / -1; max-width: calc(50% - 10px); justify-self: center; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .places-list { grid-template-columns: repeat(3, 1fr); }
  .contact-card { padding: 44px 36px 28px; }
  .section-title { font-size: 34px; }
  .lb-close { top: 20px; right: 20px; }
}

/* =========================================================
   DESKTOP 1024+  (original multi-column composition)
   ========================================================= */
@media (min-width: 1024px) {
  .site-header { padding: 20px var(--gutter) 10px; }
  .header-bar { padding: 10px 18px 10px 24px; min-height: 68px; }
  .brand { width: 140px; }
  .hamburger { display: none; }
  .main-nav {
    position: static; display: flex; align-items: center; flex: 1;
    background: none; box-shadow: none; padding: 0;
  }
  .main-nav ul { display: flex; align-items: center; gap: 36px; flex: 1; justify-content: center; }
  .main-nav li a:not(.btn) { border: 0; min-height: 44px; font-size: 16px; }
  .main-nav li a:not(.btn):hover { color: var(--beige-light); }
  .nav-cta { margin: 0 0 0 auto; position: absolute; right: 18px; }
  .nav-cta .btn { width: auto; padding: 8px 22px; }
  .nav-phone { display: none; }

  .hero { padding: 50px 0 70px; }
  .hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 60px; }
  .hero-media { order: 0; padding: 30px 40px 60px 20px; }
  .hero-frame { position: relative; }
  .hero-frame::before {
    content: ""; position: absolute; inset: -20px -30px 30px -20px;
    background: var(--brown); border-radius: 22px; transform: rotate(-6deg); z-index: 0;
  }
  .hero-frame .ph { position: relative; z-index: 1; aspect-ratio: 3 / 2; }
  .hero-inset {
    display: block; position: absolute; right: 10px; bottom: 20px; width: 46%; z-index: 2;
  }
  .hero-inset::before {
    content: ""; position: absolute; inset: 10px -12px -14px 10px;
    background: var(--brown); border-radius: 16px; transform: rotate(6deg);
  }
  .hero-inset .ph {
    position: relative; border-radius: 12px; border: 3px solid var(--cream);
    transform: rotate(6deg); box-shadow: var(--shadow);
  }
  .dots {
    display: block; position: absolute; left: 20px; bottom: 0; width: 55%; height: 80px;
    background-image: radial-gradient(circle, var(--brown) 3px, transparent 3.5px);
    background-size: 26px 24px; opacity: .85;
  }
  .hero-text h1 { font-size: 46px; }
  .hero-text p { font-size: 16px; max-width: 460px; margin-left: auto; margin-right: auto; }

  .about { padding: 70px 0 90px; }
  .rooms { grid-template-columns: repeat(3, 1fr); gap: 36px; padding: 0 20px; }
  .rooms .room-card:last-child { grid-column: auto; max-width: none; }
  .section-title { font-size: 40px; }

  .gallery { padding: 60px 0 50px; }
  .places { padding: 10px 0 60px; }

  .contact-wrap { padding: 30px 0 0; }
  .contact-card {
    grid-template-columns: 1fr 1.05fr; column-gap: 70px;
    padding: 56px 50px 30px; border-radius: 22px 22px 0 0;
  }
  .site-footer { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-top: 24px; margin-top: 30px; }
  .site-footer nav { margin: 0; order: 2; }
  .site-footer p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Contact phone list ---------- */
.phone-list { list-style: none; margin: -6px 0 20px; padding: 0; display: grid; gap: 2px; }
.phone-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.phone-list a {
  display: inline-flex; align-items: center; min-height: 40px;
  color: var(--cream); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.phone-list a:hover { text-decoration: underline; }
.phone-list span { font-size: 13px; color: var(--text-light); opacity: .85; }
