/* ================================================================
   HERO.CSS — Full-Screen Opening Section
   ================================================================ */

#hero {
  position: relative;
  width: 100%;
  /* 1600px scroll room ≈ 13-14 ticks, text finishes at ~tick 10 */
  height: calc(100vh + 1600px);
  background: transparent;
  z-index: 0;
}

.hero-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;  /* background is on .hero-sticky-bg */
  z-index: 0;
}

/* Separate background div so it can fade independently */
.hero-sticky-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #EEF8F9 0%, #D1E9EC 55%, #B8E3E9 100%);
  z-index: 0;
  pointer-events: none;
}

/* ── Three.js Canvas (hidden — using CSS decorations instead) ── */
#hero-canvas {
  display: none;
}

/* ── Large background year text ── */
.hero-bg-text {
  position: absolute;
  bottom: -0.05em;
  right: -0.02em;
  font-family: var(--font-display);
  font-size: clamp(14rem, 30vw, 30rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 2px rgba(11,46,51,0.22);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  animation: bg-text-drift 18s ease-in-out infinite;
  transform-origin: bottom right;
}

@keyframes bg-text-drift {
  0%, 100% { transform: translateX(0) scale(1); opacity: 1; }
  33%       { transform: translateX(-12px) scale(1.005); opacity: 0.85; }
  66%       { transform: translateX(8px) scale(0.998); opacity: 0.95; }
}

/* ── Static Decorative Layer ── */
.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Gradient blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.hero-blob--1 {
  width: 520px; height: 520px;
  top: -140px; right: -80px;
  background: radial-gradient(circle, rgba(79,124,130,0.28) 0%, transparent 70%);
  animation: blob-drift 12s ease-in-out infinite;
}
.hero-blob--2 {
  width: 400px; height: 400px;
  bottom: -100px; left: -60px;
  background: radial-gradient(circle, rgba(184,227,233,0.35) 0%, transparent 70%);
  animation: blob-drift 16s ease-in-out infinite reverse;
}
.hero-blob--3 {
  width: 280px; height: 280px;
  top: 40%; left: 10%;
  background: radial-gradient(circle, rgba(11,46,51,0.10) 0%, transparent 70%);
  animation: blob-drift 20s ease-in-out infinite 4s;
}

@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(18px, -24px) scale(1.04); }
  66%       { transform: translate(-12px, 16px) scale(0.97); }
}

/* Decorative rings */
.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(11,46,51,0.25);
}
.hero-ring--1 {
  width: 500px; height: 500px;
  top: 50%; right: 5%;
  transform: translateY(-50%);
  border-color: rgba(11,46,51,0.20);
  animation: ring-breathe 8s ease-in-out infinite;
}
.hero-ring--2 {
  width: 320px; height: 320px;
  top: 50%; right: 5%;
  transform: translateY(-50%);
  border-color: rgba(11,46,51,0.40);
  animation: ring-breathe 8s ease-in-out infinite 2s;
}
.hero-ring--3 {
  width: 160px; height: 160px;
  top: 50%; right: 5%;
  transform: translateY(-50%);
  border-color: rgba(11,46,51,0.55);
  animation: ring-breathe 8s ease-in-out infinite 4s;
}
.hero-ring--4 {
  width: 260px; height: 260px;
  top: 15%; left: 3%;
  border-color: rgba(11,46,51,0.30);
  animation: ring-breathe 11s ease-in-out infinite 1s;
}
.hero-ring--5 {
  width: 140px; height: 140px;
  bottom: 20%; left: 15%;
  border: 1.5px dashed rgba(11,46,51,0.35);
  animation: ring-rotate 20s linear infinite;
}

@keyframes ring-breathe {
  0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
  50%       { opacity: 1;   transform: translateY(-50%) scale(1.04); }
}
@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Dot grid pattern */
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(79,124,130,0.30) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, black 100%);
  mask: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, black 100%);
}

/* Floating accent shapes */
.hero-shape {
  position: absolute;
  opacity: 1;
}
.hero-shape--square {
  width: 48px; height: 48px;
  border: 2px solid rgba(11,46,51,0.55);
  top: 22%; left: 8%;
  animation: shape-float 10s ease-in-out infinite;
  transform: rotate(20deg);
}
.hero-shape--square2 {
  width: 28px; height: 28px;
  border: 2px solid rgba(11,46,51,0.45);
  top: 55%; right: 22%;
  animation: shape-float 14s ease-in-out infinite 2s;
  transform: rotate(35deg);
}
.hero-shape--diamond {
  width: 32px; height: 32px;
  border: 2px solid rgba(11,46,51,0.50);
  bottom: 28%; right: 12%;
  animation: shape-float 13s ease-in-out infinite reverse;
  transform: rotate(45deg);
}
.hero-shape--diamond2 {
  width: 18px; height: 18px;
  border: 2px solid rgba(11,46,51,0.45);
  top: 38%; left: 18%;
  animation: shape-float 9s ease-in-out infinite 5s;
  transform: rotate(45deg);
}
.hero-shape--circle {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(11,46,51,0.50);
  background: transparent;
  top: 65%; left: 5%;
  animation: shape-float 9s ease-in-out infinite 3s;
}
.hero-shape--circle2 {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(11,46,51,0.45);
  top: 28%; right: 30%;
  animation: shape-float 7s ease-in-out infinite 1.5s;
}
.hero-shape--line {
  width: 80px; height: 2px;
  background: linear-gradient(to right, transparent, rgba(11,46,51,0.60), transparent);
  top: 30%; right: 20%;
  animation: shape-float 11s ease-in-out infinite 1s;
}
.hero-shape--line2 {
  width: 50px; height: 2px;
  background: linear-gradient(to right, transparent, rgba(11,46,51,0.50), transparent);
  top: 72%; left: 25%;
  animation: shape-float 12s ease-in-out infinite 3s;
  transform: rotate(-20deg);
}
.hero-shape--cross {
  width: 16px; height: 16px;
  top: 48%; left: 30%;
  animation: shape-float 8s ease-in-out infinite 4s;
}
.hero-shape--cross::before,
.hero-shape--cross::after {
  content: '';
  position: absolute;
  background: rgba(11,46,51,0.55);
  border-radius: 1px;
}
.hero-shape--cross::before { width: 100%; height: 2px; top: 50%; left: 0; transform: translateY(-50%); }
.hero-shape--cross::after  { width: 2px; height: 100%; left: 50%; top: 0; transform: translateX(-50%); }

/* Animated SVG decorations */
.hero-svg-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0;
}
.hero-svg-deco circle, .hero-svg-deco rect, .hero-svg-deco polygon {
  stroke: rgba(11,46,51,0.40);
}

.hero-svg-deco--1 {
  width: 180px; height: 180px;
  top: 8%; left: 55%;
  animation: svg-deco-in 1.2s 0.8s ease-out forwards, shape-float 14s 2s ease-in-out infinite;
}
.hero-svg-deco--2 {
  width: 100px; height: 100px;
  bottom: 18%; left: 38%;
  animation: svg-deco-in 1.2s 1.2s ease-out forwards, shape-float 11s 3s ease-in-out infinite reverse;
}
.hero-svg-deco--3 {
  width: 70px; height: 70px;
  top: 40%; right: 28%;
  animation: svg-deco-in 1.2s 1.6s ease-out forwards, shape-float 9s 1s ease-in-out infinite;
}

@keyframes svg-deco-in {
  from { opacity: 0; }
  to   { opacity: 0.8; }
}

@keyframes shape-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%       { transform: translateY(-16px) rotate(var(--r, 0deg)); }
}

/* Wave at bottom */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
  line-height: 0;
}
.hero-wave svg {
  display: block;
  width: 100%;
}

/* ── Content Overlay ── */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  pointer-events: none; /* decorative wrapper — CTA overrides below */
  max-width: 900px;
  width: 100%;
  padding: 0 var(--container-pad);
}

/* ── Tag line ── */
.hero-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(16px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

/* ── Main Name ── */
.hero-name {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

/* Each word wraps for split text animation */
.hero-name .word {
  display: inline-block;
  overflow: hidden;
}
.hero-name .char {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

/* ── Editorial divider line ── */
.hero-divider {
  width: 80px;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto;
  border-radius: 2px;
}

/* ── Typewriter subtitle ── */
.hero-subtitle {
  font-size: var(--fs-h3);
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  height: 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
}

.hero-subtitle-prefix {
  color: var(--text-muted);
}

.hero-subtitle-typed {
  color: var(--accent);
  font-family: var(--font-mono);
  border-right: 2px solid var(--accent);
  padding-right: 4px;
  animation: blink-cursor 0.8s step-end infinite;
}

@keyframes blink-cursor {
  50% { border-color: transparent; }
}

/* ── CTA Buttons ── */
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: auto;
}

/* ── Scroll Indicator ── */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fade-in 1s 2.5s var(--ease-out) forwards;
}

.hero-scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.6); opacity: 0.4; }
}

.hero-scroll-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

/* ── Gradient overlay bottom ── */
/* ::after gradient removed — heroBg fade handles the transition */

@keyframes fade-in {
  to { opacity: 1; }
}

/* ── Dark mode: make all shapes visible on dark bg ── */
body.dark-mode .hero-bg-text,
html.dark-mode-preload body .hero-bg-text {
  -webkit-text-stroke: 1.5px rgba(184,227,233,0.35);
}

body.dark-mode .hero-ring,
html.dark-mode-preload body .hero-ring {
  border-color: rgba(184,227,233,0.28);
}
body.dark-mode .hero-ring--1,
html.dark-mode-preload body .hero-ring--1 { border-color: rgba(184,227,233,0.18); }
body.dark-mode .hero-ring--2,
html.dark-mode-preload body .hero-ring--2 { border-color: rgba(79,124,130,0.55); }
body.dark-mode .hero-ring--3,
html.dark-mode-preload body .hero-ring--3 { border-color: rgba(184,227,233,0.40); }
body.dark-mode .hero-ring--4,
html.dark-mode-preload body .hero-ring--4 { border-color: rgba(79,124,130,0.45); }
body.dark-mode .hero-ring--5,
html.dark-mode-preload body .hero-ring--5 { border-color: rgba(184,227,233,0.30); }

body.dark-mode .hero-shape,
html.dark-mode-preload body .hero-shape { opacity: 0.7; }
body.dark-mode .hero-shape--square,
html.dark-mode-preload body .hero-shape--square { border-color: rgba(184,227,233,0.60); }
body.dark-mode .hero-shape--square2,
html.dark-mode-preload body .hero-shape--square2 { border-color: rgba(79,124,130,0.75); }
body.dark-mode .hero-shape--diamond,
html.dark-mode-preload body .hero-shape--diamond { border-color: rgba(184,227,233,0.55); }
body.dark-mode .hero-shape--diamond2,
html.dark-mode-preload body .hero-shape--diamond2 { border-color: rgba(79,124,130,0.70); }
body.dark-mode .hero-shape--circle,
html.dark-mode-preload body .hero-shape--circle { border-color: rgba(184,227,233,0.55); }
body.dark-mode .hero-shape--circle2,
html.dark-mode-preload body .hero-shape--circle2 { background: rgba(184,227,233,0.50); }
body.dark-mode .hero-shape--line,
html.dark-mode-preload body .hero-shape--line {
  background: linear-gradient(to right, transparent, rgba(184,227,233,0.65), transparent);
}
body.dark-mode .hero-shape--line2,
html.dark-mode-preload body .hero-shape--line2 {
  background: linear-gradient(to right, transparent, rgba(79,124,130,0.75), transparent);
}
body.dark-mode .hero-shape--cross::before,
body.dark-mode .hero-shape--cross::after,
html.dark-mode-preload body .hero-shape--cross::before,
html.dark-mode-preload body .hero-shape--cross::after {
  background: rgba(184,227,233,0.55);
}

body.dark-mode .hero-svg-deco circle,
body.dark-mode .hero-svg-deco rect,
body.dark-mode .hero-svg-deco polygon,
html.dark-mode-preload body .hero-svg-deco circle,
html.dark-mode-preload body .hero-svg-deco rect,
html.dark-mode-preload body .hero-svg-deco polygon {
  stroke: rgba(184,227,233,0.40);
}

@media (max-width: 768px) {
  #hero { height: calc(100vh + 1100px); }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-bg-text { font-size: clamp(8rem, 40vw, 16rem); right: -0.1em; }
  .hero-divider { margin-left: auto; margin-right: auto; }

  /* Keep only 2 rings on mobile — clean, minimal */
  .hero-ring--1 { width: 280px; height: 280px; right: -60px; top: 50%; }
  .hero-ring--2 { width: 180px; height: 180px; right: -60px; top: 50%; }

  /* Hide everything else */
  .hero-ring--3, .hero-ring--4, .hero-ring--5,
  .hero-shape-square, .hero-shape-square2,
  .hero-shape-diamond, .hero-shape-diamond2,
  .hero-shape-circle, .hero-shape-circle2,
  .hero-shape-line, .hero-shape-line2,
  .hero-shape-cross,
  .hero-svg-deco--1, .hero-svg-deco--2, .hero-svg-deco--3 { display: none; }
}
