/* ==========================================================================
   Front page (index.html)
   Editorial look: big serif headlines, warm grays, rounded photo cards.
   ========================================================================== */

/* Playfair Display, saved with the site (free font, license in fonts/OFL.txt) */
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #141413;
  --ink-soft: #4b4a46;
  --ink-faint: #7a7973;
  --paper: #ebeae7;        /* light sections */
  --paper-2: #d9d8d1;      /* darker warm-gray sections and cards */
  --card: #dcdbd4;
  --card-on-alt: #ecebe8;
  --white: #ffffff;
  --accent: #d93f3f;       /* the map's "still open" red */
  --radius: 22px;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 24px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: #f1f0ec; }
.btn-outline { color: var(--white); border-color: rgba(255, 255, 255, 0.7); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }
.btn-dark { background: var(--ink); color: var(--white); border-radius: 999px; padding: 13px 26px; }
.btn-dark:hover { background: #33322f; }
.btn-dark:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Floating navigation bar ---------- */
.nav {
  position: fixed;
  z-index: 50;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 22px;
  background: rgba(232, 231, 227, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 15px;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
}
.nav-links a:hover { background: rgba(0, 0, 0, 0.06); }
.nav-links .nav-cta {
  margin-left: 6px;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
}
.nav-links .nav-cta:hover { background: #33322f; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  background: none;
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.nav.open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: #2c2d2b; /* shown until (or if) the photo loads */
  overflow: hidden;
}
.hero-photo, .hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo img { object-fit: cover; }
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.72) 100%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: end;
  padding-top: 160px;
  padding-bottom: 88px;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero-side p { font-size: 18px; line-height: 1.6; margin: 0 0 28px; color: rgba(255, 255, 255, 0.92); }
.hero-stats { display: grid; grid-template-columns: repeat(2, max-content); gap: 28px; margin: 0; }
.hero-stats div { border-left: 2px solid rgba(255, 255, 255, 0.5); padding-left: 14px; }
.hero-stats dt { font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.hero-stats dd { margin: 4px 0 0; font-size: 14px; color: rgba(255, 255, 255, 0.82); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; background: var(--paper); }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head h2, .about h2, .contact-form h2 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.08; }
.section-head p { font-size: 18px; line-height: 1.65; color: var(--ink-soft); margin: 22px 0 0; }

/* Photo spots: a soft gradient shows if a photo is missing */
.feature-photo, .borough-photo, .about-photo, .contact-photo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #c3c0b6, #8e8b83);
}
.feature-photo img, .borough-photo img, .about-photo img, .contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Feature cards (photo left, text right) ---------- */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 250px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.09); }
.feature-text { padding: 34px 32px; display: flex; flex-direction: column; justify-content: center; }
.feature h3 { font-size: 23px; margin-bottom: 10px; }
.feature p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.more { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- Borough cards (photo top, text below) ---------- */
.borough-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}
.borough { grid-column: span 2; }
.borough:nth-child(4) { grid-column: 2 / span 2; } /* center the bottom row of two */
.borough {
  display: flex;
  flex-direction: column;
  background: var(--card-on-alt);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.borough:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.09); }
.borough-photo { aspect-ratio: 4 / 3; }
.borough-text { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.borough h3 { font-size: 26px; }
.borough-stat { font-size: 15px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.borough-stat strong { color: var(--ink); font-weight: 600; }
.borough .more { margin-top: auto; padding-top: 8px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
details { border-top: 1px solid rgba(0, 0, 0, 0.12); }
details:last-child { border-bottom: 1px solid rgba(0, 0, 0, 0.12); }
summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 24px 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
details p { margin: -6px 0 24px; font-size: 16px; line-height: 1.65; color: var(--ink-soft); max-width: 60ch; }
details a { color: var(--ink); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-photo { aspect-ratio: 1 / 1; border-radius: var(--radius); }
.about p { font-size: 18px; line-height: 1.7; color: var(--ink-soft); margin: 24px 0 0; }
.about .about-note { font-size: 14px; color: var(--ink-faint); }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--paper-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-form { padding: 64px 64px 56px; display: flex; flex-direction: column; gap: 18px; }
.contact-form h2 { margin-bottom: -6px; }
.contact-sub { margin: 0 0 6px; font-size: 17px; color: var(--ink-soft); }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 500; }
.contact-form input, .contact-form textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #ecebe7;
  border: 1.5px solid #6d6c66;
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--ink); background: #f4f3f0; }
.contact-form .btn { align-self: flex-start; margin-top: 6px; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-photo { min-height: 420px; }
.form-msg { margin: 0; font-size: 15px; padding: 12px 14px; border-radius: 10px; }
.form-msg.ok { background: #e3f5f2; color: #0b6b63; }
.form-msg.error { background: #fdecec; color: #b42318; }

/* ---------- Footer ---------- */
.footer { background: var(--paper); padding: 36px 0 44px; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; align-items: center; gap: 22px; }
.footer-links a { font-size: 15px; text-decoration: none; color: var(--ink-soft); display: inline-flex; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Smaller screens ---------- */
@media (max-width: 1020px) {
  .nav-links a:not(.nav-cta) { padding: 8px 8px; font-size: 14px; }
  .feature { grid-template-columns: 1fr; }
  .feature-photo { aspect-ratio: 16 / 9; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: rgba(240, 239, 235, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a, .nav-links a:not(.nav-cta) { font-size: 16px; padding: 12px 14px; }
  .nav-links .nav-cta { margin: 6px 0 0; text-align: center; }

  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-bottom: 64px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .feature-grid, .faq-grid, .about { grid-template-columns: 1fr; }
  .about { gap: 32px; }
  .borough-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .borough, .borough:nth-child(4) { grid-column: auto; }
  .borough:last-child { grid-column: 1 / -1; }
  .contact { grid-template-columns: 1fr; }
  .contact-photo { min-height: 260px; order: -1; }
  .contact-form { padding: 36px 24px; }
}

@media (max-width: 520px) {
  .container { padding: 0 16px; }
  .nav { width: calc(100% - 20px); top: 10px; padding-left: 16px; }
  .borough-grid { grid-template-columns: 1fr; }
  .borough:last-child { grid-column: auto; }
  .hero-stats { gap: 18px; }
  .hero-stats dt { font-size: 28px; }
  .hero-stats dd { font-size: 13px; }
  summary { font-size: 19px; }
}
