/* ==========================================================================
   Timothy Hamner Sr — site stylesheet
   Mobile-first. Breakpoints: 640px (tablet), 1024px (desktop)
   ========================================================================== */

:root {
  --color-bg: #fbf7f1;
  --color-bg-alt: #f1e8d9;
  --color-ink: #21263b;
  --color-ink-soft: #4a4f66;
  --color-navy: #1b2a57;
  --color-navy-deep: #131d3d;
  --color-gold: #b6893f;
  --color-gold-light: #d7ac67;
  --color-cream: #fffdf9;
  --color-border: #e4d9c4;

  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --max-width: 1140px;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(19, 29, 61, 0.10);
  --shadow-sm: 0 4px 14px rgba(19, 29, 61, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--color-navy); text-decoration-color: var(--color-gold); }
a:hover { color: var(--color-gold); }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.6em;
}

.section {
  padding: clamp(3rem, 6vw, 5.5rem) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-navy {
  background: var(--color-navy);
  color: #eef0f7;
}
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy .eyebrow { color: var(--color-gold-light); }
.section-navy p { color: #c9cee2; }

.section-head {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.section-head p { color: var(--color-ink-soft); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------------------------------- Header ---------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 241, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand img {
  height: 34px;
  width: auto;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-cream);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 8px;
  background: var(--color-navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.25rem 1.25rem;
}
.primary-nav.is-open { display: flex; }

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.primary-nav a {
  display: block;
  padding: 0.7rem 0;
  text-decoration: none;
  font-weight: 500;
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-border);
}
.primary-nav li:last-child a { border-bottom: none; }

.btn.nav-cta {
  display: none;
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    display: flex;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
  }
  .primary-nav ul {
    flex-direction: row;
    gap: 1.75rem;
    align-items: center;
  }
  .primary-nav a {
    border-bottom: none;
    padding: 0.4rem 0.1rem;
    position: relative;
  }
  .primary-nav a:hover { color: var(--color-navy); }
  .primary-nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--color-gold);
    transform: scaleX(0);
    transition: transform 0.2s ease;
  }
  .primary-nav a:hover::after { transform: scaleX(1); }
  .btn.nav-cta {
    display: inline-flex;
  }
}

/* ---------------------------------- Buttons ---------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  line-height: 1;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-navy);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-navy-deep); color: #fff; }

.btn-gold {
  background: var(--color-gold);
  color: #fff;
}
.btn-gold:hover { background: var(--color-gold-light); color: #fff; }

.btn-outline {
  background: transparent;
  border-color: var(--color-navy);
  color: var(--color-navy);
}
.section-navy .btn-outline {
  border-color: #fff;
  color: #fff;
}

.btn-outline:hover { background: var(--color-navy); color: #fff; }
.section-navy .btn-outline:hover { background: #fff; color: var(--color-navy); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem);
  background:
    radial-gradient(circle at 85% 15%, rgba(182, 137, 63, 0.14), transparent 55%),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg) 100%);
}
.hero .container {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero-copy p.lead {
  font-size: 1.1rem;
  color: var(--color-ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}
.hero-figure {
  justify-self: center;
  width: 100%;
  max-width: 320px;
}
.hero-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .hero .container {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .hero-figure { justify-self: end; max-width: 380px; }
}

/* ---------------------------------- Card grid ---------------------------------- */
.grid {
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.9rem;
  height: 100%;
}
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-navy);
}
.card .icon svg { width: 22px; height: 22px; }
.card p { color: var(--color-ink-soft); font-size: 0.97rem; margin-bottom: 0; }
.card .btn { margin-top: 1.3rem; }

.card-dark {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
}
.card-dark .icon {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.card-dark p { color: #c9cee2; }

.placeholder-note {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  color: var(--color-gold-light);
  border: 1px dashed rgba(255,255,255,0.35);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.section:not(.section-navy) .placeholder-note {
  color: var(--color-gold);
  border-color: var(--color-gold-light);
}

/* ---------------------------------- Contact / support ---------------------------------- */
.contact-layout {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.form-card {
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 1.2rem;
}

/* Honeypot: off-screen, not display:none (some bots skip that check) */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: var(--color-ink);
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.97rem;
  background: #fff;
  color: var(--color-ink);
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--color-gold);
  outline-offset: 1px;
}
.field textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  margin-top: 0.75rem;
}

.support-card {
  background: var(--color-navy);
  color: #eef0f7;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  box-shadow: var(--shadow);
}
.support-card h3 { color: #fff; }
.support-card p { color: #c9cee2; font-size: 0.95rem; }
.support-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 20px);
  background: var(--color-navy);
  color: #fff;
  padding: 0.9rem 1.4rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  max-width: min(92vw, 420px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------------------------- Blog teaser ---------------------------------- */
.blog-teaser {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

/* ---------------------------------- Footer ---------------------------------- */
.site-footer {
  background: var(--color-navy-deep);
  color: #c9cee2;
  padding: 2.75rem 0 1.75rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}
.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.site-footer .brand img { filter: brightness(0) invert(1); height: 30px; }
.site-footer p { color: #a7add0; font-size: 0.92rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.55rem; }
.footer-links a {
  color: #c9cee2;
  text-decoration: none;
  font-size: 0.93rem;
}
.footer-links a:hover { color: var(--color-gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
  font-size: 0.82rem;
  color: #8790b6;
  text-align: center;
}

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

.blog-page main {
  padding-top: 2rem;
}
.blog-empty {
  text-align: center;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  color: var(--color-ink-soft);
}
.post-meta {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  margin-bottom: 1rem;
}
article.post-body h2 { margin-top: 1.6em; }
article.post-body p { color: var(--color-ink-soft); }

/* ---------------------------------- Blog listing / pagination ---------------------------------- */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
}
.post-card h3 { color: var(--color-navy); }
.post-card p:not(.post-meta) { color: var(--color-ink-soft); font-size: 0.97rem; margin-bottom: 1.3rem; }
.post-card .btn {
  align-self: flex-start;
  margin-top: auto;
}
.post-card.is-sample {
  border-style: dashed;
}
.post-card.is-sample .btn {
  opacity: 0.5;
  cursor: not-allowed;
}
.sample-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-gold-light);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.7rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.pagination button {
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-cream);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pagination button:hover {
  border-color: var(--color-gold);
  color: var(--color-navy);
}
.pagination button[aria-current="page"] {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #fff;
  cursor: default;
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination button:disabled:hover {
  border-color: var(--color-border);
  color: var(--color-ink);
}
