/* ========================================
   DIT - Homepage Hero V2
   Two-column layout, animated background,
   vibrant styling. Mobile-first.
   ======================================== */

/* --- Hero Section --- */
/* Specificity: .page-content .dit-hero-v2 beats unified.css .hero rules */
.page-content .dit-hero-v2 {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4.5rem;
  text-align: left;
  background: linear-gradient(165deg, #f0f2ed 0%, #e8ebe3 35%, #eef1ea 70%, #f5f5f3 100%);

  /* Reset unified.css .hero overrides */
  min-height: auto;
  display: block;
  grid-template-columns: none;
  gap: 0;
  padding-top: 5rem;
  align-items: normal;
}

/* Kill unified.css .hero::before gradient (rsasom red/green radials) */
.page-content .dit-hero-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  bottom: auto;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-green), var(--accent-amber));
  pointer-events: none;
}

/* Reset unified.css .hero-content max-width and z-index */
.page-content .dit-hero-v2 .hero-content {
  max-width: none;
  z-index: 1;
}

/* Reset unified.css .hero h1 em color (rsasom uses --accent-green/--accent-red-bright) */
.page-content .dit-hero-v2 h1 em {
  color: var(--accent-primary);
}

/* --- Animated Background Shapes --- */
.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.hero-shape-1 {
  width: 320px;
  height: 320px;
  top: -60px;
  right: -40px;
  background: radial-gradient(circle, rgba(80, 137, 22, 0.08) 0%, rgba(80, 137, 22, 0) 70%);
  animation: heroFloat1 14s ease-in-out infinite;
}

.hero-shape-2 {
  width: 200px;
  height: 200px;
  bottom: -30px;
  left: 5%;
  background: radial-gradient(circle, rgba(212, 132, 32, 0.07) 0%, rgba(212, 132, 32, 0) 70%);
  animation: heroFloat2 18s ease-in-out infinite;
}

.hero-shape-3 {
  width: 140px;
  height: 140px;
  top: 30%;
  left: 40%;
  background: radial-gradient(circle, rgba(89, 196, 92, 0.06) 0%, rgba(89, 196, 92, 0) 70%);
  animation: heroFloat3 12s ease-in-out infinite;
}

.hero-shape-4 {
  width: 260px;
  height: 260px;
  top: 10%;
  left: -80px;
  background: radial-gradient(circle, rgba(80, 137, 22, 0.05) 0%, rgba(80, 137, 22, 0) 70%);
  animation: heroFloat4 20s ease-in-out infinite;
}

.hero-shape-5 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  right: 15%;
  background: radial-gradient(circle, rgba(232, 155, 46, 0.08) 0%, rgba(232, 155, 46, 0) 70%);
  animation: heroFloat5 16s ease-in-out infinite;
}

@keyframes heroFloat1 {
  0%, 100% { opacity: 0.6; transform: translate(0, 0) scale(1); }
  50% { opacity: 1; transform: translate(-30px, 40px) scale(1.1); }
}

@keyframes heroFloat2 {
  0%, 100% { opacity: 0.5; transform: translate(0, 0) scale(1); }
  33% { opacity: 0.9; transform: translate(25px, -20px) scale(1.15); }
  66% { opacity: 0.7; transform: translate(-15px, -35px) scale(0.95); }
}

@keyframes heroFloat3 {
  0%, 100% { opacity: 0.4; transform: translate(0, 0) scale(1); }
  50% { opacity: 0.8; transform: translate(20px, 25px) scale(1.2); }
}

@keyframes heroFloat4 {
  0%, 100% { opacity: 0.4; transform: translate(0, 0) scale(1); }
  40% { opacity: 0.7; transform: translate(20px, 30px) scale(1.05); }
  70% { opacity: 0.5; transform: translate(-10px, 15px) scale(0.97); }
}

@keyframes heroFloat5 {
  0%, 100% { opacity: 0.5; transform: translate(0, 0) scale(1); }
  50% { opacity: 0.9; transform: translate(-20px, -15px) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-shape {
    animation: none;
    opacity: 0.5;
  }
}

/* --- Two-column Grid --- */
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
  }
}

@media (min-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
  }
}

/* --- Left Column: Hero Content --- */
.dit-hero-v2 .hero-content {
  text-align: left;
}

.dit-hero-v2 .section-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-primary-dark);
  margin-bottom: 1rem;
  display: inline-block;
  padding: 0.35em 0.8em;
  background: rgba(80, 137, 22, 0.1);
  border-radius: 4px;
}

.dit-hero-v2 h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.dit-hero-v2 h1 em {
  font-style: normal;
  color: var(--accent-primary);
  position: relative;
}

.dit-hero-v2 .hero-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin-bottom: 1.2rem;
  text-align: left;
}

.dit-hero-v2 .hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 0;
}

.dit-hero-v2 .hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Button styling for hero */
.dit-hero-v2 .btn-primary {
  background: var(--accent-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.95em 1.8em;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(80, 137, 22, 0.25);
}

.dit-hero-v2 .btn-primary:hover {
  background: var(--accent-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(80, 137, 22, 0.3);
}

.dit-hero-v2 .btn-secondary {
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9em 1.6em;
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--border-medium);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}

.dit-hero-v2 .btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary-dark);
  transform: translateY(-1px);
}

/* --- Right Column: Calculator Card --- */
.hero-calculator .calculator-wrap {
  max-width: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(229, 229, 231, 0.8);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.04);
}

.calc-hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  text-align: left;
}

.calc-hero-title em {
  font-style: normal;
  color: var(--accent-primary);
}

.calc-hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Calculator overrides when inside hero */
.hero-calculator .calc-slider-group {
  margin-bottom: 1.25rem;
}

.hero-calculator .calc-results {
  margin-top: 0.25rem;
}

.hero-calculator .calc-highlight .calc-result-figure {
  font-size: 1.3rem;
}

.hero-calculator .calc-roi {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
}

/* --- Mobile Stacking --- */
@media (max-width: 899px) {
  .page-content .dit-hero-v2 {
    padding: 3.5rem 0 3rem;
    text-align: center;
  }

  .dit-hero-v2 .hero-content {
    text-align: center;
  }

  .dit-hero-v2 .hero-tagline {
    text-align: center;
  }

  .dit-hero-v2 .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .dit-hero-v2 .hero-ctas {
    justify-content: center;
  }

  .hero-calculator .calculator-wrap {
    padding: 1.5rem 1.25rem;
  }

  .calc-hero-title {
    text-align: center;
    font-size: 1.3rem;
  }

  .calc-hero-subtitle {
    text-align: center;
  }
}

/* Large screens: extra breathing room */
@media (min-width: 1200px) {
  .page-content .dit-hero-v2 {
    padding: 6rem 0 5.5rem;
  }
}
