/* ============================================
   Bartlett House — Coastal Lodging, Corea, ME
   Clean minimalist · Emerald + Cream
   ============================================ */

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

:root {
  --emerald: #1B5E3B;
  --emerald-dark: #144A2E;
  --emerald-light: #237A4D;
  --cream: #F5F0E8;
  --cream-light: #FAF7F2;
  --cream-dark: #E8E0D0;
  --ink: #1A1A1A;
  --ink-light: #4A4A4A;
  --ink-faint: #8A8A8A;
  --white: #FFFFFF;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;
  --radius: 4px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--emerald);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--emerald-light);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--emerald);
  color: var(--white);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  z-index: 1000;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.section-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: var(--space-md);
  color: var(--ink);
}

.section-desc {
  font-size: 1.1rem;
  color: var(--ink-light);
  max-width: 560px;
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--emerald);
  color: var(--white);
  border-color: var(--emerald);
}

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

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

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

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 0.9375rem;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) 0;
  transition: all var(--transition);
}

.site-header.scrolled {
  background: rgba(245, 240, 232, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(27, 94, 59, 0.1);
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition);
}

.site-header.scrolled .logo {
  color: var(--emerald);
}

.logo svg {
  flex-shrink: 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.main-nav a {
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--transition);
}

.main-nav a:hover::after {
  width: 100%;
}

.main-nav a:hover {
  color: var(--white);
}

.site-header.scrolled .main-nav a {
  color: var(--ink-light);
}

.site-header.scrolled .main-nav a:hover {
  color: var(--emerald);
}

.nav-cta {
  background: var(--white);
  color: var(--emerald) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all var(--transition) !important;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: var(--cream) !important;
  transform: translateY(-1px);
}

.site-header.scrolled .nav-cta {
  background: var(--emerald);
  color: var(--white) !important;
}

.site-header.scrolled .nav-cta:hover {
  background: var(--emerald-dark);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: all var(--transition);
  transform-origin: center;
}

.site-header.scrolled .nav-toggle-line {
  background: var(--emerald);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 30, 18, 0.45) 0%,
    rgba(10, 30, 18, 0.55) 50%,
    rgba(10, 30, 18, 0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-md);
  max-width: 800px;
  margin-top: 4rem;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-md);
}

.hero-headline {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: var(--space-md);
  max-width: 720px;
}

.hero-sub {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* --- About --- */
.about {
  padding: var(--space-2xl) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.about-text p {
  color: var(--ink-light);
  margin-bottom: var(--space-sm);
  font-size: 1rem;
  line-height: 1.85;
}

.about-stats {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--cream-dark);
}

.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--emerald);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  line-height: 1.4;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--cream-dark);
  flex-shrink: 0;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
  transition: transform 0.6s ease;
}

.about-image:hover img {
  transform: scale(1.02);
}

/* --- Rooms --- */
.rooms {
  padding: var(--space-2xl) 0;
  background: var(--cream);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-header .section-desc {
  margin: 0 auto;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.room-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(27, 94, 59, 0.1);
}

.room-card-img {
  overflow: hidden;
  aspect-ratio: 16/11;
}

.room-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.room-card:hover .room-card-img img {
  transform: scale(1.05);
}

.room-card-body {
  padding: var(--space-md);
}

.room-card-title {
  font-size: 1.375rem;
  margin-bottom: 0.5rem;
}

.room-card-desc {
  font-size: 0.9375rem;
  color: var(--ink-light);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
}

.room-amenities {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem var(--space-sm);
}

.room-amenities li {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  padding: 0.25rem 0;
  position: relative;
}

.room-amenities li::before {
  content: '·';
  color: var(--emerald);
  margin-right: 0.375rem;
  font-weight: 500;
}

.rooms-note {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--ink-faint);
  font-style: italic;
}

/* --- Location --- */
.location {
  padding: var(--space-2xl) 0;
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.location-text p {
  color: var(--ink-light);
  margin-bottom: var(--space-sm);
  font-size: 1rem;
  line-height: 1.85;
}

.location-details {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.location-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.location-detail svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--emerald);
}

.location-detail strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.125rem;
}

.location-detail span,
.location-detail a {
  font-size: 0.9375rem;
  color: var(--ink-light);
}

.location-detail a:hover {
  color: var(--emerald);
  text-decoration: underline;
}

.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  aspect-ratio: 4/3;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
}

/* --- Why --- */
.why {
  padding: var(--space-2xl) 0;
  background: var(--emerald);
}

.why .section-eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.why .section-title {
  color: var(--white);
}

.why .section-header {
  margin-bottom: var(--space-lg);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.why-card {
  padding: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.why-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.why-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-sm);
}

.why-card-title {
  font-size: 1.125rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
}

/* --- CTA Banner --- */
.cta-banner {
  position: relative;
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.cta-bg {
  position: absolute;
  inset: 0;
}

.cta-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.cta-eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.cta-title {
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.cta-desc {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.cta-desc a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-desc a:hover {
  color: var(--cream);
}

/* --- Contact --- */
.contact {
  padding: var(--space-2xl) 0;
  background: var(--cream);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.contact-info p {
  color: var(--ink-light);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: var(--space-md);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.contact-detail svg {
  flex-shrink: 0;
  margin-top: 0.2rem;
  color: var(--emerald);
}

.contact-detail strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.125rem;
}

.contact-detail span,
.contact-detail a {
  font-size: 0.9375rem;
  color: var(--ink-light);
}

.contact-detail a:hover {
  color: var(--emerald);
  text-decoration: underline;
}

/* Form */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.form-group {
  margin-bottom: var(--space-sm);
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--cream-light);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(27, 94, 59, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--ink-faint);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--ink-faint);
  margin-top: var(--space-sm);
}

.form-success {
  text-align: center;
  padding: var(--space-lg);
}

.form-success svg {
  color: var(--emerald);
  margin: 0 auto var(--space-sm);
}

.form-success p {
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.7;
}

/* --- Footer --- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand .logo {
  color: var(--white);
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 320px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.footer-nav a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.footer-contact a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-bottom {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rooms-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rooms-grid .room-card:last-child {
    grid-column: span 2;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--cream-light);
    padding: 5rem var(--space-md) var(--space-lg);
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .main-nav a {
    color: var(--ink-light) !important;
    font-size: 1rem;
  }

  .main-nav a:hover {
    color: var(--emerald) !important;
  }

  .nav-cta {
    background: var(--emerald) !important;
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
  }

  .hero-content {
    margin-top: 2rem;
  }

  .hero-headline {
    font-size: clamp(1.75rem, 7vw, 2.75rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .about-grid,
  .location-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .about-image {
    order: -1;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .rooms-grid .room-card:last-child {
    grid-column: span 1;
    max-width: 100%;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .contact-form-wrap {
    padding: var(--space-md);
  }

  .hero-scroll {
    display: none;
  }
}
