/* ============================================================
   Thornbury Mews — Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #C41230;
  --red-dark:   #9E0E26;
  --black:      #111111;
  --dark:       #1E1E1E;
  --charcoal:   #2D2D2D;
  --gray:       #666666;
  --light-gray: #F4F4F2;
  --border:     #E0E0E0;
  --white:      #FFFFFF;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --nav-h: 80px;
  --max-w: 1200px;
  --section-pad: 100px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; }

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

.lead {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.8;
}

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

.section { padding: var(--section-pad) 0; }
.section--dark { background: var(--dark); color: var(--white); }
.section--light { background: var(--light-gray); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header p {
  max-width: 620px;
  margin: 1rem auto 0;
  color: var(--gray);
}
.section--dark .section-header p { color: rgba(255,255,255,0.65); }

/* ── Divider ── */
.divider {
  width: 48px;
  height: 2px;
  background: var(--red);
  margin: 1.2rem auto;
}
.divider--left { margin-left: 0; }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}

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

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

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-nav.transparent { background: transparent; }
.site-nav.scrolled {
  background: var(--white);
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo img {
  height: 48px;
  width: auto;
  transition: opacity 0.25s;
}
.nav-logo .logo-white { display: block; }
.nav-logo .logo-dark  { display: none; }

.site-nav.scrolled .nav-logo .logo-white { display: none; }
.site-nav.scrolled .nav-logo .logo-dark  { display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.9);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

.site-nav.scrolled .nav-links a { color: var(--charcoal); }
.site-nav.scrolled .nav-links a:hover { color: var(--red); }

.nav-links .btn-nav {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 22px;
  background: var(--red);
  color: var(--white) !important;
  transition: background 0.25s;
}
.nav-links .btn-nav:hover { background: var(--red-dark); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
  display: block;
}
.site-nav.scrolled .nav-hamburger span { background: var(--dark); }

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--white);
  padding: 24px 40px 32px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 999;
  flex-direction: column;
  gap: 8px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav-mobile a:hover { color: var(--red); }
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile .btn-nav-mobile {
  margin-top: 8px;
  background: var(--red);
  color: var(--white) !important;
  text-align: center;
  padding: 14px;
  border: none;
}

/* ── Footer ── */
.site-footer {
  background: var(--black);
  color: rgba(255,255,255,0.75);
  padding: 70px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand img { height: 44px; margin-bottom: 20px; }
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.55);
  max-width: 280px;
}

.footer-col h5 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--red); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.35); }
.footer-bottom a:hover { color: var(--red); }

/* ── Hero ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--black);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.45) 60%,
    rgba(0,0,0,0.7) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 760px;
}

.hero-content .eyebrow { color: rgba(255,255,255,0.8); }

.hero-content h1 {
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  margin-bottom: 1.2rem;
}

.hero-content .lead {
  color: rgba(255,255,255,0.8);
  max-width: 520px;
  margin-bottom: 2.4rem;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,0.4);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Feature Cards ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
}

.feature-card {
  background: var(--white);
  padding: 50px 40px;
  transition: background 0.25s;
}
.feature-card:hover { background: var(--light-gray); }

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  color: var(--red);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.75;
}

/* ── Photo Grid ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.photo-grid-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}
.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.photo-grid-item:hover img { transform: scale(1.05); }

.photo-grid-item.tall { grid-row: span 2; aspect-ratio: auto; }

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.photo-overlay svg {
  color: var(--white);
  opacity: 0;
  transition: opacity 0.3s;
  width: 40px; height: 40px;
}
.photo-grid-item:hover .photo-overlay { background: rgba(0,0,0,0.35); }
.photo-grid-item:hover .photo-overlay svg { opacity: 1; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 52px; height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

/* ── Floor Plan Cards ── */
.floorplan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.floorplan-card {
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.floorplan-card:hover { box-shadow: 0 8px 40px rgba(0,0,0,0.1); }

.floorplan-card-img {
  background: var(--light-gray);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.floorplan-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}

.floorplan-card-body { padding: 32px; }
.floorplan-card-body h3 { margin-bottom: 16px; }

.floorplan-specs {
  display: flex;
  gap: 24px;
  margin: 20px 0;
  font-size: 0.88rem;
}
.spec-item { display: flex; flex-direction: column; gap: 2px; }
.spec-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
}
.spec-value { font-weight: 600; font-size: 1rem; }

/* ── Features & Finishes ── */
.finishes-section {
  margin-bottom: 60px;
}
.finishes-section h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.finishes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.finishes-list li {
  padding: 14px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--charcoal);
}
.finishes-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}

/* ── Pricing Table ── */
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.pricing-table th {
  background: var(--dark);
  color: var(--white);
  padding: 16px 20px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pricing-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:hover { background: var(--light-gray); }
.pricing-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.015); }
.pricing-table tbody tr:nth-child(even):hover { background: var(--light-gray); }

.price-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
}
.badge-available {
  display: inline-block;
  padding: 3px 10px;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}
.badge-sold {
  display: inline-block;
  padding: 3px 10px;
  background: #fce4ec;
  color: #c62828;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}
.badge-hold {
  display: inline-block;
  padding: 3px 10px;
  background: #fff8e1;
  color: #f57f17;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
}

/* ── Form ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--dark);
  border: 1px solid var(--border);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  border-radius: 0;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--red);
}
textarea { resize: vertical; min-height: 120px; }

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-note {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 12px;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  height: 420px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--dark);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 100%);
  z-index: 1;
}
.page-hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding-bottom: 56px;
}
.page-hero-content h1 { color: var(--white); margin-bottom: 0.5rem; }
.page-hero-content .lead { color: rgba(255,255,255,0.75); margin: 0; }

/* ── Stats Strip ── */
.stats-strip {
  background: var(--red);
  padding: 48px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stat-item {
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,0.2);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--white);
  display: block;
}
.stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin-top: 6px;
  display: block;
}

/* ── Map / Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-info { }
.contact-info-item {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}
.contact-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--red);
}
.contact-icon svg { width: 20px; height: 20px; }
.contact-info-item h4 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 4px;
}
.contact-info-item p { font-size: 0.95rem; color: var(--dark); }
.contact-info-item a { color: var(--dark); }
.contact-info-item a:hover { color: var(--red); }

/* ── CTA Banner ── */
.cta-banner {
  background: var(--black);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: 'MEWS';
  position: absolute;
  font-family: var(--font-serif);
  font-size: 20vw;
  color: rgba(255,255,255,0.02);
  font-weight: 700;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.6); max-width: 500px; margin: 0 auto 2.5rem; }

/* ── Siteplan ── */
.siteplan-wrapper {
  background: var(--light-gray);
  border: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
}
.siteplan-wrapper img { max-width: 100%; }
.siteplan-wrapper iframe {
  width: 100%;
  height: 700px;
  border: none;
}

/* ── Page utility ── */
.mt-push { margin-top: var(--nav-h); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --section-pad: 70px; }
  .container { padding: 0 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,0.2); }
  .stat-item:nth-child(4) { border-right: none; }
}

@media (max-width: 768px) {
  :root { --section-pad: 56px; --nav-h: 68px; }
  .container { padding: 0 20px; }

  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .features-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid-item.tall { grid-row: span 1; aspect-ratio: 4/3; }
  .floorplan-grid { grid-template-columns: 1fr; }
  .finishes-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .pricing-table { font-size: 0.78rem; }
  .pricing-table th,
  .pricing-table td { padding: 12px 10px; }
}
