/* ============================================================
   Dr. Rhett P. Dodson — personal website
   Scottish-inspired theme: hunter green, tartan, thistle
   ============================================================ */

:root {
  --hunter: #234d34;        /* rich hunter green — primary */
  --hunter-deep: #16311f;   /* darker green for depth */
  --hunter-soft: #2f6043;   /* lighter hunter for hovers */
  --heather: #8e6c9a;       /* thistle purple accent */
  --heather-deep: #6b4f78;
  --gold: #c9a24b;          /* aged brass / gold accent */
  --parchment: #f6f3ea;     /* warm off-white background */
  --parchment-2: #efe9db;   /* slightly deeper panel */
  --ink: #22271f;           /* body text */
  --ink-soft: #4a5145;
  --line: #d8cfba;          /* hairline borders */
  --white: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 6px 24px rgba(22, 49, 31, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background-color: var(--parchment);
  line-height: 1.7;
  font-size: 18px;
}

/* Tartan strip used at very top and bottom */
.tartan-strip {
  height: 16px;
  width: 100%;
  background-image: url("assets/tartan-tile.png");
  background-size: 130px 130px;
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

/* ---------- Header / Navigation ---------- */
.site-header {
  background: var(--hunter);
  color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--white);
}

.brand .crest { height: 72px; width: auto; flex: none; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45)); }

.brand-text { line-height: 1.1; }
.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--sans);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.nav-links a {
  display: block;
  padding: 0.45rem 0.85rem;
  color: #eaf1ea;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.4px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--hunter-soft); color: #fff; }
.nav-links a.active {
  background: var(--gold);
  color: var(--hunter-deep);
  font-weight: 600;
}

/* ---------- Hero (home: light & open) ---------- */
.hero {
  background: transparent;
  color: var(--ink);
  text-align: center;
  padding: 2.6rem 1.5rem 1.4rem;
}
.hero-photo {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}
/* Dark scrim so the title reads clearly over the varied background */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 3vw 1.5rem 6vw;
  text-align: center;
  background: linear-gradient(to bottom, rgba(16,40,24,0.72) 0%, rgba(16,40,24,0.45) 45%, rgba(16,40,24,0) 100%);
}
.hero-overlay h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 8.5vw, 6.5rem);
  margin: 0 0 0.5rem;
  letter-spacing: 0.5px;
  color: var(--gold);
  text-shadow: 0 2px 14px rgba(0,0,0,0.7), 0 1px 3px rgba(0,0,0,0.85);
  line-height: 1.02;
}
.hero-overlay .subtitle {
  font-size: clamp(1rem, 2.6vw, 1.85rem);
  color: #f6f3ea;
  font-family: var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
.hero-actions { background: transparent; text-align: center; padding: 1.6rem 1.5rem 0.6rem; }
.hero-actions .btn-outline { color: var(--hunter); border-color: var(--hunter); }
.hero-actions .btn-outline:hover { background: var(--hunter); color: #fff; }
/* ---------- About banner (tartan + crest) ---------- */
.about-hero {
  background-image:
    linear-gradient(rgba(16,40,24,0.70), rgba(16,40,24,0.78)),
    url("assets/tartan-tile.png");
  background-size: cover, 320px 320px;
  background-position: center, center;
  color: #fff;
  text-align: center;
  padding: 2.6rem 1.5rem 2.2rem;
}
.hero .crest-lg,
.about-hero .crest-lg { height: 224px; width: auto; margin-bottom: 0.4rem; filter: drop-shadow(0 2px 7px rgba(0,0,0,0.55)); }
.about-hero .crest-lg { height: 150px; margin-bottom: 0; }
.about-hero .motto { font-family: var(--sans); color: var(--gold); letter-spacing: 2px; text-transform: uppercase; font-size: 0.8rem; margin: 0.4rem 0 0; }
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin: 0 0 0.5rem;
  letter-spacing: 0.5px;
  color: var(--hunter);
}
.hero .subtitle {
  font-size: 1.15rem;
  color: #9a7729;
  font-family: var(--sans);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0;
}
.hero p.lead {
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.15rem;
  color: #eef2ec;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid var(--gold);
  transition: all 0.15s;
  margin: 0.25rem;
}
.btn-primary { background: var(--gold); color: var(--hunter-deep); font-weight: 600; }
.btn-primary:hover { background: #d9b45f; }
.btn-outline { background: transparent; color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--hunter-deep); }

/* ---------- Layout ---------- */
main { max-width: 1000px; margin: 0 auto; padding: 3rem 1.5rem; }
.narrow { max-width: 760px; }

.page-title {
  text-align: center;
  margin-bottom: 0.4rem;
}
.page-title h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--hunter);
  margin: 0;
}
.page-title .flourish {
  display: block;
  width: 90px;
  height: 3px;
  margin: 0.9rem auto 2.2rem;
  background: var(--gold);
  position: relative;
}
.page-title .flourish::after {
  content: "✦";
  position: absolute;
  top: -0.85rem; left: 50%;
  transform: translateX(-50%);
  background: var(--parchment);
  color: var(--heather);
  padding: 0 0.5rem;
  font-size: 1rem;
}

h2 { color: var(--hunter); font-size: 1.7rem; margin-top: 2.2rem; }
h3 { color: var(--hunter-deep); font-size: 1.25rem; margin-bottom: 0.2rem; }
a { color: var(--heather-deep); }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.4rem;
}
.card-lead { border-top: 5px solid var(--hunter); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.about-flex { display: flex; gap: 2rem; align-items: flex-start; }
@media (max-width: 720px) { .about-flex { flex-direction: column; } }
.about-portrait {
  flex: none; width: 220px; border-radius: 8px;
  border: 4px solid var(--white); box-shadow: var(--shadow);
  background: var(--parchment-2);
}
.fact-list { list-style: none; padding: 0; margin: 1rem 0; }
.fact-list li { padding: 0.4rem 0; border-bottom: 1px dashed var(--line); font-family: var(--sans); font-size: 0.98rem; }
.fact-list strong { color: var(--hunter); }

/* ---------- Sermon / Book rows ---------- */
.sermon-item {
  border-left: 4px solid var(--heather);
  padding: 0.6rem 0 0.6rem 1rem;
  margin-bottom: 1.1rem;
}
.sermon-meta { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); }

.sermon-embed {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  margin-bottom: 1.2rem;
}
.sermon-embed iframe { display: block; width: 100%; border: 0; }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 1.4rem; }
@media (max-width: 720px) { .video-grid { grid-template-columns: 1fr; } }
.video-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; cursor: pointer; overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video-embed img.video-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; border: 0;
}
.video-embed .play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 68px; height: 48px; border-radius: 12px;
  background: rgba(20, 20, 20, 0.78);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.video-embed:hover .play-btn { background: var(--gold, #c8102e); transform: translate(-50%, -50%) scale(1.06); }
.video-embed .play-btn::after {
  content: ""; display: block;
  border-style: solid; border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
.video-card .video-body { padding: 1rem 1.2rem 1.2rem; }
.video-card h3 { margin: 0 0 0.3rem; font-size: 1.08rem; line-height: 1.35; }
.video-card .video-src { font-family: var(--sans); font-size: 0.85rem; color: var(--gold); font-weight: 700; margin: 0; }

.book { display: flex; gap: 1.4rem; }
@media (max-width: 560px) { .book { flex-direction: column; } }
.book-cover {
  flex: none; width: 150px; height: 210px;
  border-radius: 4px; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 1rem; color: #fff;
  font-weight: 700; line-height: 1.3;
  background: linear-gradient(160deg, var(--hunter), var(--hunter-deep));
  border: 2px solid var(--gold);
}
.book-cover.alt { background: linear-gradient(160deg, var(--heather), var(--heather-deep)); }
.cover-img {
  flex: none; width: 155px; height: auto; align-self: flex-start;
  border-radius: 4px; box-shadow: var(--shadow); border: 1px solid var(--line);
  background: var(--white);
}
.price { font-family: var(--sans); color: var(--gold); font-weight: 700; }

/* Publisher section heading */
.pub-head {
  display: flex; align-items: center; gap: 0.8rem;
  margin: 2.6rem 0 1.2rem;
}
.pub-head h2 { margin: 0; white-space: nowrap; }
.pub-head::after {
  content: ""; flex: 1 1 auto; height: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 10px, transparent 10px 16px);
}
.book-links { margin-top: 0.6rem; }

/* ---------- Contact ---------- */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--sans); font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--hunter); font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 0.7rem; border: 1px solid var(--line);
  border-radius: 4px; font-family: var(--sans); font-size: 1rem; background: var(--white);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--hunter-deep);
  color: #cfe0d3;
  text-align: center;
  padding: 2.4rem 1.5rem 2rem;
  font-family: var(--sans);
  font-size: 0.9rem;
}
.site-footer a { color: var(--gold); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { margin: 0.8rem 0; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.muted { color: var(--ink-soft); font-size: 0.95rem; }
.note { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); font-style: italic; }

/* ---------- Blog ---------- */
.blog-intro { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; color: var(--ink-soft); }
.post-preview h3 { margin-top: 0; }
.post-preview h3 a { color: var(--hunter-deep); text-decoration: none; }
.post-preview h3 a:hover { text-decoration: underline; }
.post-preview .read-more { font-family: var(--sans); font-size: 0.95rem; }

/* Individual post pages */
.post-header { text-align: center; margin: 0.5rem 0 1.8rem; }
.post-header h1 { color: var(--hunter); font-size: clamp(1.8rem, 4vw, 2.7rem); margin: 0 0 0.5rem; line-height: 1.15; }
.post-meta { font-family: var(--sans); font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.6px; }
.post-body { font-size: 1.08rem; }
.post-body p { margin: 0 0 1.15rem; }
.post-body h2 { font-size: 1.45rem; margin: 2rem 0 0.6rem; }
.post-body blockquote {
  margin: 1.4rem 0; padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 4px solid var(--heather); color: var(--ink-soft); font-style: italic;
}
.back-link { display: inline-block; margin-top: 2rem; font-family: var(--sans); font-size: 0.92rem; }

/* ---------- Subscribe ---------- */
.subscribe-card { border-top: 5px solid var(--gold); text-align: center; }
.subscribe-card h2 { margin-top: 0; }
.subscribe-form { margin: 1.1rem auto 0; max-width: 560px; }
.subscribe-row { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.subscribe-row input {
  flex: 1 1 260px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}
.subscribe-row input:focus { outline: none; border-color: var(--hunter); box-shadow: 0 0 0 2px rgba(35,77,52,0.18); }
.subscribe-row .btn { flex: 0 0 auto; margin: 0; cursor: pointer; }
.subscribe-form .note { margin: 0.8rem 0 0; }
@media (max-width: 480px) {
  .subscribe-row input { flex: 1 1 100%; }
  .subscribe-row .btn { width: 100%; }
}


/* ================= Responsive / Mobile ================= */
.nav-toggle { display: none; }
.nav-burger { display: none; }

@media (max-width: 820px) {
  .nav-inner { padding: 0.6rem 1rem; }
  .brand .crest { height: 56px; }
  .brand-name { font-size: 1.1rem; }
  .brand-tag { font-size: 0.66rem; }

  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 42px; padding: 9px; margin-left: auto; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.35); border-radius: 6px;
  }
  .nav-burger span { display: block; height: 3px; width: 100%; background: var(--gold); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  nav { order: 3; flex-basis: 100%; }
  .nav-links { display: none; flex-direction: column; gap: 4px; margin-top: 0.6rem; }
  .nav-toggle:checked ~ nav .nav-links { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { padding: 0.9rem 1rem; font-size: 1.05rem; border-radius: 6px; }

  .hero { padding: 3.4rem 1.1rem; }
  .about-hero .crest-lg { height: 120px; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hero .subtitle { font-size: 0.9rem; letter-spacing: 0.5px; }
  .hero p.lead { font-size: 1.05rem; }
  .hero-overlay { padding: 4vw 1.1rem 8vw; }
  .hero-overlay .subtitle { letter-spacing: 1px; line-height: 1.35; }
  .hero .btn, .hero-actions .btn { display: block; width: 100%; max-width: 340px; margin: 0.5rem auto; }

  main { padding: 2rem 1.05rem; }
  .card { padding: 1.3rem 1.2rem; }

  .book { flex-direction: column; align-items: center; text-align: center; }
  .book .book-links, .book h3, .book p { text-align: center; }
  .cover-img { width: 168px; align-self: center; }

  .pub-head h2 { white-space: normal; }
}

@media (max-width: 480px) {
  body { font-size: 17px; }
  .brand-name { font-size: 1rem; }
  .brand .crest { height: 50px; }
  .btn { width: 100%; max-width: 340px; margin: 0.4rem auto; }
  .book-links .btn { display: block; }
  .footer-links { flex-direction: column; gap: 0.5rem; }
}
