/* ============================================================
   Great Lakes Real Estate — Garrett Lester
   One stylesheet shared by index.html and resources.html.
   Mobile-first: base styles are for phones, @media blocks
   layer on tablet/desktop layout.
   ============================================================ */

/* ------------------------------------------------------------
   1. BRAND PALETTE & TYPE — tweak the whole site's look here
   ------------------------------------------------------------ */
:root {
  /* Navy from the lighthouse logo */
  --navy-950: #081627;
  --navy-900: #0d2440;
  --navy-800: #143156;
  --navy-700: #1b4171;

  /* Golden yellow from the lighthouse beams */
  --gold-500: #f2b70a;   /* buttons / strong accents */
  --gold-400: #f7c948;   /* hovers */
  --gold-300: #ffd84d;   /* accents on dark navy */

  /* Neutrals */
  --sand:    #f7f4ec;    /* warm alternating section background */
  --seafoam: #edf3f2;    /* cool alternating section background */
  --ink:     #16283c;    /* headings on light backgrounds */
  --body:    #41546a;    /* body text on light backgrounds */
  --line:    #dfe5ec;    /* hairline borders */
  --white:   #ffffff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(8, 22, 39, 0.10);
  --header-h: 72px;
}

/* ------------------------------------------------------------
   2. RESET / BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

a { color: var(--navy-700); }

.container {
  width: min(100% - 2.5rem, 1120px);
  margin-inline: auto;
}

/* Anchored sections stop below the sticky header */
section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* Keyboard focus — high-visibility gold ring everywhere */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Honeypot field — visually removed, ignored by humans */
.visually-hidden-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------
   3. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold  { background: var(--gold-500); color: var(--navy-950); }
.btn--gold:hover { background: var(--gold-400); box-shadow: 0 6px 18px rgba(242, 183, 10, 0.35); }

.btn--navy  { background: var(--navy-900); color: var(--white); }
.btn--navy:hover { background: var(--navy-700); box-shadow: 0 6px 18px rgba(13, 36, 64, 0.3); }

.btn--ghost { border-color: rgba(255,255,255,0.7); color: var(--white); background: rgba(8,22,39,0.2); }
.btn--ghost:hover { background: rgba(255,255,255,0.14); border-color: var(--white); }

.btn--outline { border-color: var(--navy-900); color: var(--navy-900); background: transparent; }
.btn--outline:hover { background: var(--navy-900); color: var(--white); }

.btn--full { width: 100%; }

/* ------------------------------------------------------------
   4. HEADER / NAV
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(8, 22, 39, 0.12); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

/* Logo is a 300px-wide source file — keep it displayed small & sharp */
.site-header__brand img { width: auto; height: 48px; }

/* Hamburger (mobile only) */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  padding: 10px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile nav panel */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(8, 22, 39, 0.14);
}
.site-nav.is-open { display: block; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 1.25rem;
}
.site-nav a {
  display: block;
  padding: 0.8rem 0.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy-900);
  border-bottom: 1px solid var(--line);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover { color: var(--navy-700); }
.site-nav a.is-active { color: var(--navy-700); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .site-nav ul {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
  }
  .site-nav a {
    border: 0;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
  }
  .site-nav a.is-active {
    background: var(--sand);
    box-shadow: inset 0 -2px 0 var(--gold-500);
  }
  .site-nav a.nav-cta {
    background: var(--navy-900);
    color: var(--white);
    margin-left: 0.4rem;
  }
  .site-nav a.nav-cta:hover { background: var(--navy-700); }
  .site-nav a.nav-cta.is-active { box-shadow: inset 0 0 0 2px var(--gold-500); background: var(--navy-900); }
}

/* ------------------------------------------------------------
   5. HERO (home page)
   ------------------------------------------------------------ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: max(78vh, 540px);
  padding: clamp(4.5rem, 12vw, 8rem) 0 clamp(5rem, 12vw, 8rem);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* keeps the "LEWISTON LANDING" lettering in frame on narrow screens */
  object-position: center 58%;
}

/* Navy scrim so text stays legible over the photo */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8,22,39,0.55), rgba(8,22,39,0.25) 45%, rgba(8,22,39,0.65)),
    linear-gradient(105deg, rgba(8,22,39,0.88) 0%, rgba(8,22,39,0.55) 48%, rgba(13,36,64,0.28) 100%);
}

/* .container centers this block; text stays left-aligned inside it */
.hero__content {
  position: relative;
  z-index: 1;
  color: var(--white);
}
.hero__title { max-width: 22ch; }

.hero__kicker {
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold-300);
  margin-bottom: 0.75rem;
}

.hero__title {
  color: var(--white);
  font-size: clamp(2.1rem, 5.6vw, 3.6rem);
  margin-bottom: 0.5em;
  text-wrap: balance;
}

.hero__brokerage {
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 0.35rem;
}

.hero__subline {
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.75rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: clamp(34px, 6vw, 70px);
  z-index: 1;
}

/* ------------------------------------------------------------
   6. PULL-QUOTE BAND
   ------------------------------------------------------------ */
.quote-band {
  background: var(--navy-950);
  color: var(--white);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.quote-band blockquote {
  margin: 0;
  max-width: 60ch;
  margin-inline: auto;
  text-align: center;
  border-top: 3px solid var(--gold-500);
  padding-top: 1.6rem;
}
.quote-band blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.45;
  color: var(--white);
}
.quote-band em { color: var(--gold-300); font-style: normal; }
.quote-band cite {
  font-style: normal;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
}

/* ------------------------------------------------------------
   7. SECTIONS — shared scaffolding
   ------------------------------------------------------------ */
.section { padding: clamp(3.75rem, 9vw, 6.25rem) 0; }
.section--sand    { background: var(--sand); }
.section--seafoam { background: var(--seafoam); }

.kicker {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--navy-700);
  margin-bottom: 0.5rem;
}

.section-title { font-size: clamp(1.7rem, 4vw, 2.4rem); }

/* Short gold underline — a nod to the lighthouse beam */
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 2px;
  background: var(--gold-500);
  margin-top: 0.55rem;
}

.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-lede { font-size: 1.1rem; }

/* ------------------------------------------------------------
   8. ABOUT
   ------------------------------------------------------------ */
.about { display: grid; gap: 2.5rem; }

.about__photos {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: start;
  align-self: start;
}
.about__photos img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about__photo-secondary { margin-top: 2.75rem; }

@media (min-width: 900px) {
  .about { grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
}

/* ------------------------------------------------------------
   9. CARD GRIDS (services & reviews)
   ------------------------------------------------------------ */
.cards-3 { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

.service-card, .review-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 2px 10px rgba(8, 22, 39, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover, .review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.service-card h3 { font-size: 1.25rem; margin-top: 1rem; }
.service-card p { margin-bottom: 0; }

.service-card__icon {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--navy-900);
  color: var(--gold-300);
}
.service-card__icon svg { width: 30px; height: 30px; }

/* Reviews */
.review-card__stars {
  color: var(--gold-500);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}
.review-card blockquote { margin: 0 0 1rem; }
.review-card blockquote p { margin: 0; font-style: italic; color: var(--ink); }
.review-card__name { margin: 0; font-weight: 600; color: var(--navy-700); font-size: 0.95rem; }

/* ------------------------------------------------------------
   10. SPLIT SECTIONS (community & explore)
   ------------------------------------------------------------ */
.split { display: grid; gap: 2.25rem; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
  /* photo on the right for the community section */
  .split--photo-right .split__media { order: 2; }
  .split--photo-right .split__text  { order: 1; }
}

.split__media { margin: 0; }
.split__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.split__media figcaption {
  font-size: 0.85rem;
  color: var(--body);
  margin-top: 0.6rem;
  text-align: center;
}

/* Explore Lewiston link cards */
.link-cards { display: grid; gap: 0.9rem; margin-top: 1.5rem; }

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold-500);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(8, 22, 39, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.link-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}
.link-card strong { display: block; color: var(--navy-900); font-size: 1.05rem; }
.link-card__text span:last-child { font-size: 0.92rem; color: var(--body); }
.link-card__arrow {
  font-size: 1.3rem;
  color: var(--navy-700);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.link-card:hover .link-card__arrow { transform: translate(2px, -2px); color: var(--gold-500); }

/* ------------------------------------------------------------
   11. RESOURCE BANNER (gold callout)
   ------------------------------------------------------------ */
.resource-banner {
  background: var(--gold-500);
  padding: 1.75rem 0;
}
.resource-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.resource-banner p {
  margin: 0;
  color: var(--navy-950);
  font-size: 1.1rem;
}
@media (min-width: 720px) {
  .resource-banner__inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ------------------------------------------------------------
   12. CONTACT
   ------------------------------------------------------------ */
.contact { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contact { grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; align-items: start; } }

.contact__info { display: grid; gap: 1rem; align-content: start; }

.contact__row {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--body);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.contact__row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.contact__row strong { color: var(--navy-900); }

.contact__icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--navy-900);
  color: var(--gold-300);
}
.contact__icon svg { width: 24px; height: 24px; }

/* Form */
.contact__form-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.field__optional { font-weight: 400; color: var(--body); font-size: 0.85rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(27, 65, 113, 0.18);
}
.field textarea { resize: vertical; min-height: 120px; }

/* Validation state (toggled by js/main.js) */
.field.has-error input,
.field.has-error textarea { border-color: #c0392b; }
.field__error {
  color: #c0392b;
  font-size: 0.875rem;
  margin: 0.35rem 0 0;
}

.form-status { margin: 0.9rem 0 0; font-weight: 600; }
.form-status.is-error { color: #c0392b; }

.form-success {
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.form-success h3 { font-size: 1.4rem; }
.form-success p { margin-bottom: 0; }

/* ------------------------------------------------------------
   13. PAGE HERO (resources page)
   ------------------------------------------------------------ */
.page-hero {
  position: relative;
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(242,183,10,0.16), transparent 60%),
    linear-gradient(120deg, var(--navy-950), var(--navy-800));
  color: var(--white);
  padding: clamp(3.5rem, 9vw, 5.5rem) 0 clamp(4.5rem, 10vw, 6.5rem);
}
.page-hero__title { color: var(--white); font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.3em; }
.page-hero__lede { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 52ch; margin-bottom: 0; }
.page-hero .hero__wave { height: clamp(28px, 5vw, 54px); }

/* ------------------------------------------------------------
   14. RESOURCES DOCUMENT GRID
   ------------------------------------------------------------ */
.doc-grid { display: grid; gap: 1.5rem; }
@media (min-width: 680px)  { .doc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .doc-grid { grid-template-columns: repeat(3, 1fr); } }

.doc-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(8, 22, 39, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.doc-card__thumb {
  display: block;
  background: var(--seafoam);
  padding: 1.25rem 1.25rem 0;
}
.doc-card__thumb img {
  width: 100%;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -6px 24px rgba(8, 22, 39, 0.18);
  /* show the top of the flyer, cropped like a sheet of paper peeking up */
  max-height: 340px;
  object-fit: cover;
  object-position: top;
}

.doc-card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.doc-card__body h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.doc-card__body p { font-size: 0.97rem; flex: 1; }

.doc-card__actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.doc-card__actions .btn { padding: 0.65rem 1.2rem; font-size: 0.95rem; }

/* ------------------------------------------------------------
   15. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 0 2rem;
  margin-top: 0;
}
.site-footer a { color: var(--white); text-decoration-color: rgba(255,255,255,0.35); }
.site-footer a:hover { color: var(--gold-300); }

.site-footer__grid { display: grid; gap: 2.25rem; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; } }

/* White chip so the white-background logo looks intentional on navy */
.site-footer__logo-chip {
  display: inline-block;
  background: var(--white);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  margin-bottom: 1rem;
}
.site-footer__logo-chip img { height: 42px; width: auto; }

.site-footer__col h3 {
  color: var(--gold-300);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__col li { margin-bottom: 0.55rem; }

.site-footer__legal {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
}
.site-footer__legal p { margin: 0; }

.site-footer__eho {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
}
.site-footer__eho svg { width: 22px; height: 22px; flex-shrink: 0; }

@media (min-width: 720px) {
  .site-footer__legal {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
  }
  .site-footer__legal p:nth-child(2) { text-align: center; }
}

/* ------------------------------------------------------------
   16. SCROLL-REVEAL ANIMATION
   Elements with .reveal fade/rise in as they scroll into view.
   Only active when JS runs (html.js) and motion is allowed.
   ------------------------------------------------------------ */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .link-card, .doc-card, .service-card, .review-card, .contact__row { transition: none; }
}
