/* =========================================
   FRONT PAGE: HERO
========================================= */
.mdm-hero{
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(179,25,31,.10);

  /* earlier, smoother ramp (red presence begins well before halfway) */
  background: linear-gradient(
    90deg,
    rgba(179,25,31,.06) 0%,
    rgba(179,25,31,.10) 8%,
    rgba(179,25,31,.16) 18%,
    rgba(179,25,31,.24) 32%,
    rgba(179,25,31,.34) 46%,
    rgba(179,25,31,.46) 58%,
    rgba(179,25,31,.62) 68%,
    rgba(179,25,31,.78) 76%,
    rgba(179,25,31,.92) 84%,
    var(--mdm-red) 92%,
    var(--mdm-red) 100%
  );
}

.mdm-hero-inner{
  padding: 1.25rem;
  position: relative;
  z-index: 2;
}

.mdm-hero-title{
  font-size: 1.85rem;
  font-weight: 950;
  letter-spacing: -.04em;
  margin: 0 0 .5rem 0;
}

/* give a background when the user is on a smartphone
bg matches the email toggle */

@media (max-width: 575.98px){
  .mdm-hero-title{
    display: inline-block; /* shrink-wrap background to text */
    padding: .55rem .75rem;
    margin-bottom: .75rem;

    background: rgba(255,255,255,.80); /* match toggle card */
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.08);

    box-shadow: 0 8px 18px rgba(0,0,0,.045);

    color: rgba(18,20,23,.92); /* force high contrast */
  }
}

.mdm-hero-subtitle{
  color: rgba(18,20,23,.72);
  margin: 0 0 1rem 0;
  font-size: 1rem;
  max-width: 42ch;
}

/* Hide hero subtitle on small screens
colors contrast */
@media (max-width: 575.98px){
  .mdm-hero-subtitle{
    display: none;
  }
}

.mdm-hero-ctas{
  display:flex;
  flex-direction: column;
  gap: .55rem;
  max-width: 360px;
}

/* Angled logo art */
#mdmHero .mdm-hero-art{
  position: absolute;
  right: -150px;
  top: 50%;
  transform: translateY(-50%) rotate(12deg);

  width: 680px;
  height: 680px;

  background-repeat: no-repeat;
  background-image: url('../../img/mdm-logo-white-pure.png');
  background-size: 130% auto;
  background-position: 62% 50%;

  opacity: .6;
  pointer-events: none;
  z-index: 1;

  filter: drop-shadow(0 18px 40px rgba(18,20,23,.14));
}

/* -----------------------------------------
   Free newsletter card (RIGHT side)
----------------------------------------- */
.mdm-hero-freecard{
  /* sits above the logo art */
  position: relative;
  z-index: 3;

  padding: 1.05rem 1.05rem .95rem 1.05rem;
  border-radius: 18px;

  /* soft contrast against the hero gradient */
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(18,20,23,.10);

  box-shadow:
    0 18px 45px rgba(18,20,23,.12),
    0 2px 10px rgba(18,20,23,.06);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.mdm-hero-freecard-top{
  margin-bottom: .75rem;
}

.mdm-hero-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;

  padding: .28rem .55rem;
  border-radius: 999px;

  color: rgba(18,20,23,.78);
  background: rgba(179,25,31,.10);
  border: 1px solid rgba(179,25,31,.16);
}

.mdm-hero-freeform-title{
  margin-top: .55rem;
  font-weight: 900;
  letter-spacing: -.02em;
  font-size: 1.05rem;
  line-height: 1.15;
  color: rgba(18,20,23,.92);
}

.mdm-hero-freeform-sub{
  margin-top: .35rem;
  font-size: .92rem;
  line-height: 1.25;
  color: rgba(18,20,23,.68);
}

/* Make the input + button feel like a single control */
.mdm-hero-freeform-row{
  display: flex;
  gap: .55rem;
  align-items: center;
  margin-top: .85rem;
}

.mdm-hero-freeform-input{
  flex: 1 1 auto;
  height: 44px;
  padding: 0 .9rem;

  border-radius: 12px;
  border: 1px solid rgba(18,20,23,.14);
  background: rgba(255,255,255,.92);

  font-size: .98rem;
  color: rgba(18,20,23,.92);

  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.mdm-hero-freeform-input::placeholder{
  color: rgba(18,20,23,.45);
}

.mdm-hero-freeform-input:focus{
  border-color: rgba(179,25,31,.35);
  box-shadow: 0 0 0 4px rgba(179,25,31,.14);
}

.mdm-hero-freeform-submit{
  height: 44px;
  border-radius: 12px;
  padding: 0 1rem;
  font-weight: 800;
  letter-spacing: -.01em;

  box-shadow: 0 10px 22px rgba(18,20,23,.10);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.mdm-hero-freeform-submit:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(18,20,23,.14);
}

.mdm-hero-freeform-submit:active{
  transform: translateY(0px);
  box-shadow: 0 10px 22px rgba(18,20,23,.10);
}

.mdm-hero-freeform-meta{
  margin-top: .55rem;
  font-size: .84rem;
  color: rgba(18,20,23,.58);
}

/* -----------------------------------------
   Responsive adjustments
----------------------------------------- */
@media (min-width: 992px){
  .mdm-hero-inner{
    padding-right: 460px;
    padding-left: 28px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .mdm-hero-freecard{
    max-width: 430px;
    margin-left: auto;
  }
}

@media (max-width: 991.98px){
  .mdm-hero-inner{ padding: 1.1rem; }

  #mdmHero .mdm-hero-art{
    width: 460px;
    height: 460px;
    right: -240px;
    top: 46%;
    opacity: .18;
    transform: translateY(-50%) rotate(10deg);
    background-size: 200% auto;
    background-position: 62% 50%;
  }

  .mdm-hero-title{ font-size: 1.55rem; }
  .mdm-hero-ctas{ max-width: 340px; }
}

/* =========================================
   HERO: Email notification toggle (logged-in)
   - Slightly lighter visual weight than buttons
   - Knob uses native-feeling easing
   - Spacing matches CTA stack
========================================= */

.mdm-hero-toggle{
  /* Match the vertical spacing between the two buttons above (Bootstrap .btn stack often ~.5rem) */
  /* margin-top: .5rem;*/

  padding: .85rem 1rem;
  border-radius: 14px;

  /* Slightly softer than before */
  border: 1px solid rgba(0,0,0,.085);
  background: rgba(255,255,255,.80);
  box-shadow: 0 8px 18px rgba(0,0,0,.045);

  text-align: center;
}

.mdm-hero-toggle-title{
  font-size: 16px;     /* align with typical btn text sizing */
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .55rem 0;
}

.mdm-hero-toggle-footnote{
  margin-top: .55rem;
  font-size: 13px;
  line-height: 1.25;
  opacity: .75;
}

/* Switch wrapper is the click target per your JS */
.email_notification_switch{
  position: relative;
  display: inline-block;
  width: 56px;
  height: 32px;
  border-radius: 999px;

  background: rgba(0,0,0,.22);
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.18);

  cursor: pointer;
  user-select: none;
  vertical-align: middle;

  transition:
    background .18s cubic-bezier(.4,0,.2,1),
    border-color .18s cubic-bezier(.4,0,.2,1),
    box-shadow .18s cubic-bezier(.4,0,.2,1);
}

/* Knob */
.email_notification_switch .slider{
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(0,0,0,.18);
  cursor: pointer;

  transition:
    left .22s cubic-bezier(.4,0,.2,1),
    transform .22s cubic-bezier(.4,0,.2,1),
    box-shadow .22s cubic-bezier(.4,0,.2,1);
}

.email_notification_switch:hover{
  border-color: rgba(0,0,0,.24);
}

.email_notification_switch:focus-visible{
  outline: none;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,.18),
    0 0 0 4px rgba(0,123,255,.18);
}

/* ON state matches your JS: toggleClass('on') */
.email_notification_switch.on{
  background: rgba(34, 197, 94, .85);
  border-color: rgba(20, 128, 61, .45);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,.12),
    0 10px 18px rgba(34, 197, 94, .16);
}

.email_notification_switch.on .slider{
  left: calc(100% - 28px);
  box-shadow: 0 10px 18px rgba(0,0,0,.16);
}

/* Pressed feel */
.email_notification_switch:active .slider{
  transform: translateY(-50%) scale(.98);
}

/* Mobile tweaks */
@media (max-width: 575.98px){
  .mdm-hero-toggle{
    padding: .8rem .9rem;
  }
  .mdm-hero-toggle-title{
    font-size: 16px;
  }
  .mdm-hero-toggle-footnote{
    font-size: 12.5px;
  }
}
