/* Theresa Inn — limestone arch, Tamil-first guest house. */

*,
*::before,
*::after { box-sizing: border-box; }

body {
  min-height: 100vh;
  text-transform: none;
}

h1, h2, h3, p { text-transform: none; }
h1, h2 { font-weight: 600; }
h3 { font-weight: 600; }
html[data-lang="en"] h1 { font-style: italic; font-weight: 600; }
p { margin: 0; }

.wrap {
  width: min(var(--max-w), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link { text-decoration: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--c-bg);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--c-line); }

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2) var(--s-4);
  min-height: 4rem;
  padding-block: var(--s-3);
}

.wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-style: normal;
  font-size: var(--fs-2);
  line-height: 1;
  color: var(--c-ink);
  text-decoration: none;
  margin-right: auto;
}

.desktop-nav { display: none; }
.desktop-nav a,
.drawer-nav a {
  color: var(--c-ink);
  text-decoration: none;
  font-weight: 500;
}
.desktop-nav a:hover,
.drawer-nav a:hover { color: var(--c-accent); }

.header-tools {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-left: auto;
}

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-3);
}
.lang-switch a {
  color: var(--c-ink);
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.lang-switch a[aria-current="true"] { border-bottom-color: var(--c-accent); }

.header-cta.button { display: none; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid var(--c-ink);
  background: transparent;
  color: var(--c-ink);
  cursor: pointer;
}
.icon-button svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buttons and chips */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  text-decoration: none;
  border: 0;
  font: 600 var(--fs-0) / 1.3 var(--font-body);
  text-align: center;
}
.button:hover { background: #7A2A22; color: var(--c-accent-ink); }
.button-secondary {
  background: transparent;
  color: var(--c-ink);
  border: 1.5px solid var(--c-ink);
}
.button-secondary:hover { background: var(--c-tint); color: var(--c-ink); }

.hero-actions,
.fact-chips { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.fact-chips { list-style: none; padding: 0; margin: var(--s-4) 0 0; gap: var(--s-2); }
.fact-chips li {
  background: var(--c-tint);
  border: 1px solid var(--c-line);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-0);
}

/* Hero */
.hero-arch {
  position: relative;
  width: min(var(--max-w), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}
.arch-media { position: relative; background: var(--c-tint); }
.arch-media.is-clipped { clip-path: url("#limestone-arch"); }
.hero-arch .arch-media { aspect-ratio: 4 / 5; }
.hero-arch .arch-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.arch-stroke {
  position: absolute;
  z-index: 2;
  top: var(--arch-inset);
  right: var(--arch-inset);
  bottom: var(--arch-inset);
  left: var(--arch-inset);
  width: calc(100% - 2 * var(--arch-inset));
  height: calc(100% - 2 * var(--arch-inset));
  color: var(--arch-stroke);
  pointer-events: none;
  overflow: visible;
}
.arch-stroke path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}
.hero-sky {
  position: absolute;
  z-index: 2;
  container-type: inline-size;
  top: 16%;
  left: 12%;
  width: min(22rem, 76%);
  color: var(--c-ink);
}
.hero-sky h1 {
  /* The Tamil headline’s first word is one long token. Scale it to the
     sky box so it stays inside the arch opening. */
  font-size: min(calc(var(--fs-4) * var(--scale-heading)), 9.4cqi);
  text-wrap: wrap;
}
.kicker {
  margin: 0 0 var(--s-2);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-0);
  color: var(--c-ink);
}
.hero-lower {
  width: min(var(--max-w), calc(100% - 2 * var(--gutter)));
  margin: var(--s-6) auto var(--s-12);
}
.hero-subline { max-width: 38rem; }
.hero-actions { margin-top: var(--s-4); }

@media (prefers-reduced-motion: no-preference) {
  .hero-arch .arch-media img { animation: hero-fade var(--t-hero) var(--ease) both; }
  .hero-sky h1 { animation: hero-drop var(--t-hero) var(--ease) both; }
}
@keyframes hero-fade { from { opacity: 0.92; } to { opacity: 1; } }
@keyframes hero-drop { from { transform: translateY(10px); } to { transform: none; } }

/* Sections */
.section { padding-block: var(--s-8) var(--s-12); }
.section h2 { margin-bottom: var(--s-4); }
.lede { max-width: 40rem; color: var(--c-ink); margin-bottom: var(--s-6); }
.about-copy p + p,
.service-list p { margin-top: var(--s-3); }
.muted { color: var(--c-muted); }

.about-grid,
.contact-grid { display: grid; gap: var(--s-8); }
.about-copy { display: grid; gap: var(--s-4); align-content: start; }

.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin: 0;
}
.highlights div { background: var(--c-tint); padding: var(--s-3); }
.highlights dt { color: var(--c-muted); font-size: var(--fs-0); }
.highlights dd { margin: var(--s-1) 0 0; font-weight: 600; }

.about-frame img { width: 100%; height: auto; display: block; }

/* Services */
.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-8) var(--s-6);
  list-style: none;
  padding: 0;
  margin: var(--s-6) 0 0;
}
.service-icon { width: 2rem; height: 2rem; color: var(--c-accent); margin-bottom: var(--s-3); }
.service-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-note { margin-top: var(--s-6); color: var(--c-muted); }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  align-items: start;
  list-style: none;
  padding: 0;
  margin: var(--s-6) 0 0;
}
.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--c-tint);
  color: inherit;
  cursor: pointer;
  text-align: start;
}
.gallery-tile img { width: 100%; height: auto; display: block; }
.gallery-tile .sample-badge {
  position: absolute;
  inset-inline-start: var(--s-2);
  bottom: var(--s-2);
  max-width: calc(100% - var(--s-4));
  font-size: 11px;
  line-height: 1.3;
  color: var(--c-accent-ink);
  background: rgb(42 28 20 / .55);
  padding: 0.2rem 0.35rem;
}
figure { margin: 0; }
.about-frame { position: relative; }
.label { color: var(--c-muted); font-size: var(--fs-0); }

picture.image-unavailable {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 8rem;
  background: var(--c-tint);
}
picture.image-unavailable img { visibility: hidden; }
picture.image-unavailable::after {
  content: attr(data-fallback-label);
  position: absolute;
  inset: var(--s-3);
  color: var(--c-muted);
}

/* Contact */
.contact-list { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
.contact-row { display: grid; gap: var(--s-1); }
.contact-row .label { color: var(--c-muted); font-size: var(--fs-0); }
.contact-row a {
  color: var(--c-ink);
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-row a:hover { color: var(--c-accent); }
.hours-block { margin-top: var(--s-6); display: grid; gap: var(--s-2); }
.hours-block h3 { font-size: var(--fs-2); }
.languages-row { margin-top: var(--s-4); }

.map-card {
  min-height: 18rem;
  background: var(--c-tint);
  display: grid;
  place-items: center;
  gap: var(--s-4);
  padding: var(--s-6);
  align-content: center;
}
.map-card iframe { width: 100%; height: 18rem; border: 0; }
.map-pin { width: 1.75rem; height: 1.75rem; color: var(--c-accent); }
.map-link { display: inline-block; margin-top: var(--s-3); color: var(--c-ink); font-weight: 600; }

/* Footer and sticky */
.site-footer {
  padding: var(--s-8) 0 calc(var(--s-12) + var(--sticky-cta-h) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--c-line);
}
.footer-grid { display: grid; gap: var(--s-4); }
.site-footer p { color: var(--c-muted); }
.back-top { color: var(--c-ink); font-weight: 600; }
.preview-notice { display: grid; gap: var(--s-3); max-width: 42rem; }
.offer-link { font-weight: 600; color: var(--c-accent); }

.sticky-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 25;
  background: var(--c-surface);
  padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--c-line);
}
.sticky-cta .button { width: 100%; }
.sticky-cta.is-parked { visibility: hidden; pointer-events: none; }

/* Drawer and lightbox */
.drawer,
.lightbox {
  border: 0;
  padding: 0;
  color: var(--c-ink);
  background: var(--c-surface);
  box-shadow: var(--shadow-1);
}
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(22rem, calc(100vw - 2rem));
  height: 100vh;
  max-height: 100vh;
  margin: 0;
}
.lightbox {
  position: fixed;
  inset: 0;
  width: min(72rem, calc(100vw - 1.5rem));
  height: fit-content;
  max-height: calc(100vh - 1.5rem);
  margin: auto;
  overflow: auto;
}
.drawer::backdrop,
.lightbox::backdrop { background: rgb(42 28 20 / .55); }
.drawer-head,
.viewer-toolbar,
.viewer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
}
.drawer-nav { display: grid; padding: 0 var(--s-4) var(--s-6); }
.drawer-nav a { min-height: 48px; display: flex; align-items: center; }

.lightbox { width: min(72rem, calc(100vw - 1.5rem)); }
.viewer-image {
  position: relative;
  width: min(100%, calc(70vh * var(--frame-ratio, 1)));
  margin-inline: auto;
  background: var(--c-bg);
}
.viewer-image picture,
.viewer-image img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}
.viewer-bottom { align-items: flex-end; }
#viewer-caption { margin: 0; max-width: 40rem; }
.viewer-controls { display: flex; align-items: center; gap: var(--s-2); }
.viewer-count { min-width: 3.5rem; text-align: center; color: var(--c-muted); }

/* Wider layouts */
@media (min-width: 640px) {
  .service-list { grid-template-columns: 1fr 1fr; }
  .hero-sky { width: min(26rem, 70%); top: 14%; left: 14%; }
}

@media (min-width: 769px) {
  .hero-arch .arch-media { aspect-ratio: 16 / 9; }
  .hero-sky { top: 14%; left: 12%; width: min(36rem, 52%); }
}

@media (min-width: 1024px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    min-height: 64px;
    flex-wrap: nowrap;
  }
  .wordmark { margin-right: 0; }
  .desktop-nav {
    display: flex;
    justify-content: center;
    gap: var(--s-6);
  }
  .header-tools { margin-left: 0; }
  .header-cta.button { display: inline-flex; }
  .menu-toggle { display: none; }
  .about-grid { grid-template-columns: 7fr 5fr; align-items: center; }
  .service-list { grid-template-columns: 1fr 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
  .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .sticky-cta { display: none; }
  .site-footer { padding-bottom: var(--s-12); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-arch .arch-media img,
  .hero-sky h1 { animation: none; }
}
