/* ============================================================
   Sacred Canopy Initiative — Harbor Heritage Theme
   sacredcanopy.bluegreentheology.org
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Cormorant+SC:wght@300;400&family=PT+Sans:ital,wght@0,400;0,700;1,400&display=swap');

/* ---- Tokens ---- */
:root {
  --cream:        #F9F6F0;
  --warm-white:   #FFFFFF;
  --teal:         #4A7C7E;
  --teal-light:   #8FB5B0;
  --teal-dark:    #3A6264;
  --green:        #1F3D33;
  --green-mid:    #2D5016;
  --slate:        #2C3539;
  --slate-light:  #4A5568;
  --rule:         #D4C9B5;

  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sc:      'Cormorant SC', Georgia, serif;
  --font-sans:    'PT Sans', system-ui, sans-serif;

  --measure:      66ch;
  --section-pad:  5rem 1.5rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { display: block; max-width: 100%; height: auto; }

/* ---- Base ---- */
body {
  background: var(--cream);
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--green);
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 300; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; color: var(--teal-dark); }

p { max-width: var(--measure); }
p + p { margin-top: 1.1em; }

a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--green); }

em { font-style: italic; }
strong { font-weight: 700; }

blockquote {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--green);
  border-left: 3px solid var(--teal-light);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  max-width: var(--measure);
}

/* ============================================================
   NAV — transparent over hero, solidifies on scroll
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 2.5rem;
  /* Start: dark enough at the top to read nav text over any photo */
  background: linear-gradient(to bottom, rgba(10,20,18,0.72) 0%, rgba(10,20,18,0.18) 60%, rgba(10,20,18,0) 100%);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

/* Scrolled state — frosted cream, same as parent site */
.site-nav.scrolled {
  background: rgba(249,246,240,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(74,124,126,0.18);
}

/* Interior pages: nav always in scrolled state (no hero beneath) */
.nav-interior {
  background: rgba(249,246,240,0.97) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom-color: rgba(74,124,126,0.18) !important;
}

/* Brand */
.nav-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  line-height: 1.2;
}

.nav-brand-name {
  font-family: var(--font-sc);
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.95);
  transition: color 0.4s;
}

.nav-brand-sub {
  font-family: var(--font-sc);
  font-weight: 300;
  font-size: 0.86rem;
  letter-spacing: 0.13em;
  color: rgba(255,255,255,0.52);
  transition: color 0.4s;
}

.site-nav.scrolled .nav-brand-name,
.nav-interior .nav-brand-name {
  color: var(--green);
}

.site-nav.scrolled .nav-brand-sub,
.nav-interior .nav-brand-sub {
  color: var(--teal-dark);
}

/* Links */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover { color: rgba(255,255,255,1); }

.site-nav.scrolled .nav-links a,
.nav-interior .nav-links a {
  color: var(--slate-light);
}

.site-nav.scrolled .nav-links a:hover,
.nav-interior .nav-links a:hover {
  color: var(--teal-dark);
}

.site-nav.scrolled .nav-links a.active,
.nav-interior .nav-links a.active {
  color: var(--teal-dark);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  transition: background 0.4s;
}

.site-nav.scrolled .nav-toggle span,
.nav-interior .nav-toggle span {
  background: var(--green);
}

/* Body offset — just the nav height, no parent bar */
body { padding-top: 5rem; }

/* Pages with a full-bleed hero remove the top padding
   so the hero runs edge to edge behind the nav */
body.has-hero { padding-top: 0; }

/* ============================================================
   HERO — full viewport, photo forward
   ============================================================ */

.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 680px;
  overflow: hidden;
  display: grid;
  place-items: end center; /* content sits at bottom */
}

/* The photo layer */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 55%;
  background-repeat: no-repeat;
}

/* Dark gradient over photo — same gradient logic as parent site */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,20,18,0.08)  0%,
    rgba(10,20,18,0.22) 22%,
    rgba(10,20,18,0.60) 52%,
    rgba(10,20,18,0.86) 74%,
    rgba(10,20,18,0.94) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  padding: 0 2.5rem 5rem;
  /* Right-aligned on desktop like parent site */
  margin-left: auto;
  margin-right: 0;
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--teal-light);
  margin-bottom: 1.2rem;
}

.hero h1 {
  color: var(--cream);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 32px rgba(0,0,0,0.5);
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  color: rgba(249,246,240,0.88);
  font-style: italic;
  margin-bottom: 2.5rem;
  max-width: 52ch;
  text-shadow: 0 1px 16px rgba(0,0,0,0.6);
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.55;
}

.scroll-hint span {
  font-family: var(--font-sc);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.6);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollPulse 2.2s 1.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.12); }
}

/* Essay hero — shorter than homepage, same photo treatment */
.hero--essay {
  min-height: 60vh;
  height: 60vh;
}

.hero-byline {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: rgba(249,246,240,0.6);
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
  border: 1.5px solid transparent;
}

.btn-primary {
  background: var(--teal);
  color: var(--cream);
  border-color: var(--teal);
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--cream);
}

.btn-outline {
  background: transparent;
  color: rgba(249,246,240,0.85);
  border-color: rgba(249,246,240,0.45);
}
.btn-outline:hover {
  background: rgba(249,246,240,0.12);
  color: var(--cream);
  border-color: rgba(249,246,240,0.8);
}

/* btn-outline on light backgrounds (interior pages) */
.btn-outline-dark {
  background: transparent;
  color: var(--teal-dark);
  border-color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-outline-dark:hover {
  background: var(--teal);
  color: var(--cream);
}

/* ---- Sections ---- */
.section { padding: var(--section-pad); }
.section-inner { max-width: 820px; margin: 0 auto; }
.section-inner-wide { max-width: 1100px; margin: 0 auto; }

.section--cream { background: var(--cream); }
.section--white { background: var(--warm-white); }

.section--green {
  background: var(--green);
  color: var(--cream);
}
.section--green h2,
.section--green h3,
.section--green h4 { color: var(--cream); }
.section--green p { color: rgba(249,246,240,0.88); }
.section--green blockquote { color: var(--teal-light); border-color: var(--teal); }
.section--green a { color: var(--teal-light); }

.section-label {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 1rem;
}
.section--green .section-label { color: var(--teal-light); }

/* ---- Two-form cards ---- */
.two-forms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.form-card {
  background: var(--warm-white);
  border: 1px solid var(--rule);
  padding: 2rem;
}

.form-card h3 {
  margin-bottom: 1rem;
  color: var(--teal-dark);
}

@media (max-width: 640px) {
  .two-forms { grid-template-columns: 1fr; }
}

/* ---- Liturgical year grid ---- */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.season-card {
  border-top: 3px solid var(--teal-light);
  padding: 1.25rem 0 0;
}

.season-card h4 {
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--green);
}

.season-card p {
  font-size: 0.92rem;
  max-width: none;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--green);
  color: rgba(249,246,240,0.7);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.site-footer a { color: var(--teal-light); text-decoration: none; }
.site-footer a:hover { color: var(--cream); }

.footer-inner { max-width: 600px; margin: 0 auto; }

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--cream);
  display: block;
  margin-bottom: 0.4rem;
}

.footer-tagline {
  font-style: italic;
  color: var(--teal-light);
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.footer-parent {
  font-size: 0.78rem;
  color: rgba(249,246,240,0.45);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  list-style: none;
}

.footer-copy {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.78rem;
}

/* ---- Theology / Essay page ---- */
.essay-header {
  background: var(--green);
  color: var(--cream);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.essay-header h1 {
  color: var(--cream);
  font-style: italic;
  max-width: 700px;
  margin: 1rem auto;
}

.essay-header .subtitle {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--teal-light);
  font-style: italic;
  margin-top: 0.75rem;
}

.essay-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.essay-body h2 {
  font-size: 1.6rem;
  margin: 3rem 0 1rem;
  color: var(--teal-dark);
  font-style: italic;
}

.essay-body p { max-width: none; }
.essay-body p + p { margin-top: 1.1em; }

.essay-footnotes {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--slate-light);
}

.essay-footnotes p { max-width: none; }

.pdf-download {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 700px;
}

/* ---- Join page ---- */
.join-header {
  background: var(--green);
  color: var(--cream);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.join-header h1 {
  color: var(--cream);
  font-style: italic;
  max-width: 700px;
  margin: 1rem auto;
}

/* Form fields */
.contact-form {
  max-width: 600px;
  margin: 3rem auto 0;
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--rule);
  background: var(--warm-white);
  color: var(--slate);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
}

.form-group textarea { min-height: 120px; resize: vertical; }
.form-submit { margin-top: 2rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  :root { --section-pad: 3.5rem 1.25rem; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(249,246,240,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
    padding: 1.25rem 1.5rem;
    gap: 1.25rem;
  }
  .nav-links.open a {
    color: var(--slate) !important;
    font-size: 0.9rem;
  }

  .nav-toggle { display: flex; }

  /* Hero: content full-width, pinned to bottom */
  .hero-content {
    max-width: 100%;
    margin: 0;
    padding: 0 1.5rem 4rem;
  }

  .scroll-hint { display: none; }
  .pdf-download { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hero { min-height: 80vh; }
  h1 { font-size: 2rem; }
  .site-nav { padding: 1rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
}
