/* ============================================================
   Square Lodge — style.css
   Mobile-first | WCAG AA | No frameworks | No animations
   ============================================================ */

/* ── 1. DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --green-900: #14382a;
  --green-700: #1f5d3f;
  --green-600: #2a7a52;
  --green-50:  #f1f7f3;
  --wa:        #128c7e;
  --text:      #1f2937;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --surface:   #ffffff;
  --surface-alt: #f8faf9;

  --radius-sm: 8px;
  --radius-md: 12px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  --shadow-sm: 0 1px 3px rgb(0 0 0 / .08);
  --shadow-md: 0 4px 12px rgb(0 0 0 / .10);

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-w: 1120px;
}

/* ── 2. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  /* bottom padding for sticky mobile bar */
  padding-bottom: 72px;
}

@media (min-width: 768px) { body { padding-bottom: 0; } }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { list-style: none; }

/* ── 3. SKIP LINK ────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  background: var(--green-700);
  color: #fff;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
}
.skip-link:focus { top: var(--space-2); }

/* ── 4. FOCUS STATES ─────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--green-600);
  outline-offset: 3px;
}

/* ── 5. TYPOGRAPHY ───────────────────────────────────────────── */
h1 { font-size: clamp(1.75rem, 4vw + 1rem, 2.75rem); line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw + .5rem, 2rem);    line-height: 1.25; }
h3 { font-size: clamp(1.1rem, 2vw + .3rem, 1.35rem); line-height: 1.3; }

p { max-width: 70ch; }

/* ── 6. LAYOUT UTILITY ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section { padding-block: var(--space-5); }
.section--alt { background: var(--surface-alt); }

.section__header { margin-bottom: var(--space-4); }
.section__header h2 { color: var(--green-900); margin-bottom: var(--space-1); }
.section__header p  { color: var(--muted); }

/* ── 7. BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 12px var(--space-3);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }

.btn--primary   { background: var(--green-700); color: #fff; }
.btn--outline   { background: transparent; border-color: var(--green-700); color: var(--green-700); }
.btn--wa        { background: var(--wa);         color: #fff; }
.btn--call      { background: var(--green-700);  color: #fff; }
.btn--directions{ background: transparent; border-color: var(--green-50); color: var(--green-50); }

/* ── 8. HEADER / NAV ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #ebebeb;
}

.site-header .container {
  max-width: 1280px;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: 82px;
}

.nav-brand { 
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand,
.nav-brand:hover {
  text-decoration: none;
}
.nav-brand__logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}
.nav-brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-brand__name {
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--green-900);
}
.nav-brand__sub {
  font-size: .58rem;
  line-height: 1;
  color: #9ca3af;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.nav-links {
  display: none;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  position: relative;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: #374151;
  padding-block: 6px;
  transition: color .2s ease;
}
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--green-700);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform .25s ease-out;
}
.nav-links a:hover {
  color: var(--green-700);
  text-decoration: none;
}
.nav-links a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Call Now CTA */
.nav-cta {
  font-size: .78rem !important;
  font-weight: 600 !important;
  letter-spacing: .04em !important;
  padding: 9px 20px !important;
  border-radius: 7px !important;
  background: var(--green-900) !important;
  color: #fff !important;
  transition: background .2s ease !important;
}
.nav-cta:hover { background: var(--green-700) !important; }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* Hamburger — mobile only */
.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  width: 40px;
  height: 40px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--green-900);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

/* Mobile nav drawer */
.nav-links.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 82px;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #ebebeb;
  border-bottom: 1px solid #ebebeb;
  padding: var(--space-4) var(--space-3);
  gap: var(--space-3);
  box-shadow: 0 8px 24px rgb(0 0 0 / .08);
  z-index: 99;
}
.nav-links.is-open a {
  font-size: .9rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: #374151;
  padding-block: 4px;
}
.nav-links.is-open .nav-cta {
  align-self: flex-start;
  margin-top: var(--space-1);
}

/* ── 9. HERO ─────────────────────────────────────────────────── */
.hero {
  background: var(--green-900);
  color: #fff;
  padding-block: var(--space-6);
}

.hero__inner {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 768px) {
  .hero__inner { grid-template-columns: 1fr 1fr; }
}

.hero__content h1 { color: #fff; margin-bottom: var(--space-2); }
.hero__content p  { max-width: 60ch; color: rgb(255 255 255 / .85); margin-bottom: var(--space-3); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  background: rgb(255 255 255 / .10);
  border: 1px solid rgb(255 255 255 / .20);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  min-width: 80px;
}
.hero__stat strong { font-size: 1.1rem; }
.hero__stat span   { font-size: .75rem; color: rgb(255 255 255 / .75); }

.hero__image img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ── 10. ROOMS ───────────────────────────────────────────────── */
.rooms__grid {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 640px) { .rooms__grid { grid-template-columns: 1fr 1fr; } }

.room-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.room-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.room-card__body {
  padding: var(--space-3);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.room-card__price {
  display: inline-block;
  background: var(--green-50);
  color: var(--green-900);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.room-card__features {
  list-style: disc;
  padding-left: var(--space-2);
  color: var(--muted);
  font-size: .9rem;
}
.room-card__features li { margin-bottom: 4px; }

.room-card__body .btn { margin-top: auto; align-self: flex-start; }

/* ── 11. AMENITIES ───────────────────────────────────────────── */
.amenities__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
@media (min-width: 640px) { .amenities__grid { grid-template-columns: repeat(3, 1fr); } }

.amenity-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.amenity-item svg { color: var(--green-700); flex-shrink: 0; }
.amenity-item strong { font-size: .95rem; color: var(--text); }
.amenity-item span   { font-size: .85rem; color: var(--muted); }

/* ── 12. PHOTOS ──────────────────────────────────────────────── */
.photos__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
@media (min-width: 768px) { .photos__grid { grid-template-columns: repeat(3, 1fr); } }

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 4/3;
  background: var(--border);
  padding: 0;
  border: 0;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: left;
}

.photo-item:focus-visible {
  outline: 3px solid var(--green-600);
  outline-offset: 2px;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.photo-item:hover img {
  transform: scale(1.03);
}

.photo-item__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgb(0 0 0 / .6));
  color: #fff;
  font-size: .78rem;
  padding: var(--space-2) var(--space-1) var(--space-1);
}

/* ── Photo Viewer Modal (Classic Hotel Lightbox) ── */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.photo-viewer[hidden] {
  display: none;
}

.photo-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.photo-viewer__window {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
}

.photo-viewer__frame {
  position: relative;
  background: #ffffff;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-viewer__img {
  display: block;
  max-width: min(85vw, 860px);
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.photo-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  border: none;
  font-size: 1.4rem;
  width: 40px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
  user-select: none;
}

.photo-viewer__frame:hover .photo-viewer__nav,
.photo-viewer__nav:focus-visible {
  opacity: 1;
}

.photo-viewer__nav:hover {
  background: rgba(0, 0, 0, 0.75);
}

.photo-viewer__prev {
  left: 8px;
  border-radius: 0 4px 4px 0;
}

.photo-viewer__next {
  right: 8px;
  border-radius: 4px 0 0 4px;
}

.photo-viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 0;
  color: #d1d5db;
  font-size: .85rem;
}

.photo-viewer__counter {
  font-family: var(--font);
  letter-spacing: .02em;
}

.photo-viewer__close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  opacity: 0.8;
  transition: opacity .2s;
}

.photo-viewer__close:hover {
  opacity: 1;
}

@media (max-width: 640px) {
  .photo-viewer__nav {
    opacity: 0.85;
    width: 34px;
    height: 44px;
    font-size: 1.1rem;
  }
}

/* ── 13. LOCATION ─────────────────────────────────────────────── */
.location__inner {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 768px) { .location__inner { grid-template-columns: 1fr 1fr; } }

.location__map iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.location__info { display: flex; flex-direction: column; gap: var(--space-3); }

.location__address { line-height: 1.8; color: var(--text); font-style: normal; }
.location__address strong { display: block; color: var(--green-900); font-size: 1rem; }

.location__nearby strong { display: block; color: var(--green-900); margin-bottom: var(--space-1); }
.location__nearby ul { color: var(--muted); font-size: .9rem; }
.location__nearby ul li { padding-left: var(--space-2); position: relative; margin-bottom: 4px; }
.location__nearby ul li::before { content: "→"; position: absolute; left: 0; color: var(--green-600); }

/* ── 15. CONTACT ─────────────────────────────────────────────── */
.contact__inner {
  max-width: 560px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.contact__buttons .btn {
  flex: 1;
  justify-content: center;
  font-size: 1rem;
  padding: 14px var(--space-3);
}

.contact__info { display: flex; flex-direction: column; gap: var(--space-1); }

.contact__info dt {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.contact__info dd { color: var(--text); font-size: .95rem; margin-bottom: var(--space-1); }
.contact__info dd a { color: var(--green-700); }

/* ── 16. MOBILE STICKY BAR ───────────────────────────────────── */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  z-index: 200;
  box-shadow: 0 -2px 8px rgb(0 0 0 / .12);
}

.sticky-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  color: #fff;
}

.sticky-bar__call { background: var(--green-700); }
.sticky-bar__wa   { background: var(--wa); }

@media (min-width: 768px) { .sticky-bar { display: none; } }

/* ── 17. FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--green-900);
  color: rgb(255 255 255 / .85);
  padding-block: var(--space-5);
  font-size: .9rem;
}

.footer__inner {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 640px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer__inner { grid-template-columns: 2fr 1fr 1fr; } }

.footer__brand strong {
  display: block;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: var(--space-1);
}
.footer__brand address {
  font-style: normal;
  line-height: 1.8;
  color: rgb(255 255 255 / .75);
}

.footer__nav h3, .footer__links h3 {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / .5);
  margin-bottom: var(--space-2);
}

.footer__nav ul, .footer__links ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer__nav a, .footer__links a {
  color: rgb(255 255 255 / .8);
  font-size: .9rem;
}
.footer__nav a:hover, .footer__links a:hover { color: #fff; text-decoration: none; }

.footer__bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgb(255 255 255 / .12);
  color: rgb(255 255 255 / .5);
  font-size: .8rem;
}

/* ── 18. ABOUT PAGE ──────────────────────────────────────────── */
.about__hero {
  background: var(--green-900);
  color: #fff;
  padding-block: var(--space-5);
}
.about__hero h1 { color: #fff; margin-bottom: var(--space-2); }
.about__hero p  { color: rgb(255 255 255 / .85); max-width: 60ch; }

.about__breadcrumb {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  font-size: .85rem;
  margin-bottom: var(--space-3);
}
.about__breadcrumb a   { color: rgb(255 255 255 / .7); }
.about__breadcrumb span { color: rgb(255 255 255 / .4); }

.about__content {
  padding-block: var(--space-5);
}

.about__content h2 {
  color: var(--green-900);
  margin-bottom: var(--space-2);
  margin-top: var(--space-4);
}
.about__content h2:first-child { margin-top: 0; }
.about__content p { color: var(--text); margin-bottom: var(--space-2); }

.about__placeholder {
  background: var(--green-50);
  border-left: 4px solid var(--green-600);
  padding: var(--space-2) var(--space-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-size: .9rem;
  margin-block: var(--space-2);
}

.about__quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-block: var(--space-3);
}
@media (min-width: 640px) { .about__quick { grid-template-columns: repeat(4, 1fr); } }

.about__quick-item {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  text-align: center;
}
.about__quick-item strong { display: block; color: var(--green-700); font-size: 1.1rem; }
.about__quick-item span   { font-size: .8rem; color: var(--muted); }

.about__cta {
  background: var(--green-50);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
}
.about__cta p { max-width: 50ch; color: var(--text); margin: 0; }

.about__cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
