/* OF & H PROPERTIES LTD - custom styles (plain CSS, used alongside the Tailwind CDN) */

:root {
  --primary: #1F3A5F;
  --accent: #C8963E;
  --accent-light: #DDB879;
  --dark: #15202B;
  --light: #F7F5F0;
  --body: #3A4350;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--dark);
  color: var(--light);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

main:focus { outline: none; }

/* Focus states */
.focus-ring:focus-visible,
.nav-link:focus-visible,
.mobile-link:focus-visible,
.text-link:focus-visible,
.close-btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.focus-ring-light:focus-visible,
.footer-link:focus-visible,
.legal-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Navigation */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 9999px;
  color: var(--dark);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background-color: rgba(31, 58, 95, 0.08); color: var(--primary); }

.mobile-link {
  display: block;
  padding: 0.85rem 0.5rem;
  border-radius: 0.5rem;
  color: var(--dark);
  border-bottom: 1px solid rgba(31, 58, 95, 0.08);
}
li:last-child > .mobile-link { border-bottom: 0; }
.mobile-link:hover { background-color: rgba(31, 58, 95, 0.06); }

/* Section eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: var(--accent);
}

/* Service cards */
.card {
  height: 100%;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(31, 58, 95, 0.12);
  background: var(--light);
  line-height: 1.7;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: rgba(200, 150, 62, 0.55);
  box-shadow: 0 12px 30px -18px rgba(21, 32, 43, 0.45);
  transform: translateY(-2px);
}
.card-title {
  margin-bottom: 0.6rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--dark);
}
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1.25rem;
  border-radius: 0.9rem;
  background: var(--primary);
  color: var(--accent-light);
}
.icon-wrap.mb-0 { margin-bottom: 0; }

.point-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: 0.1rem;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--accent-light);
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}
.text-link:hover { color: var(--dark); }

/* Footer */
.footer-link { color: rgba(247, 245, 240, 0.85); border-radius: 0.25rem; }
.footer-link:hover { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }

.legal-btn {
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(247, 245, 240, 0.3);
  border-radius: 9999px;
  color: var(--light);
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.legal-btn:hover { background-color: rgba(247, 245, 240, 0.08); border-color: var(--accent); }

/* Legal dialogs */
.legal-dialog {
  width: min(46rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  background: #ffffff;
  color: var(--body);
  box-shadow: 0 30px 80px -20px rgba(21, 32, 43, 0.6);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.legal-dialog::backdrop {
  background: rgba(21, 32, 43, 0.7);
}
.legal-dialog > div:first-child {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #ffffff;
}
.close-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  color: var(--dark);
  background: var(--light);
  cursor: pointer;
}
.close-btn:hover { background: #ECE8DF; }

.legal-body { line-height: 1.7; }
.legal-body h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--dark);
}
.legal-body p + p { margin-top: 0.75rem; }
.legal-body ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.legal-body ul + p { margin-top: 0.75rem; }
.legal-body li + li { margin-top: 0.35rem; }

body.modal-open { overflow: hidden; }

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