/* ==========================================================================
   Sowparnika Atrium — community website styles
   ========================================================================== */

:root {
  /* Palette derived from the official logo: teal ink #4BAFC6 (h191°) and
     maroon ink #982B35 (h355°), each expanded into a same-hue tonal ramp
     for backgrounds/text at verified WCAG AA contrast — see the palette
     derivation notes in the deployment docs before changing these. */
  --color-teal-900: #172E33;
  --color-teal-800: #22424A;
  --color-teal-700: #305E69;
  --color-ivory-100: #FBF8F1;
  --color-ivory-200: #F3EDDF;
  --color-charcoal-900: #26251F;
  --color-charcoal-700: #4A483F;
  --color-maroon-400: #DA969C;
  --color-maroon-500: #9F2D37;
  --color-maroon-600: #77222A;
  --color-white: #FFFFFF;
  --color-border: #E4DCC8;

  --font-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(18, 52, 48, 0.08);
  --shadow-md: 0 8px 24px rgba(18, 52, 48, 0.12);

  --transition-fast: 160ms ease;
  --transition-base: 240ms ease;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-charcoal-900);
  background: var(--color-ivory-100);
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-teal-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }

p { margin: 0 0 1em; }

a {
  color: var(--color-teal-800);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover { color: var(--color-maroon-600); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-maroon-600);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Dark sections (hero, rentals panel, footer): maroon-600 is too close in
   value to the dark teal background to read as a focus ring there, so use
   the light maroon instead. */
.hero :focus-visible,
.rentals-section :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-maroon-400);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  background: var(--color-teal-900);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.section-heading {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-maroon-600);
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1.08rem;
  color: var(--color-charcoal-700);
  max-width: 60ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}

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

.btn-primary {
  background: var(--color-teal-800);
  color: var(--color-white);
  border-color: var(--color-teal-800);
}
.btn-primary:hover { background: var(--color-teal-900); color: var(--color-white); }

.btn-secondary {
  background: transparent;
  color: var(--color-ivory-100);
  border-color: rgba(251, 248, 241, 0.6);
}
.btn-secondary:hover { background: rgba(251, 248, 241, 0.12); color: var(--color-ivory-100); }

.btn-outline {
  background: transparent;
  color: var(--color-teal-800);
  border-color: var(--color-teal-800);
}
.btn-outline:hover { background: var(--color-teal-800); color: var(--color-white); }

.btn-maroon {
  background: var(--color-maroon-500);
  color: var(--color-white);
  border-color: var(--color-maroon-500);
}
.btn-maroon:hover { background: var(--color-maroon-600); color: var(--color-white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 241, 0.94);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-teal-900);
}

.wordmark-mark {
  flex-shrink: 0;
  display: block;
  width: 40px;
  height: 40px;
}

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

.wordmark-text strong {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.wordmark-text span {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--color-maroon-600);
  text-transform: uppercase;
  margin-top: 0.2rem;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-charcoal-900);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-teal-800);
  border-bottom-color: var(--color-maroon-500);
}

.nav-cta {
  display: inline-flex;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  cursor: pointer;
}

.nav-toggle svg { width: 22px; height: 22px; }

.nav-close {
  display: none;
}

/* 1040px (was 960px, was 860px): each nav link added since this site's
   header grew a logo mark has eaten into the desktop nav's room before
   overflowing. Adding "FAQ" was the latest — verified empirically (not
   computed) that the real failure point is ~980-1000px because the
   header's own horizontal padding is itself fluid (`clamp(...vw...)`),
   so there's real margin here, not just enough. Check with the browser
   at the actual failure width, not just a plausible-looking number,
   before ever lowering this again. */
@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 86vw);
    height: 100vh;
    background: var(--color-ivory-100);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1.25rem 1.5rem 2rem;
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
  }

  .primary-nav[data-open="true"] { transform: translateX(0); }

  .nav-close {
    display: flex;
    align-self: flex-end;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-border);
    background: var(--color-white);
    cursor: pointer;
    margin-bottom: 1.5rem;
  }

  .nav-close svg { width: 18px; height: 18px; }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
  }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-cta {
    margin-top: 1.5rem;
    width: 100%;
  }

  .nav-cta .btn { width: 100%; }

  .nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(18, 52, 48, 0.45);
    z-index: 90;
  }

  .nav-scrim[data-open="true"] { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--color-ivory-100);
  overflow: hidden;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Opacity verified against the real hero photo's actual brightest
     regions (sampled, not guessed) so text stays WCAG AA-compliant
     wherever it lands, while still letting the photo read clearly. */
  background: linear-gradient(160deg, rgba(23, 46, 51, 0.85) 0%, rgba(34, 66, 74, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 42rem;
}

/* Solid ivory, not the maroon-400 used for this label elsewhere: against
   a real photo's variable brightness, maroon-400 fails contrast in the
   photo's brighter regions at any reasonable overlay opacity (verified),
   unlike against the flat dark backgrounds it's used on in other sections. */
.hero .eyebrow { color: var(--color-ivory-100); }
.hero h1 { color: var(--color-white); }

.hero-lead {
  font-size: 1.15rem;
  color: rgba(251, 248, 241, 0.88);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(251, 248, 241, 0.22);
}

.hero-stat dt {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ivory-100);
  margin-bottom: 0.35rem;
}

.hero-stat dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-white);
}

@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Pathways ---------- */
.pathways-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2rem);
}

@media (max-width: 780px) {
  .pathways-grid { grid-template-columns: 1fr; }
}

.pathway-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.pathway-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.pathway-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-ivory-200);
  color: var(--color-teal-800);
  margin-bottom: 1.25rem;
}

.pathway-icon svg { width: 26px; height: 26px; }

.pathway-card p { color: var(--color-charcoal-700); }

.pathway-card .btn { margin-top: auto; align-self: flex-start; }

.pathway-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--color-charcoal-700);
  background: var(--color-ivory-200);
  border-left: 3px solid var(--color-maroon-500);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---------- About ---------- */
.about-section { background: var(--color-ivory-200); }

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-copy p {
  color: var(--color-charcoal-700);
  font-size: 1.05rem;
}

.about-facts {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.about-facts li {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.98rem;
}

.about-facts strong {
  color: var(--color-teal-900);
  min-width: 9rem;
}

.about-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-teal-900);
  box-shadow: var(--shadow-md);
}

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

/* ---------- Amenities ---------- */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 980px) {
  .amenities-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .amenities-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .amenities-grid { grid-template-columns: 1fr; }
}

.amenity-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.amenity-card:hover {
  border-color: var(--color-maroon-500);
  transform: translateY(-2px);
}

.amenity-card svg {
  width: 30px;
  height: 30px;
  color: var(--color-teal-800);
}

.amenity-card span {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--color-charcoal-900);
}

/* ---------- Rentals feature ---------- */
.rentals-section {
  background: var(--color-teal-900);
  color: var(--color-ivory-100);
  border-radius: var(--radius-lg);
  margin-inline: clamp(1rem, 4vw, 2.5rem);
  padding: clamp(2.5rem, 6vw, 4rem);
}

.rentals-inner {
  max-width: var(--max-width);
  margin-inline: auto;
}

.rentals-section .eyebrow { color: var(--color-maroon-400); }
.rentals-section h2 { color: var(--color-white); }
.rentals-section h3 { color: var(--color-white); }
.rentals-section .section-lead { color: rgba(251, 248, 241, 0.85); }
.rentals-section a:not(.btn) { color: var(--color-maroon-400); }
.rentals-section a:not(.btn):hover { color: var(--color-ivory-100); }

.rentals-steps {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  counter-reset: step;
}

@media (max-width: 780px) {
  .rentals-steps { grid-template-columns: 1fr; }
}

.rentals-steps li {
  counter-increment: step;
  background: rgba(251, 248, 241, 0.06);
  border: 1px solid rgba(251, 248, 241, 0.18);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.rentals-steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-maroon-400);
  color: var(--color-teal-900);
  font-weight: 700;
  font-family: var(--font-serif);
  margin-bottom: 0.9rem;
}

.rentals-steps p {
  margin: 0;
  color: rgba(251, 248, 241, 0.85);
  font-size: 0.96rem;
}

.rentals-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

.rentals-section .pathway-note {
  background: rgba(251, 248, 241, 0.08);
  color: rgba(251, 248, 241, 0.88);
  border-left-color: var(--color-maroon-400);
  margin-top: 1.75rem;
}

/* ---------- Location ---------- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: start;
}

@media (max-width: 860px) {
  .location-grid { grid-template-columns: 1fr; }
}

.location-address {
  font-style: normal;
  font-size: 1.05rem;
  color: var(--color-charcoal-700);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.location-address strong {
  display: block;
  color: var(--color-teal-900);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-ivory-200);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 44rem;
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.25rem 1.25rem;
}

.faq-item summary {
  padding: 1rem 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-teal-900);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--color-maroon-500);
  font-weight: 700;
}

.faq-item[open] summary::before { content: "\2212"; }

.faq-item p {
  margin: 0 0 1.1rem;
  padding-left: 1.2em;
  color: var(--color-charcoal-700);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-teal-900);
  color: rgba(251, 248, 241, 0.85);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(251, 248, 241, 0.18);
}

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

.site-footer h2 {
  color: var(--color-white);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.footer-address {
  font-style: normal;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-links a { color: rgba(251, 248, 241, 0.9); }
.footer-links a:hover { color: var(--color-maroon-400); }

.footer-disclaimer {
  font-size: 0.88rem;
  color: rgba(251, 248, 241, 0.7);
  max-width: 60ch;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(251, 248, 241, 0.6);
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}

/* Mirrors the stacked wordmark used on donzjaan.in itself (bold name,
   small tracked-out "tech" beneath it) rather than a plain text link,
   recolored to this site's own teal/ivory/maroon system so the credit
   sits naturally in the footer instead of importing their palette. */
.footer-credit-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1em;
  line-height: 1;
  text-decoration: none;
}

.footer-credit-name {
  font-weight: 700;
  color: rgba(251, 248, 241, 0.9);
}

.footer-credit-tech {
  font-size: 0.7em;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--color-maroon-400);
}

.footer-credit-brand:hover .footer-credit-name { color: var(--color-maroon-400); }
.footer-credit-brand:hover .footer-credit-tech { color: rgba(251, 248, 241, 0.9); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
