/* ==========================================================================
   FormosaBible Homepage Specific Layout & Components (home.css)
   Formosa Reading Landscape System (Issue #48)
   ========================================================================== */

/* ==========================================================================
   Section Headers & Common Headings
   ========================================================================== */
.section-header-block {
  margin-bottom: 48px;
  max-width: 820px;
}

.section-eyebrow {
  font-family: var(--font-coordinates);
  font-size: 16px;
  color: var(--web-accent-bronze);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
  font-weight: 600;
}

.section-title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  color: var(--color-text-wood);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-lead {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* ==========================================================================
   Top Navigation / Masthead
   ========================================================================== */
.site-header {
  width: 100%;
  border-bottom: 2px solid var(--color-border-rule);
  background-color: rgba(249, 245, 236, 0.96);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
}

.brand-seal-icon {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--brand-antique-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--brand-antique-gold);
  font-family: var(--font-serif-tc);
  font-weight: 700;
}

.brand-title {
  font-family: var(--font-serif-tc);
  font-size: 20px;
  color: var(--color-text-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--color-text-wood);
  padding: 8px 4px;
}

.nav-link:hover {
  color: var(--color-text-primary);
}

.header-cta-btn {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  padding: 10px 22px;
  min-height: 44px;
  background-color: var(--color-cta-bg);
  color: var(--color-cta-text);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.header-cta-btn:hover {
  background-color: var(--color-cta-hover);
}

@media (max-width: 900px) {
  .nav-menu {
    display: none;
  }
  .header-inner {
    height: 64px;
  }
}

/* ==========================================================================
   Contour Background Micro-Motion (Formosa Topographic Contour)
   ========================================================================== */
.contour-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.contour-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.contour-line-enters {
  fill: none;
  stroke: var(--color-contour);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 2800;
  stroke-dashoffset: 2800;
  animation: lineFlyAndResolve 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.contour-ridge-line {
  fill: none;
  stroke: var(--color-contour);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: ridgeResolve 2.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes lineFlyAndResolve {
  0% {
    stroke-dashoffset: 2800;
    opacity: 0.7;
  }
  30% {
    opacity: 0.55;
  }
  75% {
    stroke-dashoffset: 0;
    opacity: 0.35;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.14;
  }
}

@keyframes ridgeResolve {
  0% {
    stroke-dashoffset: 1200;
    opacity: 0;
  }
  40% {
    opacity: 0.4;
  }
  80% {
    stroke-dashoffset: 0;
    opacity: 0.25;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.12;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contour-line-enters,
  .contour-ridge-line {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 0.14 !important;
  }
}

/* ==========================================================================
   Section 1: Hero
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}

.hero-broadsheet {
  display: grid;
  grid-template-columns: 56% 44%;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-left-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.015em;
}

.hero-tagline {
  font-family: var(--font-serif-tc);
  font-size: var(--fs-tagline);
  line-height: 1.4;
  color: var(--color-text-wood);
  font-weight: 600;
}

/* Scripture Hero Box */
.scripture-hero-box {
  border-left: 4px solid var(--color-text-wood);
  padding: 24px 28px;
  background-color: rgba(255, 255, 255, 0.65);
  border-radius: 0 4px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(74, 53, 32, 0.04);
}

.scripture-coordinate {
  font-family: var(--font-coordinates);
  font-size: 16px;
  color: var(--web-accent-bronze);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.scripture-hanji {
  font-size: var(--fs-scripture);
  line-height: var(--lh-scripture);
  font-weight: 600;
  color: var(--color-text-primary);
}

.scripture-poj {
  font-family: var(--font-serif-poj);
  font-size: var(--fs-poj);
  line-height: var(--lh-poj);
  font-style: italic;
  color: var(--web-accent-bronze);
  font-weight: 500;
}

.hero-warm-copy {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-secondary);
  max-width: 620px;
}

.hero-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-right-column {
  position: relative;
}

@media (max-width: 992px) {
  .hero-broadsheet {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-section {
    padding: 40px 0 64px;
  }
  .hero-right-column {
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
  }
}

/* ==========================================================================
   Section 2: 平行對讀 (Parallel Reading in Action)
   ========================================================================== */
.parallel-section {
  padding: var(--section-spacing) 0;
  position: relative;
}

.parallel-track {
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border-rule);
  border-radius: 4px;
  padding: 36px 32px;
  margin-bottom: 40px;
  box-shadow: 0 4px 16px rgba(74, 53, 32, 0.04);
}

.parallel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  position: relative;
}

.parallel-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.parallel-col:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0;
  right: -16px;
  bottom: 0;
  width: 1px;
  background-color: var(--color-border-rule);
}

.parallel-col-label {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-wood);
  border-bottom: 1px solid var(--color-border-rule);
  padding-bottom: 8px;
  letter-spacing: 0.02em;
}

.parallel-col-hanji {
  font-size: 26px;
  line-height: 1.7;
  color: var(--color-text-primary);
}

.parallel-col-poj {
  font-family: var(--font-serif-poj);
  font-size: 20px;
  line-height: 1.6;
  font-style: italic;
  color: var(--web-accent-bronze);
}

.parallel-col-cuv {
  font-size: 20px;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.parallel-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 860px) {
  .parallel-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .parallel-col:not(:last-child)::after {
    display: none;
  }
  .parallel-gallery {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   Section 3: 家的語言 (Family & Mother Tongue Story)
   ========================================================================== */
.family-section {
  padding: var(--section-spacing) 0;
  background-color: rgba(255, 255, 255, 0.4);
  position: relative;
}

.family-content-wrap {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.family-seal {
  width: 52px;
  height: 52px;
  border: 2px solid var(--color-seal-red);
  color: var(--color-seal-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif-tc);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: 0.1em;
  padding: 4px;
  margin-bottom: 8px;
}

.family-story-p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-primary);
  text-align: justify;
  text-justify: inter-ideograph;
}

.family-pullquote {
  font-size: 28px;
  line-height: 1.5;
  color: var(--color-text-wood);
  font-weight: 600;
  border-top: 1px solid var(--color-border-rule);
  border-bottom: 1px solid var(--color-border-rule);
  padding: 24px 0;
  margin-top: 12px;
  width: 100%;
}

@media (max-width: 768px) {
  .family-pullquote {
    font-size: 22px;
  }
}

/* ==========================================================================
   Section 4: 每日同行 (Daily Companion & Devotion)
   ========================================================================== */
.daily-section {
  padding: var(--section-spacing) 0;
  position: relative;
}

.daily-layout {
  display: grid;
  grid-template-columns: 52% 48%;
  gap: 48px;
  align-items: center;
}

.daily-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.daily-feature-item {
  border-left: 2px solid var(--brand-antique-gold);
  padding-left: 20px;
}

.daily-feature-title {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-wood);
  margin-bottom: 6px;
}

.daily-feature-desc {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-secondary);
}

@media (max-width: 860px) {
  .daily-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ==========================================================================
   Section 5: 恩典分享 (Blessing Card & Sharing)
   ========================================================================== */
.blessing-section {
  padding: var(--section-spacing) 0;
  background-color: rgba(255, 255, 255, 0.4);
  position: relative;
}

.blessing-card-wrap {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.blessing-card-preview {
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border-rule);
  border-radius: 4px;
  padding: 40px 32px;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(74, 53, 32, 0.04);
  text-align: center;
}

@media (max-width: 768px) {
  .blessing-card-preview {
    padding: 28px 20px;
  }
}

/* ==========================================================================
   Section 6: 安心專注 (Built for Quiet Reading)
   ========================================================================== */
.quiet-section {
  padding: var(--section-spacing) 0;
  position: relative;
}

.proof-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

.proof-item {
  border-top: 2px solid var(--color-text-wood);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proof-title {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  color: var(--color-text-wood);
}

.proof-desc {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-secondary);
}

@media (max-width: 768px) {
  .proof-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   Section 7: Final CTA
   ========================================================================== */
.final-cta-section {
  padding: 96px 0 108px;
  text-align: center;
  background-color: var(--color-bg-paper);
  position: relative;
}

.final-cta-box {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 2px solid var(--color-border-rule);
  background-color: rgba(26, 24, 18, 0.03);
  padding: 64px 0 48px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand-title {
  font-family: var(--font-serif-tc);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.footer-brand-tagline {
  font-size: 16px;
  color: var(--color-text-wood);
  font-weight: 600;
}

.footer-legal-copy {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-link {
  font-size: 16px;
  color: var(--color-text-wood);
  font-weight: 600;
}

.footer-link:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--color-border-rule);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   Responsive Mobile Adjustments (<= 768px Viewport)
   ========================================================================== */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-nav {
    align-items: flex-start;
  }
  .footer-nav-links {
    justify-content: flex-start;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-primary {
    width: 100%;
  }
  .hero-action-row {
    width: 100%;
  }
}
