/* ==========================================================================
   John Kromko - Main Stylesheet
   Professional civic / editorial redesign
   ========================================================================== */

:root {
  /* Brand palette */
  --navy-900: #0d1c2b;
  --navy-800: #122438;
  --navy-700: #1b3a55;
  --teal-600: #1f6f6b;
  --teal-500: #2a8a84;
  --gold-500: #c19a5b;
  --gold-400: #d9b878;

  /* Neutrals */
  --paper: #f7f5f1;
  --surface: #ffffff;
  --ink: #1c2329;
  --body-text: #37414b;
  --muted: #5b6672;
  --line: #e7e1d7;

  /* Legacy aliases kept for backwards compatibility */
  --white: #ffffff;
  --black: #000000;

  /* Typography */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(13, 28, 43, .06), 0 4px 14px rgba(13, 28, 43, .06);
  --shadow-md: 0 12px 34px rgba(13, 28, 43, .12);
  --radius: 14px;
  --radius-lg: 22px;
  --nav-h: 76px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, .main-font {
  font-family: var(--font-display);
  letter-spacing: 0;
  line-height: 1.2;
}

p { line-height: 1.75; }

a { color: var(--teal-600); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--navy-700); }

img { max-width: 100%; }

/* Legacy utility classes */
.main-bg { background-image: linear-gradient(120deg, var(--navy-900), var(--navy-700) 60%, var(--teal-600)); }
.letter-space-3 { letter-spacing: 3px; }
.letter-space-2 { letter-spacing: 2px; }

/* Keep anchored sections clear of the sticky navbar */
section[id] { scroll-margin-top: calc(var(--nav-h) + 10px); }

/* --------------------------------------------------------------------------
   Reusable building blocks
   -------------------------------------------------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-alt { background: var(--surface); }

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--teal-600);
  margin-bottom: .85rem;
}

.text-gold { color: var(--gold-400) !important; }

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

.btn-brand {
  background: var(--gold-500);
  border: 1px solid var(--gold-500);
  color: var(--navy-900);
}
.btn-brand:hover,
.btn-brand:focus {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-outline-light:hover { transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.site-navbar {
  background: rgba(13, 28, 43, .97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-height: var(--nav-h);
  padding-top: .55rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.navbar-brand { display: flex; align-items: center; gap: .8rem; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff; }
.brand-tag { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

@media (max-width: 420px) {
  .brand-tag { display: none; }
}

.site-navbar .nav-link {
  position: relative;
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
  font-size: .95rem;
  padding: .5rem .9rem;
}
.site-navbar .nav-link::after {
  content: "";
  position: absolute;
  left: .9rem;
  right: .9rem;
  bottom: .3rem;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus { color: #fff; }
.site-navbar .nav-link:hover::after { transform: scaleX(1); }

.navbar-toggler { border-color: rgba(255, 255, 255, .25); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(193, 154, 91, .4); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(4.5rem, 10vw, 8.5rem);
  color: #fff;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--teal-600) 135%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 12%, rgba(193, 154, 91, .22), transparent 42%),
    radial-gradient(circle at 8% 92%, rgba(42, 138, 132, .30), transparent 46%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 75%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 75%);
}
.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: .4rem 1rem;
  border: 1px solid rgba(193, 154, 91, .5);
  border-radius: 999px;
  color: var(--gold-400);
  font-size: .74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
}

.hero-title {
  font-size: clamp(2.6rem, 6.5vw, 4.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
}

.hero-subtitle {
  max-width: 38rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, .85);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.7;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 420px;
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .4);
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, .06);
  pointer-events: none;
}
.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.95) contrast(1.02);
}

/* --------------------------------------------------------------------------
   Stats panel (overlaps the hero)
   -------------------------------------------------------------------------- */
.stats-strip { position: relative; z-index: 3; margin-top: clamp(-4.5rem, -3vw, -3rem); }

.stats-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: .5rem 0;
}

.stat { padding: 1.5rem .75rem; height: 100%; }
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--teal-600);
}
.stat-label {
  display: block;
  margin-top: .55rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
}

@media (min-width: 992px) {
  .stat { border-right: 1px solid var(--line); }
  .stats-panel .col-lg-3:last-child .stat { border-right: 0; }
}
@media (max-width: 991.98px) {
  .stats-panel .col-6:nth-child(odd) .stat { border-right: 1px solid var(--line); }
  .stats-panel .col-6:nth-child(-n+2) .stat { border-bottom: 1px solid var(--line); }
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-lead { color: var(--body-text); font-size: 1.15rem; line-height: 1.85; margin-bottom: 1.25rem; }
.about-copy { color: var(--muted); margin-bottom: 1.15rem; }

.pull-quote {
  margin: 1.75rem 0 0;
  padding: .35rem 0 .35rem 1.35rem;
  border-left: 3px solid var(--gold-500);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--navy-800);
}
.pull-quote footer {
  margin-top: .6rem;
  font-family: var(--font-body);
  font-size: .8rem;
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Writing / excerpt card
   -------------------------------------------------------------------------- */
.writing-card {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.writing-head {
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.writing-byline { margin: 0; color: var(--muted); font-style: italic; }

.writing-body { max-width: 68ch; margin-inline: auto; }
.writing-body p { margin-bottom: 1.15rem; color: var(--body-text); line-height: 1.85; }
.writing-body .writing-intro { font-size: 1.15rem; color: var(--ink); }
.writing-body .writing-intro::first-letter {
  float: left;
  padding: .1rem .65rem 0 0;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: .82;
  color: var(--teal-600);
}

.chapter-toggle {
  padding-left: 0;
  color: var(--teal-600);
  font-weight: 600;
}
.chapter-toggle:hover { color: var(--navy-700); }
.chapter-toggle .when-expanded { display: none; }
.chapter-toggle[aria-expanded="true"] .when-collapsed { display: none; }
.chapter-toggle[aria-expanded="true"] .when-expanded { display: inline; }
.chapter-toggle .bi-chevron-down { transition: transform .3s ease; }
.chapter-toggle[aria-expanded="true"] .bi-chevron-down { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   Legacy cards
   -------------------------------------------------------------------------- */
.legacy-card {
  height: 100%;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.legacy-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(193, 154, 91, .6);
}

.legacy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: rgba(31, 111, 107, .1);
  color: var(--teal-600);
  font-size: 1.35rem;
}

.legacy-card h3 { font-size: 1.15rem; margin-bottom: .5rem; color: var(--navy-900); }
.legacy-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.legacy-card .legacy-year {
  display: block;
  margin-bottom: .35rem;
  color: var(--gold-500);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   CTA / resources
   -------------------------------------------------------------------------- */
.section-cta {
  color: #fff;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700) 70%, var(--teal-600));
}
.cta-panel { max-width: 1080px; margin-inline: auto; }

.resource-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.resource-link:hover {
  background: rgba(255, 255, 255, .12);
  border-color: var(--gold-500);
  color: #fff;
  transform: translateY(-3px);
}
.resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(193, 154, 91, .18);
  color: var(--gold-400);
  font-size: 1.2rem;
}
.resource-link strong { display: block; font-size: 1rem; }
.resource-link small { display: block; color: rgba(255, 255, 255, .6); font-size: .82rem; }
.resource-link .bi-arrow-up-right { color: rgba(255, 255, 255, .5); transition: transform .25s ease, color .25s ease; }
.resource-link:hover .bi-arrow-up-right { transform: translate(3px, -3px); color: var(--gold-400); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .7); }

.footer-brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: #fff; }
.footer-desc { margin-top: .85rem; max-width: 34rem; color: rgba(255, 255, 255, .6); font-size: .92rem; }

.footer-heading {
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255, 255, 255, .72); font-size: .92rem; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .55);
  font-size: .85rem;
}
.footer-bottom a { color: var(--gold-400); }
.footer-bottom a:hover { color: var(--gold-500); }

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* PHP Email Form Messages
------------------------------*/
.php-email-form .error-message {
  display: none;
  background: #df1529;
  color: #ffffff;
  text-align: left;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.php-email-form .sent-message {
  display: none;
  color: #ffffff;
  background: #059652;
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}

.php-email-form .loading {
  display: none;
  background: rgb(28, 28, 167);
  text-align: center;
  padding: 15px;
  margin-bottom: 24px;
}

.php-email-form .loading:before {
  content: "";
  display: inline-block;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  margin: 0 10px -6px 0;
  border: 3px solid #3308a0;
  border-top-color: #4c0395;
  animation: php-email-form-loading 1s linear infinite;
}

@keyframes php-email-form-loading {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

