/* VFW Farmingville Memorial Post 400
   Mobile first: unprefixed rules are the phone layout, min-width queries enhance. */

:root {
  --navy-950: #070c1c;
  --navy-900: #0b1330;
  --navy-850: #111a3a;
  --navy-800: #18234a;
  --navy-700: #24315e;
  --ink: #0e172d;
  --paper: #ffffff;
  --mist: #eef1f7;
  --rule: #d6dbe7;
  --muted: #5a6480;
  --muted-on-dark: #b7c0d8;
  --gold: #a79055;
  --gold-soft: #c4ae76;
  --red: #991a1e;
  --focus: #e0cc98;
  --radius: 2px;
  --gutter: 16px;
  --max: 1180px;
  --display: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Roboto", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 10px 14px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
h1, h2, h3, h4 { overflow-wrap: break-word; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; line-height: 1.02; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 9vw, 4.8rem); }
h2 { font-size: clamp(2rem, 7vw, 3.4rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; overflow-wrap: break-word; }
.eyebrow { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: .85rem; color: var(--gold); margin: 0 0 12px; }
.lede { font-size: 1.15rem; max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Bracket button, after the airforce.com outline style */
.btn {
  --c: var(--paper);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  color: var(--c); background: transparent; border: 0; cursor: pointer;
  box-shadow: inset 2px 0 0 var(--c), inset -2px 0 0 var(--c);
  transition: background-color .2s, color .2s;
}
.btn::before, .btn::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--c) 0 14px, transparent 14px calc(100% - 14px), var(--c) calc(100% - 14px)); }
.btn::before { top: 0; } .btn::after { bottom: 0; }
.btn:hover { background: var(--c); color: var(--navy-900); }
.btn--solid { background: var(--gold); color: var(--navy-950); box-shadow: none; }
.btn--solid::before, .btn--solid::after { display: none; }
.btn--solid:hover { background: var(--gold-soft); color: var(--navy-950); }
.btn--dark { --c: var(--navy-900); }
.btn--dark:hover { color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--navy-950); color: var(--paper); border-bottom: 1px solid rgba(255,255,255,.08); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; flex: 0 0 auto; }
.brand img { width: 84px; height: auto; flex: 0 0 auto; }
.brand span { padding-left: 8px; border-left: 1px solid rgba(255,255,255,.25); }
@media (min-width: 400px) { .brand img { width: 114px; } }
.brand span { font-family: var(--display); text-transform: uppercase; line-height: 1.02; letter-spacing: .06em; min-width: 0; }
.brand b { display: block; font-size: 1rem; font-weight: 700; }
.brand small { display: block; font-size: .68rem; font-weight: 600; color: var(--gold); letter-spacing: .1em; }
@media (max-width: 359px) { .brand img { width: 72px; } .site-head .wrap { gap: 6px; } }
@media (min-width: 400px) { .brand b { font-size: 1.12rem; } .brand small { font-size: .78rem; letter-spacing: .16em; } }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: none; border: 0; color: var(--paper); cursor: pointer; flex: 0 0 auto; }
.nav-toggle svg { width: 28px; height: 28px; }
.nav { position: fixed; top: var(--nav-top, 68px); left: 0; right: 0; bottom: 0; background: var(--navy-950); border-top: 1px solid rgba(255,255,255,.12); padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; display: none; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: inline-flex; }
.nav-toggle span { display: inline-flex; }
.nav-close { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 16px; background: none; border: 1px solid rgba(255,255,255,.25); color: var(--paper); font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.nav-close svg { width: 20px; height: 20px; }
.nav.open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li a { display: flex; align-items: center; min-height: 52px; font-family: var(--display); font-size: 1.35rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav li a[aria-current="page"] { color: var(--gold); }
.nav .nav-cta { margin-top: 24px; display: grid; gap: 12px; }
.nav .nav-cta .btn { width: 100%; }
body.nav-lock { overflow: hidden; }

@media (min-width: 1280px) {
  .site-head .wrap { max-width: 1400px; }
  .nav-toggle { display: none; }
  .nav-close { display: none; }
  .nav { position: static; border: 0; display: flex; align-items: center; gap: 18px; padding: 0; background: none; overflow: visible; }
  .nav ul { display: flex; gap: 14px; }
  .nav li a { min-height: 44px; font-size: .86rem; letter-spacing: .08em; border: 0; white-space: nowrap; }
  .nav li a:hover { color: var(--gold); }
  .nav .nav-cta { margin: 0; display: flex; gap: 10px; }
  .nav .nav-cta .btn { width: auto; min-height: 42px; padding: 8px 14px; font-size: .84rem; letter-spacing: .1em; white-space: nowrap; }
}
@media (min-width: 1280px) and (max-width: 1439px) { .site-head .brand span { display: none; } }
@media (min-width: 1440px) { .nav ul { gap: 18px; } .nav li a { font-size: .9rem; } }
.brand span { white-space: nowrap; }
@media (min-width: 1280px) { .brand { margin-right: 24px; } .nav { margin-left: auto; } }

/* Hero */
.hero { position: relative; color: var(--paper); background: var(--navy-950); min-height: 78vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero picture, .hero > img { position: absolute; inset: 0; }
.hero picture img, .hero > img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,12,28,.35) 0%, rgba(7,12,28,.5) 50%, rgba(7,12,28,.92) 100%); }
@media (min-width: 900px) { .hero::after { background: linear-gradient(90deg, rgba(7,12,28,.88) 0%, rgba(7,12,28,.6) 42%, rgba(7,12,28,.1) 75%), linear-gradient(0deg, rgba(7,12,28,.7) 0%, rgba(7,12,28,0) 35%); } }
.hero .wrap { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 56px; }
.hero h1 { margin-bottom: .4em; max-width: 16ch; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero .lede { color: #e4e8f3; }
.hero--short { min-height: 46vh; }
.hero--short h1 { font-size: clamp(2.3rem, 9vw, 4.4rem); }

/* Sections */
.band { padding: 64px 0; }
.band--dark { background: var(--navy-900); color: var(--paper); }
.band--deep { background: var(--navy-950); color: var(--paper); }
.band--mist { background: var(--mist); }
.band--dark .lede, .band--deep .lede { color: var(--muted-on-dark); }
.band h2 { margin-bottom: .35em; }
@media (min-width: 768px) { .band { padding: 96px 0; } }

.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.grid > * { min-width: 0; }

.panel { background: var(--navy-800); color: var(--paper); padding: 32px 24px; display: flex; flex-direction: column; gap: 6px; }
.panel h3 { margin-bottom: .3em; }
.panel p { color: var(--muted-on-dark); }
.panel .btn { margin-top: auto; align-self: flex-start; }
.panel--light { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
.panel--light p { color: var(--muted); }
.panel .icon { width: 44px; height: 44px; color: var(--gold); margin-bottom: 10px; }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 56px; } .split--rev > :first-child { order: 2; } }
.split img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Stat / fact strip */
.facts { display: grid; gap: 1px; background: rgba(255,255,255,.1); grid-template-columns: repeat(2, minmax(0,1fr)); }
.facts > div { background: var(--navy-900); padding: 22px 16px; }
.facts dt { font-family: var(--display); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.facts dd { margin: 4px 0 0; font-family: var(--display); font-size: 1.35rem; font-weight: 700; text-transform: uppercase; line-height: 1.1; overflow-wrap: anywhere; }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(4, minmax(0,1fr)); } }

/* Events */
.events { display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 16px; padding: 18px; background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--red); }
.event time { font-family: var(--display); text-transform: uppercase; text-align: center; line-height: 1; color: var(--navy-900); }
.event time b { display: block; font-size: 2.1rem; }
.event time span { display: block; font-size: .85rem; letter-spacing: .15em; margin-top: 4px; }
.event time small { display: block; font-size: .75rem; color: var(--muted); margin-top: 4px; }
.event h3 { font-size: 1.3rem; margin-bottom: .2em; }
.event p { margin: 0 0 .4em; color: var(--muted); font-size: .98rem; }
.event .meta { font-size: .9rem; color: var(--ink); font-weight: 600; }
.band--dark .event { background: var(--navy-800); border-color: var(--navy-700); border-left-color: var(--gold); }
.band--dark .event time, .band--dark .event .meta { color: var(--paper); }
.band--dark .event p { color: var(--muted-on-dark); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.gallery figure { margin: 0; position: relative; background: var(--navy-900); min-width: 0; }
.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gallery figcaption { font-size: .82rem; line-height: 1.35; padding: 8px 10px 10px; color: var(--muted-on-dark); overflow-wrap: anywhere; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(4,7,17,.96); display: none; align-items: center; justify-content: center; padding: 56px 12px 16px; flex-direction: column; gap: 12px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 78vh; width: auto; max-width: 100%; }
.lightbox p { color: var(--muted-on-dark); font-size: .92rem; max-width: 70ch; text-align: center; margin: 0; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--paper); width: 48px; height: 48px; font-size: 2rem; cursor: pointer; }
.lb-close { top: 8px; right: 8px; } .lb-prev { left: 4px; top: 50%; } .lb-next { right: 4px; top: 50%; }

.gallery-year { margin: 48px 0 16px; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.gallery-year:first-child { margin-top: 0; }

/* Prose pages */
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.note { border-left: 4px solid var(--gold); background: #fff8e6; padding: 14px 16px; font-size: .95rem; color: #4a3b0c; margin: 0 0 1.2em; }
.band--dark .note, .band--deep .note { background: rgba(212,167,44,.1); color: #f3e3b3; }
.unverified { display: inline-block; font-family: var(--display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; background: #fff1c7; color: #6b5200; padding: 2px 8px; vertical-align: middle; }

/* Contact */
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list > li > a, .contact-list > li > div { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 14px; align-items: start; padding: 16px; min-height: 56px; background: var(--navy-800); color: var(--paper); text-decoration: none; }
.contact-list > li > * > div { min-width: 0; }
.contact-list > li > a:hover { background: var(--navy-700); }
.contact-list svg { width: 24px; height: 24px; color: var(--gold); margin-top: 2px; }
.contact-list b { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; line-height: 1.3; color: var(--gold); margin-bottom: 2px; }
.contact-list span { display: block; overflow-wrap: anywhere; font-size: 1.05rem; line-height: 1.4; }
.map { width: 100%; aspect-ratio: 4/3; border: 0; filter: grayscale(.2); }
form.stack { display: grid; gap: 14px; }
label { font-weight: 600; display: grid; gap: 6px; font-size: .95rem; }
input, textarea, select { font: inherit; padding: 12px 14px; min-height: 48px; border: 1px solid var(--rule); border-radius: var(--radius); width: 100%; background: #fff; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }

/* Crisis strip */
.crisis { background: var(--red); color: #fff; font-size: .95rem; }
.crisis .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: center; text-align: center; }
.crisis a { font-weight: 700; }

/* Footer */
.site-foot { background: var(--navy-950); color: var(--muted-on-dark); padding: 56px 0 28px; font-size: .95rem; }
.site-foot .cols { display: grid; gap: 32px; }
@media (min-width: 800px) { .site-foot .cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-foot h4 { color: var(--paper); font-size: 1rem; letter-spacing: .16em; margin-bottom: 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 4px; }
.site-foot li a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; }
.site-foot a:hover { color: var(--gold); }
.site-foot .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; display: grid; gap: 6px; }
.site-foot .brand { flex: 0 1 auto; flex-wrap: wrap; row-gap: 10px; }
.site-foot .brand img { width: 150px; max-width: 100%; }
@media (min-width: 400px) { .site-foot .brand img { width: 171px; } }
.site-foot .brand b { color: var(--paper); }

/* Member profile */
.profile { display: grid; gap: 28px; align-items: start; }
.profile__photo { margin: 0 auto; width: calc(100% - 8px); max-width: 300px; }
.profile__photo img { width: 100%; aspect-ratio: 2/3; object-fit: cover; box-shadow: 8px 8px 0 var(--navy-900); }
@media (min-width: 900px) { .profile__photo img { box-shadow: 14px 14px 0 var(--navy-900); } }
.profile__body h2 { margin-bottom: .15em; }
.profile__rank { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--red); font-size: .95rem; margin-bottom: 1.1em; }
.profile__body p:not(.eyebrow):not(.profile__rank) { max-width: 64ch; }
@media (min-width: 900px) { .profile { grid-template-columns: 380px minmax(0,1fr); gap: 64px; } .profile__photo { max-width: none; } }
.roles { display: grid; gap: 1px; background: rgba(255,255,255,.1); grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 32px; }
.role { background: var(--navy-800); padding: 22px 10px; min-width: 0; }
@media (min-width: 600px) { .role { padding: 22px 16px; } }
.role span { display: block; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: clamp(.85rem, 3.9vw, 1.05rem); line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
@media (min-width: 900px) { .role span { letter-spacing: .06em; } }
.role small { display: block; margin-top: 6px; color: var(--gold); font-family: var(--display); text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; }
@media (min-width: 900px) { .roles { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 767px) { .profile__body, .role { text-align: center; } }

/* Sticky "Get in touch" bar on phones and small tablets */
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(7,12,28,.96); border-top: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mobile-cta .btn { width: 100%; min-height: 50px; }
body { padding-bottom: calc(71px + env(safe-area-inset-bottom)); }
body.nav-lock .mobile-cta { display: none; }
@media (min-width: 900px) { .mobile-cta { display: none; } body { padding-bottom: 0; } }

/* Phone layout: center headings, intros, buttons and cards */
@media (max-width: 767px) {
  .hero .wrap, .band .wrap > .eyebrow, .band .wrap > h2, .band .wrap > .lede, .band .wrap > p,
  .split > div > .eyebrow, .split > div > h2, .split > div > p, .prose, .panel, .facts > div, .site-foot .cols > div { text-align: center; }
  .hero h1, .lede { margin-left: auto; margin-right: auto; }
  .btn-row { justify-content: center; }
  .panel { align-items: center; }
  .panel .btn { align-self: center; }
  .panel .icon { margin-left: auto; margin-right: auto; }
  .prose ul { text-align: left; display: inline-block; max-width: 100%; }
  .site-foot .brand { justify-content: center; }
  .site-foot ul li a { justify-content: center; }
  .event, .contact-list, form.stack, .gallery figcaption { text-align: left; }
  .note { text-align: left; }
}
