:root {
  color-scheme: light;
  --charcoal: #1d1f21;
  --cream: #f8f7f5;
  --gold: #c1a57b;
  --slate: #2a3f55;
  --white: #ffffff;
  --muted: #6b7280;
  --shadow: 0 18px 40px rgba(29, 31, 33, 0.15);
  --radius: 18px;
  --transition: 200ms ease;
}

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

body {
  margin: 0;
  font-family: "Montserrat", "Open Sans", Arial, sans-serif;
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.6;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", "Lora", Georgia, serif;
  color: var(--charcoal);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(42, 63, 85, 0.2);
  background: var(--white);
  font-size: 1rem;
  transition: border var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(193, 165, 123, 0.2);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.container {
  width: min(1120px, 90%);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-compact {
  padding: 3.5rem 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.muted {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--charcoal);
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(193, 165, 123, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
}

.btn-dark {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--cream);
}

.tag {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(193, 165, 123, 0.15);
  color: var(--slate);
  font-weight: 600;
  font-size: 0.85rem;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 245, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(29, 31, 33, 0.08);
}

.header.is-scrolled {
  box-shadow: 0 12px 20px rgba(29, 31, 33, 0.08);
}

.topbar {
  background: var(--charcoal);
  color: var(--cream);
  font-size: 0.85rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.topbar-links,
.topbar-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar a {
  color: var(--cream);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--charcoal);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--slate);
}

.nav-links a.nav-link-gold {
  background: var(--gold);
  color: var(--white);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}

.nav-links a.nav-link-gold:hover {
  background: var(--gold);
  color: var(--white);
  opacity: 0.92;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.owner-portal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--charcoal);
  font-weight: 600;
  text-decoration: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  min-width: 48px;
}

.owner-portal-link.btn {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.owner-portal-link.btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
  opacity: 0.9;
}

.owner-portal-link svg {
  flex-shrink: 0;
}

.owner-portal-link.btn .owner-portal-text {
  display: none;
}

.owner-portal-text {
  display: none;
}

.owner-portal-line {
  display: block;
  white-space: nowrap;
}

.mobile-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.5rem;
}

.hero {
  position: relative;
  padding: 6rem 0;
  background: url("https://images.unsplash.com/photo-1505691938895-1758d7feb511?auto=format&fit=crop&w=1800&q=80")
    center/cover no-repeat;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(29, 31, 33, 0.75),
    rgba(42, 63, 85, 0.4)
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.hero h1 {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  color: var(--cream);
}

.hero .eyebrow,
.hero .muted {
  color: rgba(248, 247, 245, 0.82);
}

.hero .btn-outline {
  color: var(--cream);
  border-color: rgba(248, 247, 245, 0.7);
  background: transparent;
}

.hero .btn-outline:hover {
  box-shadow: 0 12px 24px rgba(248, 247, 245, 0.18);
}

.hero-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card h3,
.hero-card p,
.hero-card li {
  color: var(--charcoal);
}

.hero-card .muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1.8rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 16px 30px rgba(29, 31, 33, 0.08);
}

.section-light {
  background: var(--white);
}

.image-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(29, 31, 33, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.image-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.image-card-content {
  padding: 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.plugin-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 16px 30px rgba(29, 31, 33, 0.08);
  display: grid;
  gap: 1rem;
}

.plugin-form {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.review-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.review-item {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(42, 63, 85, 0.08);
}

.review-text {
  margin: 0 0 0.5rem 0;
  color: var(--slate);
  font-size: 0.9rem;
  line-height: 1.6;
  font-style: italic;
}

.review-author {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

details.service-detail {
  padding: 0;
  overflow: hidden;
}

details.service-detail summary {
  list-style: none;
  cursor: pointer;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: "Playfair Display", "Lora", Georgia, serif;
  font-size: 1.1rem;
}

details.service-detail summary::-webkit-details-marker {
  display: none;
}

details.service-detail .service-body {
  padding: 0 2rem 2rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(193, 165, 123, 0.15);
  color: var(--slate);
  font-weight: 700;
  margin-bottom: 1rem;
}

.process {
  display: grid;
  gap: 2rem;
}

.timeline {
  display: grid;
  gap: 1.5rem;
}

.timeline-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.4rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px rgba(29, 31, 33, 0.06);
}

.timeline-step {
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--slate);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.stats {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat {
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  text-align: left;
  border: 1px solid rgba(29, 31, 33, 0.06);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--slate);
}

.testimonial-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 400ms ease;
}

.carousel-item {
  min-width: 100%;
  padding: 0 0.5rem;
}

.carousel-controls {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.carousel-btn {
  border: 1px solid rgba(29, 31, 33, 0.2);
  background: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.cta-band {
  background: var(--slate);
  color: var(--cream);
  padding: 3rem;
  border-radius: var(--radius);
  display: grid;
  gap: 1rem;
}

.cta-band h2,
.cta-band p {
  color: var(--cream);
}

.footer {
  background: var(--charcoal);
  color: var(--cream);
  padding: 3.5rem 0 2rem;
}

.footer a {
  color: var(--cream);
}

.footer-links,
.social-links {
  display: grid;
  gap: 0.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer small {
  color: rgba(248, 247, 245, 0.6);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(248, 247, 245, 0.2);
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
  font-size: 0.9rem;
}

.newsletter-form input::placeholder {
  color: var(--muted);
}

.newsletter-form .newsletter-btn {
  border-color: var(--gold);
  color: var(--gold);
  background: transparent;
}

.newsletter-form .newsletter-btn:hover {
  background: var(--gold);
  color: var(--charcoal);
  border-color: var(--gold);
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-message {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(42, 63, 85, 0.12);
  color: var(--slate);
  display: none;
}

.form-message.is-visible {
  display: block;
}

[data-properties-empty] {
  display: none;
}

[data-properties-empty].is-visible {
  display: block;
}

@media (max-width: 700px) {
  .plugin-form {
    grid-template-columns: 1fr;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease, transform 400ms ease;
}

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

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    inset: 0 0 0 35%;
    background: var(--cream);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

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

  .nav-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 900px) {
  .timeline {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 4rem 0;
  }

  .cta-band {
    padding: 2rem;
  }
}

/* Lightbox for T&Cs */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29, 31, 33, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox-content {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 36rem;
  max-height: 85vh;
  overflow: auto;
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  position: relative;
}
.lightbox-content h3 { margin-top: 0; }
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0.25rem;
  line-height: 1;
}
.lightbox-close:hover { color: var(--charcoal); }
.lightbox-content .muted { font-size: 0.9rem; }

/* Portal file viewer (documents & statements) */
.file-viewer-overlay {
  padding: 1rem;
}
.file-viewer-panel {
  background: var(--white);
  border-radius: var(--radius);
  width: min(920px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  position: relative;
  padding: 1.25rem 1.25rem 1rem;
}
.file-viewer-title {
  margin: 0 2.5rem 0.75rem 0.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.35;
}
.file-viewer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: rgba(29, 31, 33, 0.04);
  border-radius: 8px;
}
.file-viewer-body iframe {
  width: 100%;
  height: min(75vh, 720px);
  min-height: 360px;
  border: none;
  display: block;
  background: #fff;
}
.file-viewer-body img {
  display: block;
  max-width: 100%;
  max-height: min(75vh, 720px);
  margin: 0 auto;
  height: auto;
}
.file-viewer-footer {
  margin-top: 1rem;
  text-align: right;
}

.form-checkbox-wrap { display: flex; align-items: flex-start; gap: 0.5rem; margin: 1rem 0; }
.form-checkbox-wrap input[type="checkbox"] { width: auto; margin-top: 0.25rem; }
.form-checkbox-wrap label { margin-bottom: 0; font-weight: 500; }
.form-message { margin-bottom: 1rem; padding: 0.75rem; border-radius: 12px; display: none; }
.form-message.show { display: block; }
.form-message.success { background: rgba(34, 197, 94, 0.15); color: #166534; }
.form-message.error { background: rgba(239, 68, 68, 0.15); color: #991b1b; }

