﻿/* ==========================================================================
   Kenpo Connection v2 — design tokens
   Warm faith-and-craft: aged-page parchment, oxblood & gilt accents, an
   illuminated drop-cap as the signature motif tying the Bible Study /
   dissertation / memoir angle to the visual system.
   ========================================================================== */

:root {
  --parchment: #efe1bf;        /* page background — aged paper */
  --parchment-card: #faf3e2;   /* fresh page laid on the aged surface */
  --parchment-edge: #ddc99a;   /* card border / deckle edge */
  --ink: #3a2a1c;              /* warm near-black ink */
  --ink-soft: #6e5a42;         /* muted secondary text */
  --oxblood: #7c2a1e;          /* worn leather / belt binding */
  --oxblood-dark: #5f1f16;
  --gilt: #a9812f;             /* aged brass / gilt edge */
  --gilt-bright: #c79a44;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Spectral", Georgia, serif;
  --font-mono: "Special Elite", "Courier New", monospace;

  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--oxblood-dark); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

h2 { font-size: clamp(1.85rem, 3.2vw, 2.6rem); font-style: italic; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); color: var(--oxblood); font-weight: 600; }

p { margin: 0 0 1.15em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gilt);
}

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

/* Signature motif: illuminated drop cap -------------------------------- */
.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: 3.6em;
  line-height: 0.78;
  float: left;
  padding: 0.03em 0.09em 0 0;
  color: var(--oxblood);
  text-shadow: 2px 2px 0 var(--gilt-bright);
}

/* Gilt rule (header/footer divider) ------------------------------------- */
.gilt-rule {
  height: 5px;
  background:
    linear-gradient(180deg, var(--gilt-bright) 0%, var(--gilt) 100%);
  box-shadow: 0 2px 0 var(--oxblood);
}

/* Header / nav ------------------------------------------------------------ */
#site-header { position: sticky; top: 0; z-index: 40; background: var(--parchment); }

.header-bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.6rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand img { height: 56px; width: auto; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--ink-soft);
  border-radius: 2px;
  width: 42px;
  height: 38px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--ink); display: block; }

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

.primary-nav a {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.3rem 0.1rem;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--oxblood);
  transition: right 0.25s ease;
}
.primary-nav a:hover::after { right: 0; }
.primary-nav a:hover { color: var(--oxblood); }
.primary-nav a[aria-current="page"] { color: var(--oxblood); }
.primary-nav a[aria-current="page"]::before {
  content: "\2022";
  position: absolute;
  left: -0.85rem;
  color: var(--gilt);
}
.primary-nav a[aria-current="page"]::after { right: 0; background: var(--gilt); }

.nav-group { position: relative; }
.nav-group-toggle {
  font: inherit;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.1rem;
}
.nav-caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--ink-soft); }
.nav-submenu {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--parchment-card);
  border: 1px solid var(--parchment-edge);
  display: none;
}
.nav-group.is-open .nav-submenu { display: block; }
.nav-submenu a { display: block; padding: 0.5rem 1rem; }
.nav-submenu a::after { display: none; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--oxblood);
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--oxblood); color: var(--parchment-card); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(58,42,28,0.25); }
.btn-solid { background: var(--oxblood); border-color: var(--oxblood); color: var(--parchment-card); }
.btn-solid:hover { background: var(--oxblood-dark); border-color: var(--oxblood-dark); }

/* Hero ---------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
  --parallax-shift: 0px;
}
.hero-photo {
  position: absolute;
  inset: -40px -20px;
  background-size: cover;
  background-position: center 20%;
  transform: translateY(var(--parallax-shift));
  z-index: -1;
  will-change: transform;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(58,34,20,0.25) 0%, rgba(45,28,17,0.55) 55%, rgba(35,22,14,0.92) 100%);
  z-index: -1;
}
.hero-content { position: relative; z-index: 1; padding: 3rem var(--gutter) 2.5rem; max-width: var(--container); margin: 0 auto; width: 100%; }
.hero-title {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  font-style: italic;
  margin-bottom: 0.15em;
  color: #fbf3e2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  opacity: 0;
  animation: fadeUp 0.9s ease 0.15s forwards;
}
.hero-sub {
  font-family: var(--font-mono);
  color: #f1e3c4;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  text-shadow: 1px 1px 1px rgb(0 0 0);
  opacity: 0;
  animation: fadeUp 0.9s ease 0s forwards;
}
.hero-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--gilt-bright);
  max-width: 34ch;
  border-left: 3px solid var(--gilt);
  padding-left: 1rem;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.3s forwards;
}
.hero .gilt-rule { position: absolute; bottom: 0; left: 0; right: 0; z-index: 1; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title, .hero-sub, .hero-quote { animation: none; opacity: 1; }
}

.page-hero {
  min-height: 44vh;
}

/* Sections ------------------------------------------------------------------ */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-card { background: var(--parchment-card); border-top: 1px solid var(--parchment-edge); border-bottom: 1px solid var(--parchment-edge); }

.section-head { max-width: 62ch; margin-bottom: 2.25rem; }

.prose { max-width: 68ch; }
.prose p { color: var(--ink); }

.pull-quote {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  color: var(--oxblood);
  text-align: center;
  max-width: 46ch;
  margin: 3rem auto;
  padding: 2rem 1rem 1rem;
}
.pull-quote::before {
  content: "\201C";
  display: block;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 0.5;
  color: var(--gilt);
  margin-bottom: 0.75rem;
}

/* Book-spine resource cards ------------------------------------------------- */
.grid { display: grid; gap: 1.75rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.teaser-card {
  background: var(--parchment-card);
  border: 1px solid var(--parchment-edge);
  border-left: 5px solid var(--oxblood);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.teaser-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(58,42,28,0.18); }
.teaser-card .eyebrow { margin-bottom: 0.25rem; }
.teaser-card h4 { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; margin-bottom: 0.25rem; color: var(--ink); }
.teaser-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.75rem; }
.teaser-card .btn { margin-top: auto; align-self: flex-start; padding: 0.5rem 1rem; font-size: 0.78rem; }

.resource-card {
  background: var(--parchment-card);
  border: 1px solid var(--parchment-edge);
  border-left: 6px solid var(--oxblood);
  padding: 1.75rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 3px 3px 0 var(--parchment-edge);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.resource-card:hover { transform: translateY(-4px) rotate(-0.2deg); box-shadow: 5px 8px 0 var(--parchment-edge); }
.resource-card::before {
  content: attr(data-stamp);
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gilt);
  border: 1px solid var(--gilt);
  padding: 0.2rem 0.5rem;
}
.resource-card h3 { font-family: var(--font-display); font-style: italic; color: var(--oxblood); font-size: 1.4rem; margin-bottom: 0; padding-right: 6.5rem; }
.resource-card p { font-size: 0.95rem; color: var(--ink-soft); }
.resource-card .btn { align-self: flex-start; margin-top: 0.4rem; }

.video-card {
  background: var(--parchment-card);
  border: 1px solid var(--parchment-edge);
  padding: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(58,42,28,0.18); }
.video-card video { width: 100%; background: #000; margin-bottom: 0.9rem; }
.video-card h3 { font-family: var(--font-display); font-style: italic; margin-bottom: 0.3rem; }
.video-card p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0; }

/* Lineage chain (this content is a genuine sequence) --------------------------- */
.lineage-chain { list-style: none; margin: 0 0 3rem; padding: 0; max-width: 40ch; }
.lineage-chain li {
  position: relative;
  padding: 0.45rem 0 0.45rem 2.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.15rem;
}
.lineage-chain li::before {
  content: "";
  position: absolute; left: 0.42rem; top: 1rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gilt);
  box-shadow: 0 0 0 3px var(--parchment);
}
.lineage-chain li::after {
  content: "";
  position: absolute; left: 0.86rem; top: 1.7rem; bottom: -0.45rem;
  width: 1px; background: var(--parchment-edge);
}
.lineage-chain li:last-child::after { display: none; }
.lineage-chain li.self { color: var(--oxblood); font-size: 1.4rem; }
.lineage-chain li span { display: block; font-family: var(--font-mono); font-style: normal; font-weight: 400; letter-spacing: 0; font-size: 0.72rem; color: var(--ink-soft); }

.bio-block { margin-bottom: 2.5rem; }
.bio-block:last-child { margin-bottom: 0; }

.float-img {
  float: left;
  margin: 0.3rem 1.75rem 1rem 0;
  max-width: 280px;
  border: 6px solid var(--parchment-card);
  box-shadow: 0 2px 10px rgba(58,42,28,0.25);
}
.float-img.right { float: right; margin: 0.3rem 0 1rem 1.75rem; }
.clear { clear: both; }

/* Contact block ------------------------------------------------------------------ */
.contact-block {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  background: var(--parchment-card);
  border: 1px solid var(--parchment-edge);
  border-left: 3px solid var(--oxblood);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.contact-block a { color: var(--oxblood); }

/* Footer -------------------------------------------------------------------------- */
#site-footer { background: var(--parchment); }
.footer-bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.footer-links { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--oxblood); }

/* Scroll reveal ------------------------------------------------------------------- */
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.reveal-ready .reveal.is-visible { opacity: 1; transform: translateY(0); }
html.reveal-ready .reveal.reveal-2 { transition-delay: 0.1s; }
html.reveal-ready .reveal.reveal-3 { transition-delay: 0.2s; }
html.reveal-ready .reveal.reveal-4 { transition-delay: 0.3s; }

/* Responsive ------------------------------------------------------------------------ */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

.lineage-layout { grid-template-columns: 260px 1fr; align-items: start; gap: 2.5rem; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--parchment);
    border-top: 1px solid var(--parchment-edge);
    border-bottom: 1px solid var(--parchment-edge);
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 0; }
  .primary-nav ul li { border-top: 1px solid var(--parchment-edge); }
  .primary-nav ul li:first-child { border-top: 0; }
  .primary-nav a, .nav-group-toggle { display: block; padding: 0.9rem var(--gutter); width: 100%; }
  .primary-nav a[aria-current="page"]::before { left: 0.4rem; }
  .nav-submenu { position: static; border: 0; background: var(--parchment); }
  .header-bar { position: relative; }

  .grid-2, .grid-3, .grid-4, .lineage-layout { grid-template-columns: 1fr; }
  .float-img, .float-img.right { float: none; margin: 0 0 1.25rem; max-width: 100%; }
}
