/* Mare Properties Management
   Palette: black / charcoal / white / muted gold
   Display: Playfair Display    Body: Source Sans 3 */

:root {
  --ink: #161616;
  --charcoal: #2a2a2a;
  --muted: #5c574e;
  --paper: #ffffff;
  --cream: #f7f4ef;
  --sand: #ebe6dc;
  --line: #e2dcd2;
  --accent: #8a6a32;
  --accent-deep: #7a5e2a;
  --accent-hover: #634c22;
  --accent-soft: #c4a56a;
  --focus: #8a6a32;
  --shadow: 0 14px 36px rgba(22, 22, 22, 0.08);
  --radius: 14px;
  --header-h: 4.4rem;
  --max: 70rem;
  --font-serif: "Playfair Display", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-underline-offset: 0.16em; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4.5rem;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 1rem;
  font-weight: 600;
  border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.logo:hover { color: var(--ink); }

.logo-mark {
  flex: 0 0 auto;
  width: 2.55rem;
  height: 2.55rem;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bars {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  position: relative;
  border: 0;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.98rem;
}
.site-nav a:hover { color: var(--accent); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-apply {
  background: var(--accent-deep);
  color: #fff !important;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  box-shadow: none !important;
}
.nav-apply:hover { background: var(--accent-hover); color: #fff !important; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 1.2;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover { background: var(--charcoal); color: #fff; }

.btn-gold {
  background: var(--accent-deep);
  color: #fff;
}
.btn-gold:hover { background: var(--accent-hover); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-gold-outline {
  background: transparent;
  color: var(--accent-deep);
  border-color: var(--accent-deep);
}
.btn-gold-outline:hover {
  background: var(--accent-deep);
  color: #fff;
}

.lease-note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.4rem;
  margin-bottom: 1.25rem;
}

.lease-note p:not(.eyebrow) {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 40rem;
}

.lease-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.15rem;
}

.lease-download {
  font-weight: 650;
  font-size: 0.98rem;
  color: var(--accent-deep);
  text-underline-offset: 0.18em;
}
.lease-download:hover { color: var(--accent-hover); }

.footer-lease {
  display: inline-block;
  margin-top: 0.45rem;
  color: #fff;
  font-weight: 650;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.footer-lease:hover { color: var(--accent-soft); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin: 0.45rem 0 0;
}
.footer-links .footer-lease { margin-top: 0; }

.portal-section { background: var(--cream); padding-top: 2.5rem; }

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.portal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.85rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  min-height: 22rem;
}

.portal-card h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  color: var(--ink);
}

.portal-card > p { margin: 0 0 1.15rem; color: var(--muted); }

.portal-card .btn { align-self: flex-start; }

.portal-note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.emergency-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-deep);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.4rem;
  margin-bottom: 1.5rem;
}

.emergency-box h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.45rem;
  margin: 0 0 0.45rem;
  color: var(--ink);
}

.emergency-box p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.emergency-box a { font-weight: 650; color: var(--ink); }
.phone-link { white-space: nowrap; }
.emergency-box a:hover { color: var(--accent); }

.portal-more {
  margin: 0;
  color: var(--muted);
}

.portal-more a {
  font-weight: 650;
  color: var(--accent-deep);
}
.portal-more a:hover { color: var(--accent-hover); }

.hero-actions,
.rental-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* ---------- Hero (homepage) ---------- */

.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.25rem 1.25rem 3.75rem;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 2.75rem 3.5rem;
}

.hero-logo img {
  width: 100%;
  max-width: 26rem;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.hero-copy h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  margin: 0 0 0.85rem;
  color: var(--ink);
}

.hero-lead {
  margin: 0 0 1.7rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.12rem;
}

/* ---------- Shared sections ---------- */

.section { padding: 4.5rem 1.25rem; }
.section-inner { max-width: var(--max); margin: 0 auto; }

.section h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  color: var(--ink);
}

.eyebrow {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-intro {
  margin: 0 0 2.4rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.12rem;
}

#services, #rentals, #contact, #apply {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

/* ---------- Services ---------- */

.services { background: var(--cream); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.7rem;
}

.service-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent-deep);
}

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.55rem;
  color: var(--ink);
}

.service-card p { margin: 0; color: var(--muted); }

.audience {
  display: inline-block;
  margin-bottom: 0.3rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Rentals ---------- */

.rentals { background: var(--paper); }

.rental-card {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery {
  background: var(--ink);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gallery-main {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: var(--ink);
  cursor: zoom-in;
  width: 100%;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  background: rgba(22, 22, 22, 0.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  pointer-events: none;
}

.thumbs {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  overflow-x: auto;
  background: var(--ink);
  scrollbar-width: thin;
}

.thumbs button {
  flex: 0 0 auto;
  width: 4.4rem;
  height: 3rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #000;
  opacity: 0.72;
}

.thumbs button img { width: 100%; height: 100%; object-fit: cover; }

.thumbs button[aria-current="true"],
.thumbs button:hover,
.thumbs button:focus-visible {
  opacity: 1;
  border-color: var(--accent-soft);
}

.rental-body {
  padding: 1.75rem 1.6rem 1.8rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rental-body h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  margin-bottom: 0.15rem;
}

.rental-price {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0.15rem 0 0.85rem;
  letter-spacing: -0.02em;
}
.rental-price span {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.specs li {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.facts {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem 1rem;
  color: var(--muted);
}

.facts li {
  padding-left: 1.05rem;
  position: relative;
}
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent-deep);
}

.view-label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.55rem;
}

.view-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.view-links a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
}
.view-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.also-listed {
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Contact ---------- */

.contact { background: var(--cream); }

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.4rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1.1rem;
}
.contact-item:hover { border-color: var(--accent); color: inherit; }

.contact-item span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact-item strong {
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 650;
}

/* ---------- Forms ---------- */

.inquiry-form,
.apply-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.55rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem 1.1rem;
}

.form-row, .form-span-2 { min-width: 0; }
.form-span-2 { grid-column: 1 / -1; }

.inquiry-form label,
.apply-form label,
.fieldset-legend {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.req { color: var(--accent-deep); }

.inquiry-form input,
.inquiry-form select,
.inquiry-form textarea,
.apply-form input,
.apply-form select,
.apply-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}

.apply-form textarea,
.inquiry-form textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.inquiry-form input:focus,
.inquiry-form select:focus,
.inquiry-form textarea:focus,
.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  outline: 3px solid var(--accent-soft);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-note {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.25rem;
  margin-top: 0.2rem;
}

.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
}

.radio-row input {
  width: auto;
  accent-color: var(--accent-deep);
}

.fieldset-plain {
  border: 0;
  margin: 0;
  padding: 0;
}

.hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.form-success {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent-deep);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  margin-bottom: 1.4rem;
}

.form-success h2 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.form-success p { margin: 0; color: var(--muted); }

.form-error {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem 1.2rem;
  margin-bottom: 1.4rem;
}

.form-error p { margin: 0; color: var(--muted); }

.apply-form .btn-gold {
  min-width: 14rem;
  padding: 0.9rem 1.6rem;
  font-size: 1.05rem;
}

/* ---------- Apply page intro ---------- */

.page-intro {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 2.75rem 1.25rem 2.5rem;
}

.page-intro h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.7rem;
  line-height: 1.15;
}

.page-intro .section-intro { margin-bottom: 0; }

.apply-section { background: var(--cream); padding-top: 2.5rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.86);
  padding: 2rem 1.25rem 2.2rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  text-decoration: none;
}
.footer-brand:hover { color: #fff; }

.footer-mark {
  width: 2.2rem;
  height: 2.2rem;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.footer-copy {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
}

.eho {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  max-width: 28rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
}
.eho svg { flex: 0 0 auto; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 10, 10, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.is-open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-inner img {
  max-height: min(80vh, 820px);
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
}

.lightbox button {
  font: inherit;
  font-weight: 650;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.22); }

.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

#lightbox-count {
  min-width: 4.5rem;
  text-align: center;
  font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-inner,
  .service-grid,
  .rental-card,
  .contact-grid,
  .form-grid,
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-card { min-height: 0; }

  .hero-inner { padding: 2.4rem 1.25rem 2.8rem; gap: 1.6rem; }
  .hero-logo img { max-width: 18rem; }
  .form-span-2 { grid-column: auto; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0 0.85rem;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open { display: flex; }

  .site-nav a { padding: 0.75rem 1.25rem; }
  .nav-apply {
    margin: 0.35rem 1.25rem 0.25rem;
    text-align: center;
    justify-content: center;
  }

  .section { padding: 3.25rem 1.1rem; }
  .rental-body { padding: 1.35rem 1.15rem 1.5rem; }
  .inquiry-form, .apply-form { padding: 1.2rem 1rem 1.3rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .page-intro { padding: 2rem 1.1rem 1.8rem; }
}

@media (min-width: 721px) {
  .site-nav { display: flex !important; }
}
