/* ==========================================================================
   LAYOUT — Section Headers, Sections, Navigation, Hero, Footer
   Lines 148-619 + 1419-1456 from styles.css
   ========================================================================== */

/* ---------- SCROLL PROGRESS BAR ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light), var(--color-accent));
  z-index: 1001;
  pointer-events: none;
  transition: width 0.05s linear;
}

/* ---------- SECTION HEADERS ---------- */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
}

.section-number {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

/* Small vermillion seal mark next to section numbers */
.section-number::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--color-vermillion);
  border-radius: 1.5px;
  box-shadow: 0 0 6px rgba(194, 59, 34, 0.4);
  opacity: 0.9;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.12em;
  color: var(--color-primary);
  transition: color var(--t-base) var(--ease-out);
}

[data-theme="dark"] .section-title {
  color: #f5f0e8;
}

.section-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-accent-light), var(--color-accent), transparent);
  box-shadow: 0 1px 5px rgba(212, 175, 55, 0.2);
  margin: 1rem auto 0;
  position: relative;
}

/* Ornamental diamond on section line */
.section-line::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  transform: translate(-50%, -50%) rotate(45deg);
}

.subsection-title {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin: 4rem 0 1.5rem;
  text-align: center;
  transition: color var(--t-base) var(--ease-out);
}

[data-theme="dark"] .subsection-title {
  color: var(--color-accent-light);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: var(--section-py) 0;
  position: relative;
  overflow: hidden;
}

.section--alt {
  background-color: var(--color-bg-alt);
  transition: background-color var(--t-base) var(--ease-out);
}

/* Cloud motif pattern on alternating sections */
.section--alt::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300' viewBox='0 0 600 300'%3E%3Cg fill='none' stroke='%231a3a6b' stroke-width='0.6'%3E%3Cpath d='M80,150 Q100,100 135,125 Q160,80 195,110 Q220,80 245,115 Q265,95 280,130 Q265,155 240,140 Q215,165 190,140 Q160,170 130,140 Q100,160 80,150Z'/%3E%3Cpath d='M380,100 Q400,55 430,78 Q455,40 480,68 Q505,45 525,75 Q510,100 490,88 Q465,110 440,88 Q415,110 395,90 Q380,105 380,100Z'/%3E%3Cpath d='M200,250 Q220,210 250,230 Q270,195 300,218 Q325,195 345,225 Q330,250 310,238 Q285,260 260,238 Q235,258 215,240 Q200,252 200,250Z'/%3E%3Cpath d='M480,220 Q495,190 515,205 Q530,180 550,198 Q565,185 575,210 Q565,228 550,218 Q530,235 515,218 Q498,230 485,218Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 600px 300px;
}

[data-theme="dark"] .section--alt::before {
  opacity: 0.025;
  filter: invert(0.85) sepia(0.2) saturate(0.6);
}

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background-color var(--t-base) var(--ease-out),
    padding var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
}

.nav.scrolled {
  background-color: var(--color-bg);
  padding: 0.6rem 0;
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .nav.scrolled {
  background-color: var(--color-primary-dark);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--section-px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Seal stamp logo */
.nav-logo {
  display: flex;
  align-items: center;
  transition: opacity var(--t-fast);
}

.nav-logo:hover {
  opacity: 0.8;
}

.seal-stamp {
  width: 36px;
  height: 36px;
}

.seal-stamp .seal-bg {
  fill: var(--color-vermillion);
  transition: fill var(--t-fast);
}

.seal-stamp .seal-border {
  fill: none;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.8;
}

.seal-stamp .seal-text {
  fill: #f5f0e8;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.7);
  transition: color var(--t-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--t-base) var(--ease-out);
}

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

.nav-links a:hover {
  color: #f5f0e8;
}

.nav.scrolled .nav-links a {
  color: var(--color-text-secondary);
}

.nav.scrolled .nav-links a:hover {
  color: var(--color-primary);
}

[data-theme="dark"] .nav.scrolled .nav-links a {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .nav.scrolled .nav-links a:hover {
  color: var(--color-accent-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(245, 240, 232, 0.7);
  transition: color var(--t-fast), background-color var(--t-fast);
}

.nav.scrolled .theme-toggle {
  color: var(--color-text-secondary);
}

.theme-toggle:hover {
  color: var(--color-accent);
}

[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-fast);
  color: rgba(245, 240, 232, 0.7);
}

.nav.scrolled .nav-hamburger span {
  color: var(--color-text);
}

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

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

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

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hero-bg);
  overflow: hidden;
}

/* Radial vignette on hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(5, 10, 25, 0.4) 100%);
  z-index: 1;
  pointer-events: none;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

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

.hero-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ornament-line {
  width: 50px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.ornament-diamond {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--color-accent);
  transform: rotate(45deg);
  background: transparent;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #D4AF37 0%, #F3E5AB 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--color-accent);
  /* Fallback */
  text-shadow: 0 2px 20px rgba(212, 175, 55, 0.15);
}

.hero-title {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.18em;
  color: rgba(245, 240, 232, 0.6);
  text-transform: uppercase;
}

.hero-dot {
  color: var(--color-accent);
  margin: 0 0.5rem;
}

.hero-scroll {
  position: absolute;
  bottom: -6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero-scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.35);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(1);
  }

  50% {
    opacity: 1;
    transform: scaleY(1.3);
  }
}

/* Wave divider — multi-layer ukiyo-e style */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}

.wave-divider svg {
  width: 100%;
  height: 120px;
  display: block;
}

@keyframes waveBreathing {

  0%,
  100% {
    transform: translateY(0) scaleY(1);
  }

  50% {
    transform: translateY(-4px) scaleY(1.03);
  }
}

.wave-layer-1 {
  fill: var(--color-bg);
  opacity: 0.25;
  animation: waveBreathing 7s ease-in-out infinite;
  transform-origin: bottom center;
}

.wave-layer-2 {
  fill: var(--color-bg);
  opacity: 0.5;
  animation: waveBreathing 9s ease-in-out infinite 1s;
  transform-origin: bottom center;
}

.wave-layer-3 {
  fill: var(--color-bg);
  animation: waveBreathing 11s ease-in-out infinite 2s;
  transform-origin: bottom center;
}


/* --- Footer (lines 1419-1456) --- */

/* ---------- FOOTER ---------- */
.footer {
  padding: 2.5rem 0;
  background: var(--color-primary-dark);
  color: rgba(245, 240, 232, 0.5);
  text-align: center;
  position: relative;
}

/* Gold top border on footer */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.4;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer .seal-stamp {
  width: 32px;
  height: 32px;
}

.footer p {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

