/**
 * TWC Hero Block Styles
 *
 * Scoped to .twc-hero so nothing bleeds out into the rest of the theme.
 * CSS custom properties fall back to theme-level vars if you define them
 * globally (recommended), or the explicit values below work standalone.
 */

/* ─── Variables (define globally in :root if shared across blocks) ─── */
.twc-hero {
  --twc-navy:       #0a1628;
  --twc-dark-navy:  #060f1d;
  --twc-accent:     #0976bb;
  --twc-accent-dim: #07639C;
  --twc-gold:       #d4a853;
  --twc-white:      #f0f2f5;
  --twc-grey:       #8a96a8;
  --twc-light-grey: #c4cdd9;
  --twc-steel:      #2d3f5e;
}

/* ─── Section ─── */
.twc-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 120px 24px 80px;
  background: var(--twc-dark-navy);
  color: var(--twc-white);
  font-family: 'DM Sans', sans-serif;
}

/* ─── Grid overlay ─── */
.twc-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(9, 124, 195, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 124, 195, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ─── Animated orbs ─── */
@keyframes twc-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

.twc-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  animation: twc-float linear infinite;
}

.twc-hero__orb--teal {
  top: 15%; left: 10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--twc-accent) 0%, transparent 70%);
  opacity: 0.06;
  animation-duration: 6s;
}

.twc-hero__orb--gold {
  top: 60%; right: 8%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--twc-gold) 0%, transparent 70%);
  opacity: 0.04;
  animation-duration: 8s;
  animation-delay: 2s;
}

.twc-hero__orb--small {
  top: 40%; left: 60%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, var(--twc-accent) 0%, transparent 70%);
  opacity: 0.05;
  animation-duration: 10s;
  animation-delay: 4s;
}

/* ─── Background media (image or video) ─── */
.twc-hero__bg-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.twc-hero__bg-media video,
.twc-hero__bg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.twc-hero__bg-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--twc-dark-navy) 0%,
    rgba(6, 15, 29, 0.6) 50%,
    var(--twc-dark-navy) 100%
  );
}

/* ─── Content ─── */
@keyframes twc-hero-entrance {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.twc-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  width: 100%;
}

/* Chip / eyebrow label */
.twc-hero__chip {
  display: inline-block;
  margin-bottom: 32px;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(9, 124, 195, 0.25);
  background: rgba(9, 124, 195, 0.06);
  font-size: 13px;
  color: var(--twc-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: twc-hero-entrance 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.2s both;
}

/* Headline */
.twc-hero__headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.20;
  margin: 0 0 24px;
  background: linear-gradient(135deg, var(--twc-white) 0%, var(--twc-light-grey) 40%, var(--twc-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: twc-hero-entrance 1s cubic-bezier(0.23, 1, 0.32, 1) 0.4s both;
}

/* Subtext */
.twc-hero__subtext {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--twc-grey);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 48px;
  animation: twc-hero-entrance 1s cubic-bezier(0.23, 1, 0.32, 1) 0.6s both;
}

/* ─── Buttons ─── */
.twc-hero__buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: twc-hero-entrance 1s cubic-bezier(0.23, 1, 0.32, 1) 0.8s both;
}

.twc-btn {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.twc-btn--primary {
  border: none;
  background: linear-gradient(135deg, var(--twc-accent), var(--twc-accent-dim));
  color: var(--twc-dark-navy);
  box-shadow: 0 8px 32px rgba(9, 124, 195, 0.35);
}

.twc-btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(9, 124, 195, 0.5);
  color: var(--twc-dark-navy);
  text-decoration: none;
}

.twc-btn--secondary {
  border: 1px solid rgba(9, 124, 195, 0.3);
  background: rgba(9, 124, 195, 0.05);
  color: var(--twc-accent);
}

.twc-btn--secondary:hover {
  background: rgba(9, 124, 195, 0.12);
  border-color: rgba(9, 124, 195, 0.5);
  color: var(--twc-accent);
  text-decoration: none;
}

/* ─── Scroll indicator ─── */
@keyframes twc-scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 0.8; transform: scaleY(1.3); }
}

.twc-hero__scroll {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  animation: twc-hero-entrance 1s ease 1.5s both;
}

.twc-hero__scroll span {
  font-size: 11px;
  color: var(--twc-grey);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.twc-hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--twc-accent), transparent);
  animation: twc-scroll-pulse 2s ease-in-out infinite;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .twc-hero {
    padding: 100px 24px 80px;
  }

  .twc-hero__orb--teal  { width: 200px; height: 200px; }
  .twc-hero__orb--gold  { width: 260px; height: 260px; }
  .twc-hero__orb--small { display: none; }
}

/* ─── Block editor preview adjustments ─── */
.block-editor .twc-hero {
  min-height: 60vh; /* Don't crush the editor panel */
}

.block-editor .twc-hero__chip,
.block-editor .twc-hero__headline,
.block-editor .twc-hero__subtext,
.block-editor .twc-hero__buttons {
  animation: none; /* No entrance animations while editing */
  opacity: 1;
  transform: none;
}
