/* ============================================================
   CHUCK CHAMBERLAIN — chuckchamberlain.com
   Design system: "Signature Navy"
   One shared stylesheet for every page.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --navy: #1B2A4A;
  --navy-deep: #14203A;
  --navy-soft: #2E4166;
  --gold: #C9A227;
  --gold-soft: #E7CE72;
  --cream: #F7F8FA;
  --white: #FFFFFF;
  --ink: #232B3E;
  --ink-soft: #5B6374;
  --line: #E4E7ED;
  --shadow-sm: 0 2px 8px rgba(20, 32, 58, .07);
  --shadow-md: 0 10px 28px rgba(20, 32, 58, .13);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1080px;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  padding: .6rem 1rem;
}
.skip-link:focus { left: 0; }

.container {
  width: min(var(--maxw), 92%);
  margin-inline: auto;
}

/* ---------- 3. Header & navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.wordmark {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.wordmark span { color: var(--gold); }

.site-nav ul { display: flex; gap: .25rem; }

.site-nav a {
  display: block;
  padding: .55rem .9rem;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.site-nav a:hover { color: var(--navy); background: var(--cream); }
.site-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--navy);
  transition: transform .25s ease, opacity .25s ease;
}

/* ---------- 4. Hero (Home) ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(201, 162, 39, .14), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, #23355C 100%);
  color: var(--cream);
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.hero-kicker {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.1rem;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  margin-bottom: 1rem;
}

.hero-sub {
  max-width: 40rem;
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: #C7CEDF;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- 5. Interior page hero (About, Services, etc.) ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--navy-deep), var(--navy));
  color: var(--cream);
  padding: clamp(2.6rem, 6vw, 4rem) 0;
  text-align: center;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 2.8rem); }
.page-hero p {
  max-width: 36rem;
  color: #C7CEDF;
  margin: .7rem auto 0;
  text-wrap: balance;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-block;
  padding: .8rem 1.7rem;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover {
  background: var(--gold-soft);
  color: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .45);
}
.btn-ghost:hover { border-color: var(--gold-soft); color: var(--gold-soft); transform: translateY(-2px); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover {
  background: var(--navy-soft);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- 7. Page sections ---------- */
.section { padding: clamp(3.2rem, 7vw, 5rem) 0; }
.section-alt { background: var(--cream); }

.section-title { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-top: .8rem;
}

.section-intro {
  max-width: 44rem;
  color: var(--ink-soft);
  margin: 1rem 0 2.2rem;
}

/* ---------- 8. Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-soft);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(201, 162, 39, .12);
  color: var(--gold);
  margin-bottom: 1rem;
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- 9. Prose (About narrative) ---------- */
.prose p { margin-bottom: 1.15rem; max-width: 46rem; }
.prose p:last-child { margin-bottom: 0; }

.highlight-list { margin-top: 1.6rem; }
.highlight-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: .8rem;
}
.highlight-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- 10. Skills tags ---------- */
.tag-list { display: flex; flex-wrap: wrap; gap: .6rem; }

.tag {
  padding: .42rem .95rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- 11. Links & resources ---------- */
.link-group { margin-bottom: 2.4rem; }
.link-group h3 { font-size: 1.25rem; margin-bottom: 1rem; }

.link-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: .8rem;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.link-item:hover {
  border-color: var(--gold-soft);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.link-item svg { flex: none; width: 22px; height: 22px; color: var(--navy); }
.link-item strong { display: block; color: var(--navy); font-weight: 600; }
.link-item span { font-size: .9rem; color: var(--ink-soft); }

/* ---------- 12. Contact form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  max-width: 640px;
}
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .4rem;
}

.field input, .field textarea {
  font: inherit;
  padding: .78rem .95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .18);
}
.field textarea { resize: vertical; min-height: 140px; }

.form-status { margin-top: 1rem; font-size: .95rem; min-height: 1.4rem; }
.form-status.success { color: #1E7A46; font-weight: 600; }
.form-status.error { color: #B3382E; font-weight: 600; }

/* ---------- 13. CTA band ---------- */
.cta-band {
  background: linear-gradient(140deg, var(--navy-deep), var(--navy));
  color: var(--cream);
  text-align: center;
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}
.cta-band h2 { color: var(--white); font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.cta-band p { max-width: 36rem; margin: .8rem auto 1.6rem; color: #C7CEDF; }

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #AAB3C6;
  padding: 2.6rem 0 2rem;
  font-size: .92rem;
}
.footer-wordmark {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: .9rem;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-bottom: 1.2rem; }
.footer-nav a { color: #C7CEDF; transition: color .2s ease; }
.footer-nav a:hover { color: var(--gold-soft); }

.footer-contact {
  display: inline-block;
  color: var(--gold-soft);
  font-weight: 600;
}
.footer-legal { margin-top: 1.4rem; font-size: .82rem; color: #7E88A0; }

/* ---------- 15. 404 page ---------- */
.error-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}
.error-code {
  font-family: var(--font-head);
  font-size: clamp(4rem, 12vw, 6.5rem);
  color: var(--navy);
  line-height: 1;
}
.error-code span { color: var(--gold); }
.error-page h1 { font-size: 1.5rem; margin: .8rem 0 .6rem; }
.error-page p { color: var(--ink-soft); margin-bottom: 1.6rem; }

/* ---------- 16. Mobile navigation ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, visibility .3s ease;
  }
  .site-nav.open { visibility: visible; max-height: 340px; }
  .site-nav ul { flex-direction: column; padding: .5rem 4% 1rem; }
  .site-nav a { padding: .8rem .5rem; font-size: 1rem; border-radius: var(--radius-sm); }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- 17. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}