/* =============================================
   MBC — Cinematic Broadcast Editorial Theme
   ============================================= */

:root {
  --bg-deep:    #0D203F;
  --bg-surface: #1a2a4a;
  --bg-card:    #2D334D;
  --bg-card-hover: #363d5a;
  --amber:      #E3DD15;
  --amber-light:#eee94d;
  --amber-dim:  rgba(227, 221, 21, 0.15);
  --blue:       #0274be;
  --blue-dim:   rgba(2, 116, 190, 0.12);
  --text:       #c8cdd8;
  --text-muted: #808285;
  --text-bright:#F0F5FA;
  --white:      #ffffff;
  --radius:     14px;
  --radius-sm:  8px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===== Scan-line Overlay ===== */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ===== Top Bar ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(13, 32, 63, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}

.topbar.is-visible {
  transform: translateY(0);
}

.topbar-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--amber);
}

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

.topbar-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.topbar-links a:hover {
  color: var(--white);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 2rem 0;
  text-align: center;
  overflow: hidden;
}

/* Background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  animation: glowDrift 8s ease-in-out infinite alternate;
}

.hero-glow--amber {
  background: var(--amber);
  top: -15%;
  right: -5%;
  opacity: 0.18;
  animation-delay: 0s;
}

.hero-glow--blue {
  background: var(--blue);
  bottom: -20%;
  left: -10%;
  opacity: 0.12;
  animation-delay: -4s;
}

@keyframes glowDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}

/* Signal wave */
.hero-signal {
  position: absolute;
  bottom: 15%;
  left: 0;
  right: 0;
  height: 200px;
  opacity: 0.06;
}

.hero-signal svg {
  width: 100%;
  height: 100%;
}

.signal-wave {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.signal-wave--1 {
  stroke: var(--amber);
  stroke-dasharray: 8 12;
  animation: wavePulse 3s ease-in-out infinite;
}

.signal-wave--2 {
  stroke: var(--blue);
  stroke-dasharray: 12 8;
  animation: wavePulse 3s ease-in-out infinite reverse;
}

@keyframes wavePulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

/* Hero content */
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-title-line {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--white);
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.35s; }
.hero-title-line:nth-child(2) { animation-delay: 0.5s; }
.hero-title-line:nth-child(3) { animation-delay: 0.65s; }

.hero-title-line--accent {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--amber);
  text-stroke: 2.5px var(--amber);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 400;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.8s;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  color: var(--bg-deep);
  border-radius: 50px;
  transition: transform 0.25s, box-shadow 0.25s;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.95s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(227, 221, 21, 0.3);
}

.hero-cta svg {
  transition: transform 0.25s;
}

.hero-cta:hover svg {
  transform: translateY(3px);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Ticker */
.hero-ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(13, 32, 63, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem 0;
  white-space: nowrap;
  animation: tickerScroll 25s linear infinite;
  width: max-content;
}

.ticker-track span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.ticker-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.5;
  flex-shrink: 0;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== Section ===== */
.subsidiaries {
  position: relative;
  padding: 7rem 2rem 8rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-dim);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.section-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.section-subheading {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Card Grid ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Featured card spans 2 columns on desktop */
.card--featured {
  grid-column: span 2;
}

.card--featured .card-content {
  flex-direction: row;
  align-items: center;
  gap: 2.5rem;
}

.card--featured .card-logo {
  flex-shrink: 0;
  width: 180px;
  height: 140px;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card--featured {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .card--featured {
    grid-column: span 1;
  }
  .card--featured .card-content {
    flex-direction: column;
  }
  .card--featured .card-logo {
    width: auto;
    height: 100px;
    margin-bottom: 1.25rem;
  }
}

/* ===== Card ===== */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--amber-dim) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(227, 221, 21, 0.15);
}

.card:hover::before {
  opacity: 1;
}

/* Shine effect */
.card-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.03) 55%,
    transparent 70%
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover .card-shine {
  left: 130%;
}

/* Reveal animation */
.card[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s ease;
}

.card[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card[data-reveal].is-visible:hover {
  transform: translateY(-6px);
}

.card-content {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  height: 100%;
}

.card-logo {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-logo img {
  max-height: 100%;
  max-width: 180px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.card-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.25rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amber);
  transition: color 0.25s, gap 0.25s;
}

.card-link:hover {
  color: var(--amber-light);
  gap: 0.65rem;
}

/* ===== Contact ===== */
.contact {
  position: relative;
  padding: 4rem 2rem 7rem;
  max-width: 1280px;
  margin: 0 auto;
}

.contact-form-wrapper {
  max-width: 880px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.05);
}

.contact-form {
  display: block;
  width: 100%;
  height: 1100px;
  border: 0;
}

@media (max-width: 640px) {
  .contact {
    padding: 3rem 1rem 5rem;
  }
  .contact-form {
    height: 1400px;
  }
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bg-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

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

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.25s;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  line-height: 1;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 260px;
}

.footer-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.footer-address {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-email {
  font-size: 0.85rem;
  color: var(--amber) !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1.5rem 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ===== Noise texture (grain overlay) ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px;
}
