/* ============================================
   SENTINEL — "Rampart & Horizon" Design System
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&display=swap');

/* --- Custom Properties --- */
:root {
  /* Colour palette — derived from hero image */
  --night-sky:      #0D1B2A;
  --amber:          #C8873A;
  --horizon-gold:   #E8B86D;
  --city-dusk:      #1E2D40;
  --feather-white:  #F0EDE6;
  --sword-steel:    #8A9BAE;
  --whatsapp-btn:   #C8A882;
  --whatsapp-hover: #B8976F;

  /* Typography */
  --font-display: 'Abril Fatface', serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --section-pad: clamp(4rem, 10vw, 8rem);
  --content-max: 72rem;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.7;
  color: var(--feather-white);
  background-color: var(--night-sky);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- Typography Scale --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400; /* Abril Fatface only has 400 */
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--feather-white);
}

h1 {
  font-size: clamp(3.5rem, 12vw, 9rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: var(--amber);
}

p {
  margin-bottom: 1.25rem;
}

.accent-text {
  color: var(--amber);
}

.steel-text {
  color: var(--sword-steel);
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.site-nav.transparent {
  background-color: transparent;
}

.site-nav.solid {
  background-color: rgba(13, 27, 42, 0.97);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--feather-white);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--feather-white);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--feather-white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--feather-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(75vw, 300px);
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    background: var(--night-sky);
    transform: translateX(100%);
    transition: transform 0.4s ease;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1rem;
  }
}

/* --- WhatsApp Button (shared component) --- */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.25rem;
  background-color: var(--whatsapp-btn);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: box-shadow 0.4s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
  box-shadow: 0 0 30px rgba(200, 168, 130, 0.35),
              0 0 60px rgba(200, 135, 58, 0.15);
  transform: translateY(-2px);
}

.btn-whatsapp svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  flex-shrink: 0;
}

.btn-whatsapp-nav {
  padding: 0.6rem 1.4rem;
  font-size: 0.8rem;
  border-radius: 3px;
}

/* --- Hero Section (Homepage) --- */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2rem 8vh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* Dark vignette overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center 30%, transparent 20%, rgba(13, 27, 42, 0.3) 70%),
    linear-gradient(to top, rgba(13, 27, 42, 0.85) 0%, rgba(13, 27, 42, 0.2) 40%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 52rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 15vw, 11rem);
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.06em;
  color: var(--feather-white);
  text-shadow: 0 4px 40px rgba(13, 27, 42, 0.8),
               0 2px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--sword-steel);
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* --- Inner Page Hero (About, Start Here) --- */
.inner-hero {
  position: relative;
  width: 100%;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 2rem 4rem;
  overflow: hidden;
}

.inner-hero .hero-bg img {
  object-position: center 15%;
}

.inner-hero .hero-bg::after {
  background:
    linear-gradient(to top, var(--night-sky) 0%, rgba(13, 27, 42, 0.7) 50%, rgba(13, 27, 42, 0.3) 100%);
}

.inner-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.inner-hero-content h1 {
  font-size: clamp(2.8rem, 10vw, 6rem);
  text-shadow: 0 4px 30px rgba(13, 27, 42, 0.8);
  margin-bottom: 0.75rem;
}

.inner-hero-content p {
  color: var(--sword-steel);
  font-size: clamp(1rem, 2vw, 1.15rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* --- Angular Section Transitions --- */
.section-clip-top {
  clip-path: polygon(0 4vw, 100% 0, 100% 100%, 0 100%);
  margin-top: -4vw;
  padding-top: calc(4vw + var(--section-pad));
}

.section-clip-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4vw), 0 100%);
  padding-bottom: calc(4vw + var(--section-pad));
}

.section-clip-both {
  clip-path: polygon(0 4vw, 100% 0, 100% calc(100% - 4vw), 0 100%);
  margin-top: -4vw;
  padding-top: calc(4vw + var(--section-pad));
  padding-bottom: calc(4vw + var(--section-pad));
}

/* --- Content Sections --- */
.section {
  padding: var(--section-pad) 2rem;
  position: relative;
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.bg-night {
  background-color: var(--night-sky);
}

.bg-dusk {
  background-color: var(--city-dusk);
}

/* Subtle grain texture on dark panels */
.bg-dusk::before,
.bg-night.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
}

/* Golden glow behind key headings */
.glow-heading {
  position: relative;
}

.glow-heading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(200, 135, 58, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* --- Two-column layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* --- Session schedule cards --- */
.schedule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.schedule-card {
  background: rgba(30, 45, 64, 0.6);
  border-left: 3px solid var(--amber);
  padding: 1.5rem 1.75rem;
  border-radius: 2px;
}

.schedule-card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.schedule-card .time {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--feather-white);
  margin-bottom: 0.25rem;
}

.schedule-card .detail {
  color: var(--sword-steel);
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .schedule-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Journey steps (Start Here) --- */
.journey-step {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 3rem;
}

.journey-step::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--amber);
  opacity: 0.4;
}

.journey-step h3 {
  text-transform: none;
  font-family: var(--font-display);
}

/* --- Scripture references --- */
.scripture {
  border-left: 3px solid var(--amber);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(200, 135, 58, 0.06);
  font-style: italic;
  color: var(--horizon-gold);
  border-radius: 0 3px 3px 0;
}

.scripture cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--sword-steel);
}

/* --- Session arc list --- */
.session-arc {
  list-style: none;
  counter-reset: arc;
}

.session-arc li {
  counter-increment: arc;
  position: relative;
  padding: 1rem 0 1rem 3rem;
  border-bottom: 1px solid rgba(138, 155, 174, 0.1);
}

.session-arc li::before {
  content: counter(arc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--amber);
  opacity: 0.5;
}

.session-arc li strong {
  color: var(--horizon-gold);
}

/* --- CTA Section (end of page) --- */
.cta-section {
  text-align: center;
  padding: var(--section-pad) 2rem;
  position: relative;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--sword-steel);
  max-width: 32rem;
  margin: 0 auto 2rem;
}

/* Diagonal gold accent line */
.gold-rule {
  width: 80px;
  height: 3px;
  background: var(--amber);
  border: none;
  margin: 2rem auto;
  transform: rotate(-3deg);
}

/* --- Fade-in-up animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.24s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.36s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.48s; }

.reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.8rem;
  color: var(--sword-steel);
  border-top: 1px solid rgba(138, 155, 174, 0.1);
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* --- About page: hero image side panel --- */
.about-image-panel {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  min-height: 400px;
}

.about-image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  position: absolute;
  inset: 0;
}

.about-image-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--city-dusk) 0%, transparent 50%);
}

/* --- Responsive fine-tuning --- */
@media (max-width: 768px) {
  .hero {
    padding-bottom: 6vh;
    min-height: 100svh;
  }

  .hero-bg img {
    object-position: center 25%;
  }

  .inner-hero {
    min-height: 45vh;
  }

  .section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-nav {
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: 0.03em;
  }

  .btn-whatsapp {
    padding: 0.9rem 1.75rem;
    font-size: 0.9rem;
  }

  .about-image-panel {
    min-height: 280px;
  }
}
