/* =============================================
   Manitou Springs Commons — Coming Soon
   ============================================= */

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

:root {
  --ink: #0d0d0d;
  --ink-mid: #3d3d3d;
  --ink-light: #888;
  --paper: #f9f8f6;
  --rule: rgba(0, 0, 0, 0.12);
  --text: #0d0d0d;
  --text-muted: #5a5a5a;
  --accent: #c14a2b;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Source Sans 3', system-ui, sans-serif;
}

::selection { background: var(--accent); color: #fff; }

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Page shell --- */

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  height: 100%;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--paper);
  min-height: 100%;
}

/* Subtle paper grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 max(1.5rem, 5vw);
}

/* --- Page-load stagger reveal --- */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

header {
  animation: reveal 0.7s 0.0s ease both;
}

.eyebrow {
  animation: reveal 0.6s 0.15s ease both;
}

h1 {
  animation: reveal 0.7s 0.22s ease both;
}

.body-text:first-of-type {
  animation: reveal 0.6s 0.32s ease both;
}

.hero-image {
  animation: reveal 0.9s 0.42s ease both;
}

/* --- Scroll-triggered reveals --- */

.scroll-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Header / Wordmark --- */

header {
  padding: 2.75rem 0 0;
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.wordmark-main {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.wordmark-sub {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-light);
  margin-top: 0.3rem;
}

/* Accent rule under header */
header::after {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
  margin-top: 1.5rem;
}

/* --- Main Content --- */

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 0;
}

.eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.5vw, 4.25rem);
  line-height: 1.15;
  text-wrap: balance;
  color: var(--ink);
  margin-bottom: 2rem;
  max-width: 820px;
}

h1 em {
  font-style: italic;
  color: var(--ink-mid);
}

.body-text {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

/* --- Hero Image & Carousel --- */

.hero-image {
  margin: 0 calc(-1 * max(1.5rem, 5vw)) 3rem;
  position: relative;
}

.hero-image figcaption {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-light);
  text-align: right;
  margin-top: 1rem;
  padding-right: 0.25rem;
  line-height: 1.35;
}

/* Carousel */

.carousel {
  position: relative;
  line-height: 0;
  background: #111;
}

.carousel-track {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* Inset vignette */
.carousel-track::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  z-index: 1;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Prev / Next buttons */

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: rgba(193, 74, 43, 0.15);
}

.carousel-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink);
}

.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.carousel-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.06);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.97);
}

/* Dot indicators */

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.carousel-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0.5rem;
  background-clip: content-box;
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: rgba(193, 74, 43, 0.15);
}

.carousel-dot.active {
  background: #fff;
  background-clip: content-box;
  transform: scale(1.3);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.85);
  background-clip: content-box;
}

/* Focus styles */
.carousel-btn:focus-visible,
.carousel-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* --- CTA Section --- */

.cta {
  border-top: 2px solid var(--ink);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--ink);
  margin-bottom: 1rem;
}

.cta-body {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 540px;
  margin: 0 auto 2rem;
}

/* --- CTA Button --- */

.contact-btn {
  display: inline-block;
  padding: 0.95rem 2.5rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 0;
  cursor: pointer;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: rgba(193, 74, 43, 0.15);
}

.contact-btn:hover {
  background: #a33c22;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(193, 74, 43, 0.25);
}

.contact-btn:active {
  transform: translateY(0);
}

/* --- Modal --- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.22s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  z-index: 1;
  transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
  color: var(--ink);
  background: #f0f0f0;
}

.modal-frame {
  width: 100%;
  flex: 1;
  min-height: 520px;
  border: none;
  display: block;
}

/* --- Contact line --- */

.contact {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.contact a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.25em;
  transition: color 0.15s;
}

.contact a:hover {
  color: var(--accent);
}

/* --- Footer --- */

footer {
  padding: 1.5rem 0 2.25rem;
  font-size: 0.82rem;
  color: var(--ink-light);
  border-top: 1px solid var(--rule);
}

/* --- Focus-visible styles --- */

.contact-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.modal-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.contact a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}