/* Allgreen5 Property Investments: small additions to Tailwind */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

main:focus,
section:focus {
  outline: none;
}

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

/* Hero background */
.hero {
  background-color: #17301F;
  background-image:
    radial-gradient(ellipse 60% 70% at 85% 10%, rgba(46, 125, 79, 0.55), transparent 70%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(201, 162, 39, 0.14), transparent 70%),
    linear-gradient(160deg, #17301F 0%, #1d3d28 55%, #17301F 100%);
}

/* Navigation */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #2F3A34;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover {
  color: #2E7D4F;
  background-color: #F4F8F3;
}
.nav-link:focus-visible,
.mobile-link:focus-visible,
.footer-link:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid #2E7D4F;
  outline-offset: 2px;
}

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #17301F;
  text-decoration: none;
}
.mobile-link:hover {
  background-color: #F4F8F3;
  color: #2E7D4F;
}

/* Section eyebrow */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2E7D4F;
}

/* Cards */
.card {
  border: 1px solid rgba(46, 125, 79, 0.15);
  border-radius: 1rem;
  background: #fff;
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(23, 48, 31, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: 0 12px 28px -12px rgba(23, 48, 31, 0.22);
  transform: translateY(-2px);
}
@media (min-width: 640px) {
  .card { padding: 2rem; }
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: #E3EFE6;
  color: #2E7D4F;
  box-shadow: inset 0 -2px 0 rgba(201, 162, 39, 0.55);
}

/* Key facts */
.fact {
  background: #fff;
  padding: 1.5rem;
}
.fact-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #56605B;
}
.fact-value {
  margin-top: 0.5rem;
  font-family: 'Fraunces', Georgia, Cambria, serif;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
  color: #17301F;
  overflow-wrap: anywhere;
}

/* Footer */
.footer-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 0.25rem;
}
.footer-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
footer .footer-link:focus-visible {
  outline-color: #C9A227;
}

/* Legal dialogs */
.legal-dialog {
  width: min(100% - 2rem, 44rem);
  max-height: min(85vh, 52rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: #2F3A34;
  box-shadow: 0 30px 60px -20px rgba(23, 48, 31, 0.45);
  overflow: hidden;
}
.legal-dialog::backdrop {
  background: rgba(23, 48, 31, 0.7);
}
.legal-dialog[open] {
  display: flex;
}
.legal-dialog__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: min(85vh, 52rem);
}
.legal-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(46, 125, 79, 0.15);
  background: #F4F8F3;
}
.legal-dialog__body {
  overflow-y: auto;
  padding: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.legal-dialog__body h3 {
  margin-top: 1.5rem;
  font-family: 'Fraunces', Georgia, Cambria, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #17301F;
}
.legal-dialog__body p + p,
.legal-dialog__body h3 + p {
  margin-top: 0.5rem;
}
.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 9999px;
  border: 0;
  background: transparent;
  color: #17301F;
  cursor: pointer;
}
.dialog-close:hover {
  background: #E3EFE6;
}

body.dialog-open {
  overflow: hidden;
}

/* Reduced motion */
@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;
  }
  .card:hover { transform: none; }
}
