/* Keith Foster | Next Chapter Living
   Brand colors pulled from the Veterans First Realty logo. */
:root {
  --navy: #1e2c6b;
  --navy-deep: #141f4f;
  --red: #c8102e;
  --red-dark: #a00d25;
  --sky: #eef1f7;
  --ink: #1b1f2a;
  --muted: #545c70;
  --line: #d8dce7;
  --white: #ffffff;
  --serif: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; display: block; }
a { color: var(--navy); }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.prose { max-width: 68ch; }
.lead { font-size: 1.2rem; color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 78px;
}
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand span {
  font-family: var(--serif); font-size: 1.15rem; color: var(--navy);
  border-left: 1px solid var(--line); padding-left: .85rem; line-height: 1.2;
}
.brand small { display: block; font-family: var(--sans); font-size: .78rem; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--red); }

.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  text-decoration: none; padding: .85rem 1.5rem; border-radius: 4px;
  border: 2px solid var(--red); background: var(--red); color: var(--white);
  cursor: pointer;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: var(--white); }
.nav .btn { padding: .6rem 1.1rem; color: var(--white); border-bottom: 2px solid var(--red); }
.nav .btn:hover { color: var(--white); }

.menu-toggle {
  display: none; background: none; border: 2px solid var(--navy); color: var(--navy);
  font: 700 .9rem var(--sans); padding: .5rem .8rem; border-radius: 4px; cursor: pointer;
}

/* Persistent Let's Talk bar on phones */
.talk-bar { display: none; }

@media (max-width: 900px) {
  .brand span { display: none; }
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 78px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { display: none; }
  .talk-bar {
    display: block; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom, 0px));
    background: var(--white); border-top: 1px solid var(--line);
  }
  .talk-bar .btn { display: block; text-align: center; }
  body { padding-bottom: 80px; }
}

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0; overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero p.sub { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin-bottom: 1.8rem; }
.actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* The signature: headshot framed by the logo's flag stripes */
.portrait { position: relative; max-width: 420px; justify-self: end; width: 100%; }
.portrait::before {
  content: ""; position: absolute; inset: 1.4rem -1.4rem -1.4rem 1.4rem;
  background: repeating-linear-gradient(135deg, var(--red) 0 14px, var(--white) 14px 24px);
  z-index: 0;
}
.portrait::after {
  content: ""; position: absolute; left: -1.4rem; top: -1.4rem; width: 38%; height: 30%;
  background: var(--navy); z-index: 0;
}
.portrait img { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 18%; }

@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { justify-self: center; max-width: 320px; margin: 1rem 1.4rem 1.4rem; }
}

/* Page intro band for interior pages */
.page-intro { background: var(--navy); color: var(--white); padding: clamp(2.8rem, 6vw, 4.5rem) 0; border-bottom: 6px solid var(--red); }
.page-intro h1 { color: var(--white); max-width: 22ch; }
.page-intro p { color: #d9def0; font-size: 1.2rem; max-width: 60ch; margin: 0; }

section.block { padding: clamp(2.8rem, 6vw, 4.8rem) 0; }
section.tint { background: var(--sky); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.pull {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: var(--navy);
  line-height: 1.4; border-left: 4px solid var(--red); padding-left: 1.2rem; margin: 0;
}

/* Topic list: reads like an index, not a card grid */
.topics { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 3.5rem; }
.topics li { border-top: 1px solid var(--line); padding: 1.4rem 0 1.5rem; }
.topics h3 { margin-bottom: .4rem; }
.topics h3 a { text-decoration: none; }
.topics h3 a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.topics p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .topics { grid-template-columns: 1fr; } }

.note-box { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--navy); padding: 1.6rem 1.8rem; }
.note-box h2 { font-size: 1.6rem; }

.cta-band { background: var(--navy-deep); color: var(--white); padding: clamp(2.8rem, 6vw, 4.2rem) 0; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #d9def0; max-width: 58ch; }

/* Article library */
.library-section { border-top: 1px solid var(--line); padding: 2.4rem 0; scroll-margin-top: 100px; }
.library-section:first-of-type { border-top: 0; }
.library-section > p { color: var(--muted); max-width: 64ch; }
.article-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.article-list li { padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.article-list a { font-weight: 600; }
.empty { color: var(--muted); font-style: italic; }

/* Article page */
.article { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.article .crumb { font-size: .92rem; color: var(--muted); margin-bottom: 1.4rem; }
.article h2 { font-size: 1.5rem; margin-top: 2rem; }
.article ul { padding-left: 1.2rem; }
.article li { margin-bottom: .5rem; }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1.2rem; }
.video-frame { aspect-ratio: 16 / 9; background: var(--sky); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--muted); font-size: .95rem; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-title { font-weight: 700; margin: .6rem 0 0; }

/* Resources */
.resource { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); padding: 3rem 0; border-top: 1px solid var(--line); scroll-margin-top: 100px; }
.resource:first-of-type { border-top: 0; }
@media (max-width: 800px) { .resource { grid-template-columns: 1fr; } }
.resource ul { padding-left: 1.2rem; color: var(--muted); }

/* Forms */
form.panel { background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--red); padding: 1.8rem; }
form.panel h3 { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
.field { margin-bottom: 1.1rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); padding: .75rem .85rem;
  border: 1px solid #b7bdcc; border-radius: 4px; background: var(--white);
}
textarea { min-height: 130px; resize: vertical; }
.hint { font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.hidden { display: none; }

/* Footer */
.site-footer { background: var(--ink); color: #c9cdd8; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.footer-grid h3 { color: var(--white); font-size: 1.1rem; }
.footer-grid p { margin: 0 0 .4rem; }
.footer-logo { background: var(--white); display: inline-block; padding: .6rem .8rem; border-radius: 4px; margin-bottom: 1rem; }
.footer-logo img { height: 52px; width: auto; }
.legal { border-top: 1px solid #3a3f4d; margin-top: 2rem; padding-top: 1.4rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.eho { display: flex; align-items: center; gap: .6rem; }
.eho svg { width: 34px; height: 34px; flex: none; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* Closing day photos */
.gallery { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 1rem; margin-top: 1.8rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 400px; object-fit: cover; border-bottom: 5px solid var(--red); }
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: auto; aspect-ratio: 4 / 3; }
}
.side-photo { margin-top: 2rem; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 40% 55%; border-left: 4px solid var(--red); }

/* Tagline */
.eyebrow { font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 1rem; }
.site-footer .tagline { color: var(--white); font-weight: 700; letter-spacing: .04em; margin-top: .8rem; }
