/* Angie Scott — Florida reverse mortgage site
   Comfort-first design for 62+ audience: warm type, soft photos, clear hierarchy.
   Coastal palette: navy / sea / sand / palm — aligned with business card.
*/

:root {
  --navy: #0B3D5C;
  --navy-dark: #082C42;
  --sea: #3B82B5;
  --sea-light: #7DC4E0;
  --sand: #F5EDD9;
  --sand-cream: #FBF7EC;
  --palm: #5E8A64;
  --palm-deep: #476A4C;
  --charcoal: #2D2D2D;
  --warm-white: #FFFEF9;
  --coral-soft: #E8A598;
  --focus: #3B82B5;
  --error: #B45309;
  --error-bg: #FFF7ED;
  --success: #476A4C;
  --header-h: 4rem;
}

/* Display headings — warmer, more personal than pure sans */
.font-display,
h1, h2 {
  font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: -0.02em;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

/* Keep header brand + desktop nav on one line; prevent partial wrap */
header nav[aria-label="Primary"] {
  flex-wrap: nowrap;
}
header nav[aria-label="Primary"] > a {
  min-width: 0;
}
@media (min-width: 1024px) {
  #primaryMenu {
    flex-wrap: nowrap !important;
    flex-shrink: 0;
  }
  #primaryMenu a {
    white-space: nowrap;
  }
}

/* Focus rings for keyboard users (WCAG 2.2 AA) */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.35rem;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Skip link — always available when focused */
.skip-link:focus,
.skip-link:focus-visible {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 60;
  width: auto;
  height: auto;
  padding: 0.75rem 1.1rem;
  background: var(--navy);
  color: #fff;
  border-radius: 0.75rem;
  font-weight: 700;
  clip: auto;
  overflow: visible;
  white-space: nowrap;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* Form errors injected by script.js */
.form-error {
  color: var(--error);
  background: var(--error-bg);
  border: 1px solid #FDBA74;
  border-radius: 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.35;
}
.form-error::before {
  content: '⚠';
  flex-shrink: 0;
}
.lead-form .is-invalid {
  border-color: #F59E0B !important;
  background-color: #FFFBEB;
}
.lead-form .is-invalid:focus {
  border-color: var(--error) !important;
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.18);
}
.form-success-banner {
  background: rgba(94, 138, 100, 0.14);
  border: 1px solid rgba(71, 106, 76, 0.35);
  color: var(--success);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Equal Housing logo variants */
.eho-mark {
  display: inline-block;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  vertical-align: middle;
}
.eho-mark--sm {
  width: 1.25rem;
  height: 1.25rem;
}
.eho-mark--lg {
  width: 2.5rem;
  height: 2.5rem;
}
.eho-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--navy-dark);
  border-radius: 0.5rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Sticky mobile CTA — clear of content + safe area */
body {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-call-cta {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 35;
  box-shadow: 0 12px 28px -8px rgba(11, 61, 92, 0.45), 0 0 0 1px rgba(255,255,255,0.12);
}
@media (max-width: 767px) {
  /* Room for fixed "Call Angie" pill so it doesn't cover footer/forms */
  body {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Ensure EHO size variants keep base display */
.eho-mark--sm,
.eho-mark--lg {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Details/summary accordion caret polish */
details summary::-webkit-details-marker {
  display: none;
}
details summary {
  list-style: none;
}

/* Legal prose pages */
.legal-prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}
.legal-prose p,
.legal-prose li {
  color: #334155;
  margin-bottom: 0.75rem;
}
.legal-prose ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

/* Soft wave divider helper */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
}

/* Warm photo frames */
.photo-frame {
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 12px 40px -12px rgba(11, 61, 92, 0.28);
  background: var(--warm-white);
}
.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlapping personal photo stack for Meet Angie / About */
.photo-stack {
  position: relative;
  width: min(100%, 20rem);
  margin-inline: auto;
  aspect-ratio: 4 / 5;
}
.photo-stack__main {
  position: absolute;
  inset: 0 12% 8% 0;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 16px 48px -16px rgba(11, 61, 92, 0.35);
  border: 3px solid #fff;
  z-index: 2;
}
.photo-stack__accent {
  position: absolute;
  width: 48%;
  aspect-ratio: 3 / 4;
  right: 0;
  bottom: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 32px -12px rgba(11, 61, 92, 0.35);
  border: 3px solid #fff;
  z-index: 3;
}
.photo-stack__main img,
.photo-stack__accent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Soft pull-quote for personal story */
.pull-quote {
  position: relative;
  border-left: 4px solid var(--sea-light);
  padding: 0.25rem 0 0.25rem 1.25rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--navy);
  font-style: italic;
}
.pull-quote::before {
  content: "“";
  position: absolute;
  left: -0.15rem;
  top: -0.6rem;
  font-size: 2.5rem;
  color: var(--sea-light);
  font-style: normal;
  line-height: 1;
  opacity: 0.7;
}

/* Gentle card lift on focus for keyboard users */
.soft-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.soft-card:hover,
.soft-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -20px rgba(11, 61, 92, 0.28);
}
@media (prefers-reduced-motion: reduce) {
  .soft-card:hover,
  .soft-card:focus-within {
    transform: none;
  }
}

/* Form fields — larger tap targets for older users */
.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form input[type="email"],
.lead-form select,
.lead-form textarea {
  min-height: 3.25rem;
  font-size: 1.1rem;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}
.lead-form textarea {
  min-height: 7rem;
}
.lead-form input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  min-height: 1.35rem;
}
.lead-form button[type="submit"] {
  min-height: 3.5rem;
  letter-spacing: 0.01em;
}
.lead-form label {
  line-height: 1.45;
}

/* Sticky subnav on education page sits under main header */
@media (min-width: 1024px) {
  nav[aria-label="On this page"] {
    top: 3.75rem;
  }
}

/* Comfort band under hero form */
.reassure-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(94, 138, 100, 0.14);
  color: var(--palm-deep);
  font-size: 0.88rem;
  font-weight: 600;
}

/* Subtle coastal accent bar (sand → sea → palm) */
.coastal-accent {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--sand) 0%, var(--sea-light) 45%, var(--palm) 100%);
}

/* Section rhythm helpers */
.section-pad {
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

/* Thank-you warmth */
.thank-you-card {
  background:
    radial-gradient(circle at 12% 0%, rgba(125, 196, 224, 0.22), transparent 42%),
    radial-gradient(circle at 90% 100%, rgba(94, 138, 100, 0.14), transparent 40%),
    #fff;
}
