/* ==========================================================
   PBRVR II LLC
   Palette: "Ocean Sunset" chosen by client
   https://coolors.co/palette/001219-005f73-0a9396-94d2bd-e9d8a6-ee9b00-ca6702-bb3e03-ae2012-9b2226
   ========================================================== */

:root {
  /* Client palette */
  --midnight: #001219;
  --deep-teal: #005F73;
  --teal: #0A9396;
  --seafoam: #94D2BD;
  --sand: #E9D8A6;
  --gold: #EE9B00;
  --copper: #CA6702;
  --rust: #BB3E03;
  --red: #AE2012;
  --crimson: #9B2226;

  /* Roles */
  --bg: #FFFFFF;
  --bg-alt: #EFF6F5;          /* seafoam, lightened */
  --text: #1A2A30;
  --text-muted: #4A5A60;
  --heading: var(--midnight);
  --link: var(--deep-teal);
  --link-hover: var(--copper);
  --rule: #D3E3E1;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", "Helvetica Neue", Arial, sans-serif;

  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-space: clamp(3.5rem, 8vw, 6rem);
  --header-height: 5rem;          /* 80px desktop; 68px on small screens (see below) */
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 1rem;
}

h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: 46rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--gold);
  color: var(--midnight);
  padding: 0.5rem 1rem;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--midnight);
  color: #FFFFFF;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-height);
}

/* Framed wordmark: gives the text name a logo-like feel */
.wordmark {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--gold);
  padding: 0.4rem 0.7rem 0.35rem 0.78rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.wordmark:hover { color: var(--sand); border-color: var(--sand); }

.site-nav { margin-left: auto; }

.site-nav ul {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #D8E4E6;
  text-decoration: none;
  font-size: 0.975rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--gold); }

.header-phone {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { color: var(--sand); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */

/* Hero image: swap --hero-image for a real photo when available,
   e.g. url("/assets/img/hero.jpg") */
.hero {
  --hero-image: url("/assets/img/hero.jpg");
  position: relative;
  background-color: var(--midnight);
  background-image:
    linear-gradient(90deg, rgba(0, 18, 25, 0.94) 0%, rgba(0, 18, 25, 0.78) 38%, rgba(0, 18, 25, 0.25) 70%, rgba(0, 18, 25, 0.05) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center 45%;
  color: #E6EEF0;
  padding: clamp(5rem, 13vw, 9.5rem) 0 clamp(4.5rem, 11vw, 8rem);
}

/* The one decorative moment: a sunset horizon line in the client's warm colors */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--copper) 35%, var(--rust) 60%, var(--red) 80%, var(--crimson));
}

.hero h1 {
  color: #FFFFFF;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin-bottom: 1.5rem;
}

.hero-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  max-width: 40rem;
  color: #C9DADD;
  margin-bottom: 2.25rem;
}

.button {
  display: inline-block;
  background: var(--gold);
  color: var(--midnight);
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 4px;
}
.button:hover { background: var(--sand); color: var(--midnight); }

/* ---------- Sections ---------- */

.section { padding: var(--section-space) 0; }

.section-about {
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(148, 210, 189, 0.24), transparent 70%),
    radial-gradient(ellipse 50% 70% at 100% 100%, rgba(10, 147, 150, 0.08), transparent 70%),
    var(--bg);
}

.section-about h2::after,
.section-orgs h2::after,
.section-contact h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 0.85rem;
  background: linear-gradient(90deg, var(--gold), var(--copper));
  border-radius: 2px;
}

.section-about p {
  font-size: 1.15rem;
  line-height: 1.75;
}

/* Section backgrounds with a faint wave texture */
/* Organizations: dark teal band */
.section-orgs {
  background-color: var(--midnight);
  background-image:
    linear-gradient(170deg, rgba(0, 95, 115, 0.92) 0%, rgba(0, 48, 61, 0.95) 55%, rgba(0, 18, 25, 0.98) 100%),
    url("/assets/img/wave-pattern-light.svg");
  background-size: auto, 240px 48px;
}

.section-orgs h2 { color: #FFFFFF; }

/* Contact: light seafoam tint */
.section-contact {
  background-color: var(--bg-alt);
  background-image:
    linear-gradient(180deg, rgba(239, 246, 245, 0) 0%, rgba(239, 246, 245, 0.9) 100%),
    url("/assets/img/wave-pattern.svg");
  background-size: auto, 240px 48px;
}

.org-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.org {
  background: linear-gradient(160deg, #FFFFFF 0%, #FFFFFF 45%, #F0F7F6 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--gold);
  border-radius: 4px;
  padding: 1.5rem 1.6rem 1.6rem;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.6);
}

.org h3 { margin-bottom: 0.4rem; }
.org p { color: var(--text-muted); margin-bottom: 0.4rem; }

.org-link { font-weight: 500; }

/* Leadership */

.leadership-inner {
  display: grid;
  grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.portrait {
  margin: 0;
}

.portrait img {
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule), 12px 12px 0 #CFE7DF;
}

.bio { max-width: 42rem; }

/* Pull the name up so its capital letters line up with the top of the photo */
.bio h2 { margin-top: -0.25em; }

/* Contact */

.section-leadership {
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 60%, #F5FAF9 100%);
}

/* Corner wave accent: About section, top-right (wide screens only) */
.section-about {
  position: relative;
  overflow: hidden;
}

.section-about > .container {
  position: relative;
  z-index: 1;
}

.section-about::before {
  content: "";
  position: absolute;
  display: none;
  top: 0;
  right: 0;
  width: 520px;
  height: 340px;
  background: url("/assets/img/corner-waves.svg") no-repeat;
  background-size: contain;
  pointer-events: none;
}

@media (min-width: 1100px) {
  .section-about::before { display: block; }
}

.section-contact { border-top: 1px solid var(--rule); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2rem;
  align-items: stretch;
}

/* Left column: details on top, map fills the rest so both columns end together */
.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
  margin: 0;
}

/* Contact form */

.contact-form {
  background: linear-gradient(170deg, #FFFFFF 0%, #FFFFFF 55%, #F0F7F6 100%);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--teal);
  border-radius: 4px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 14px 30px -20px rgba(0, 18, 25, 0.5);
}

.contact-form h3 { margin-bottom: 1.25rem; }

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--midnight);
}

.optional { font-weight: 400; color: var(--text-muted); }

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid #B9CFCC;
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--deep-teal);
}

.field textarea { resize: vertical; min-height: 8rem; }

.form-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Captcha box: space below, and scaled down slightly on very narrow phones so it fits */
.h-captcha { margin-bottom: 1.25rem; min-height: 78px; }

@media (max-width: 380px) {
  .h-captcha { transform: scale(0.9); transform-origin: left top; margin-bottom: 0.75rem; }
}

.contact-form .button { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.contact-form .button:disabled { opacity: 0.6; cursor: wait; }

.form-status { margin: 1rem 0 0; font-weight: 500; }
.form-status.is-success { color: var(--deep-teal); }
.form-status.is-error { color: var(--red); }

/* Map */

.map {
  flex: 1;
  min-height: 15rem;
  margin-top: 2rem;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: 0 14px 30px -20px rgba(0, 18, 25, 0.5);
  line-height: 0;
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 15rem;
  border: 0;
}

.contact-list dt {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--deep-teal);
  margin-bottom: 0.4rem;
}

.contact-list dd { margin: 0; }

/* ---------- Legal pages ---------- */

.legal { padding: var(--section-space) 0; }

.legal h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); margin-bottom: 0.5rem; }
.legal h2 { font-size: 1.35rem; margin-top: 2.25rem; margin-bottom: 0.6rem; }
.legal-updated { color: var(--text-muted); margin-bottom: 2rem; }

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  background: linear-gradient(180deg, #00202A 0%, var(--midnight) 100%);
  color: #AFC2C6;
  padding: 2.25rem 0;
  font-size: 0.95rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--copper) 35%, var(--rust) 60%, var(--red) 80%, var(--crimson));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.footer-entity { margin: 0; color: #FFFFFF; }

.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #D8E4E6; }
.footer-links a:hover { color: var(--gold); }

.footer-credit {
  margin: 0 0 0 auto;
  font-size: 0.8rem;
  color: #7F959A;
}
.footer-credit a { color: #9FB3B7; }
.footer-credit a:hover { color: var(--gold); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --header-height: 4.25rem; }

  .header-inner { gap: 1rem; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: 0.25rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    cursor: pointer;
  }

  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    display: block;
    width: 1.2rem;
    height: 2px;
    background: #FFFFFF;
    position: relative;
  }
  .nav-toggle-bar::before,
  .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }

  .header-phone { margin-left: auto; font-size: 0.95rem; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--midnight);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 0.75rem 0; font-size: 1.05rem; }

  .org-list { grid-template-columns: 1fr; }

  /* Stronger overlay on small screens so text stays readable over the image */
  .hero {
    background-image:
      linear-gradient(180deg, rgba(0, 18, 25, 0.9) 0%, rgba(0, 18, 25, 0.78) 60%, rgba(0, 18, 25, 0.55) 100%),
      var(--hero-image);
    background-position: 40% center;
  }

  .leadership-inner { grid-template-columns: 1fr; }
  .portrait { max-width: 18rem; }

  .footer-credit { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
  .wordmark { font-size: 1.2rem; padding: 0.35rem 0.55rem 0.3rem 0.6rem; }
  .header-phone { font-size: 0.875rem; }
  .contact-list { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
