.hero {
  display: flex;
  flex-direction: column;
  gap: 54px;
  align-items: center;
  min-height: 500px;
  background-color: var(--color-gray-100);
  overflow: hidden;
  padding-top: 32px;
  position: relative;
}

/* Hero CGI Variant - Overlay Layout */
.hero--cgi {
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  padding: 0;
  min-height: 700px;

  @media (max-width: 768px) {
    height: auto;
    min-height: auto;
    overflow: visible;
  }
}

/* Hero Background */
.hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;

  @media (max-width: 768px) {
    position: relative;
    width: 100%;
  }
}

.hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  @media (max-width: 1440px) {
    /*height: auto;*/
  }

  @media (max-width: 768px) {
    height: auto;
  }
}



.hero__bg-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 59.03% 49.34%;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gap);
  align-items: center;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 2;


  @media (max-width: 767px) {
    min-height: auto;
    bottom: 24px;
    flex-direction: column;
  }

}


.hero--cgi .hero__container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: center;
  align-items: flex-end;

  @media (max-width: 768px) {
    position: absolute;
    top: auto;
    align-items: flex-end;
    padding: 0 var(--container-padding);
  }
}

.hero--cgi .hero__content {
  max-width: 800px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 4;
  transform: translateY(62%);

  @media (991px <= width <= 1440px) {
    transform: translateY(31%);
  }

  @media (max-width: 768px) {
    transform: translateY(90%);
    max-width: calc(100% - 1.5rem);
    margin: 0 auto;
  }
}

.hero--cgi .hero__title {
  color: var(--color-primary);
  text-shadow: none;
  font-size: 40px;
  font-style: normal;
  font-weight: 400;
  font-family: var(--font-tilt-neon);
  margin-bottom: 0;
  line-height: 1.17;
}

.hero--cgi .hero__title-main {
  color: var(--color-primary);
  font-size: 40px;
  font-weight: var(--font-weight-normal);
  display: block;
  margin-bottom: 0;
  font-style: normal;
  line-height: 1.17;
  text-align: center;
  text-shadow: none;
}

.hero--cgi .hero__title-sub {
  color: var(--color-text-primary);
  font-family: var(--font-agenda);
  font-size: 20px;
  font-weight: 700;
  display: block;
  line-height: 1.2;
  margin-bottom: 0;
  text-align: center;
  text-shadow: none;
}

.hero--cgi .hero__title-sub-2 {
  margin-bottom: 0;
}

/* Hero callout box inner layout */
.hero__content-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.hero__text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.hero__lockup-img {
  width: min(258px, 100%);
  height: auto;
  aspect-ratio: 258 / 100;
  object-fit: contain;
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
  overflow: hidden;
}

/* Section Container */
.section__container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section--event .section__container {
  position: relative;
  z-index: 2;
}

/* Event Card */
.event-card {
  padding: var(--space-lg);
  margin: 0 auto;
  border: 2px solid var(--color-primary);
  @media (min-width: 769px) {
    max-width: 70%;
  }
}

.event-card-wrapper {
  padding: 24px;
}

.event-card__content {
  text-align: center;
  padding: 10px 0 var(--space-lg) 0;

  @media (max-width: 767px) {
    padding: 0px;
  }
}

.event-card__title {
  font-family: var(--font-tilt-neon);
  color: var(--color-primary);
  line-height: normal;
  margin-bottom: var(--space-md, 1rem);
  font-weight: var(--font-weight-normal);
  font-size: 40px;
}

.event-card__text {
  font-family: var(--font-agenda);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 24px;
  margin-bottom: var(--space-lg, 1.5rem);

  @media (max-width: 767px) {
    margin-bottom: 24px;
  }
}

/* Confidence Section */
/* Bridge section: sits between hero and confidence; catches hero callout card overhang */
.section--hero-bridge {
  background-image: url('../../images/backgrounds/brick-background.webp');
  background-size: 185.25% 500%;
  background-position: top;
  background-repeat: no-repeat;
  background-color: #fff;
  border-top: 16px solid transparent;
  border-image: linear-gradient(90deg, #DEE1E3 0%, #FFFBE6 25%, #D4CBBF 60%, #EDECEC 80%, #D6D4BA 100%) 1;
  padding-top: 310px;
  padding-bottom: 60px;
  position: relative;
  z-index: 2;

  @media (max-width: 768px) {
    padding-top: 400px;
  }
}

.section--confidence {
  background-color: var(--color-primary);
  padding: var(--space-4xl) 0;
  color: var(--color-white);
  box-shadow: var(--shadow-card);
  /* top: -206px; */

  @media (min-width: 1400px) {
    background-image: url(/themes/custom/dawnzera_full/images/backgrounds/updated-desktop-pipe-upper.webp);
    background-repeat: no-repeat;
    background-position: left top 1rem;
  }
}

.confidence__content {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.confidence__title {
  font-family: var(--font-tilt-neon);
  font-size: 32px;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.confidence__subtitle {
  font-family: var(--font-agenda);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
}

.confidence__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 1440px;
  margin: 0 auto;

  @media (min-width: 1086px) {
    flex-direction: row;
  }
}

.confidence__button-row {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.confidence__button-row .btn {
  flex: 0 1 auto;
  align-items: center;
  align-self: stretch;
  justify-content: space-between;
  width: auto;
  min-width: 503px;
  height: auto;
  padding: var(--space-sm) 20px var(--space-sm) 22px;
  line-height: 1.4;
}

.confidence__button-row .btn:hover {
  background-color: #FCEEE7;
  text-decoration: none;
  color: var(--color-primary);
  border: 2.4px solid var(--color-primary);
}

.confidence__button-row .btn:focus {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
}

/* Ionis Section */
.section-ionis {

  background-image: url('../../images/backgrounds/brick-background.webp');
  background-size: 185.25% 500%;
  background-position: top;
  background-repeat: no-repeat;

  opacity: 1;
  position: relative;
  padding: 0px;

  @media (max-width: 767px) {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
}

.section-ionis-inner-wrapper {
  padding: 40px 0;
  @media (max-width: 767px) {
    padding: 0px;
  }
}

.section-ionis-wrapper {

  @media (min-width: 1400px) {
    background-image: url(/themes/custom/dawnzera_full/images/backgrounds/updated-desktop-pipe-lower.webp);
    background-repeat: repeat-y;
    background-size: auto;
    background-position: left top;
  }

}

.bottom-pipe {
  width: 100%;

  img {
    width: 97%;
  }

  &.lower-pipe {
    margin-left: 1.5rem;
  }
}

.section--ionis::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-overlay-light);
  z-index: 1;
}

.section--ionis .section__container {
  position: relative;
  z-index: 2;
}

/* Ionis Card */
.ionis-card {
  border-radius: 24px;
  padding: var(--space-2xl);
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  border: 8px solid transparent;
  max-width: 1200px;
  background: linear-gradient(white, white) padding-box, linear-gradient(90deg, #DEE1E3, #FFFBE6, #D4CBBF, #EDECEC, #D6D4BA) border-box;


  @media (max-width: 767px) {
    padding: 32px;
  }
}

.ionis-card__content {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
}

.ionis-card__logo {
  flex-shrink: 0;

  @media (max-width: 768px) {
    align-self: center;
  }
}

.ionis-logo {
  width: 305px;
  height: 176px;
}

.ionis-card__text {
  flex: 1;
}

.ionis-card__title {
  font-family: var(--font-tilt-neon);
  font-size: 32px;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  font-weight: var(--font-weight-normal);

  @media (max-width: 767px) {
    margin-bottom: 22px;
  }
}

.ionis-card__description {
  font-family: var(--font-agenda);
  font-size: 20px;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: var(--space-xl);

  @media (max-width: 767px) {
    margin-bottom: 22px;
  }
}

/************ Pipes Section ***************/

.section--pipes {
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
}
.section--pipes-mobile {
  display: none;
}
@media (max-width: 641px) {
  .action-cards-section {
    padding-top: 0;
  }
  .section--pipes-mobile {
    display: block;
    margin-bottom: 50px;
  }
}
/* Desktop */
.pipes-container {
  img {
    display: none;
  }
}
@media (min-width: 1400px) {
  .pipes-container {
    background: unset;
    height: 913px;
    width: 86px;
    margin-bottom: 50px;
    position: absolute;
    top: -6vw;
    right: 0;
    z-index: 5;
  }

  .pipes-container img {
    display: block;
    height: 100%;
  }
}

/* Pipes Section Left */

.section--pipes-left {
  max-width: 1440px;
  height: 1px;
  margin: auto 0;
  position: relative;
  top: -335px;
  display: none;
}
.section--pipes-mobile {
  display: none;
}
@media (max-width: 641px) {
  .action-cards-section {
    padding-top: 0;
  }
  .section--pipes-mobile {
    display: block;
    margin-bottom: 50px;
  }
}

.pipes-container-left {
  img {
    display: none;
  }
}
@media (min-width: 1400px) {
  .pipes-container-left {
    background: unset;
    height: 700px;
    width: 86px;
    margin-bottom: 50px;
    position: absolute;
    top: -143px;
    left: 0; /* ← Move to the left */
    z-index: 5;
  }

  .pipes-container-left img {
    display: block;
    max-height: 690px;
    height: 100%;
  }
}

/* Default to show desktop image */
.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

/* Mobile Styles */
@media (max-width: 767px) {

  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }


  .hero--cgi .hero__content {
    max-width: 100%;
  }

  .hero--cgi .hero__title-main {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero--cgi .hero__title-sub {
    font-size: 18px;
  }

  .btn--primary {
    width: 100%;
  }

  .event-card {
    position: relative;
  }

  .section--event::before {
    background: none;
  }

  .section--event::after {
    top: 200px;
    height: 100%;
  }

  .event-card__title {
    font-size: 24px;

    @media (max-width: 767px) {
      font-size: 26px;
      margin-bottom: 1rem;
    }
  }

  .section--confidence {
    padding: 40px 0;
  }

  .confidence__content {
    position: relative;
    text-align: left;
    max-width: none;
  }

  .confidence__title {
    font-size: 26px;
    font-weight: 400;
  }

  .confidence__subtitle {
    font-size: 26px;
  }

  .confidence__button-row .btn {
    max-width: none;
    width: 100%;
    min-width: 0;
    text-align: left;
    gap: 10px;
    padding: 10px 21px 8px 29px;
    line-height: normal;
  }

  .ionis-card__content {
    text-align: left;
  }

}

@media (max-width: 440px) {
  .hero__title-sub.mobile-hide-br br {
    display: none;
  }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero--cgi .hero__content {
    max-width: 90%;
  }
  .hero--cgi .hero__title-main {
    font-size: 32px;
    line-height: 1.2;
  }
  .hero--cgi .hero__title-sub {
    font-size: 18px;
  }
}

.event_2 {
  border-radius: 24px;
  border: 2px solid #E2422D;
  background: #FFF;
  box-shadow: 0 0 8px 0 #C94808, 0 0 8px 0 #E08A67;
  padding: 0px;
}

.event_3 {
  border-radius: 22px;
  border: 2px solid #F59785;
  background: #FFF;
}

.event_4 {
  border-radius: 20px;
  border: 2px solid #FDE5E0;
  background: #FFF;
}

.event_5 {
  border-radius: 18px;
  background: #FFF;
  box-shadow: 0 0 8px 0 #C94808 inset, 0 0 8px 0 #E08A67 inset;
}
@media (min-width:1400px){
  .home-page-top-pipe {
    top: -150px;
  }

}

@media (min-width:768px) {
  .btn--primary{
    padding-left: 24px;
    padding-right: 24px;
    max-width: fit-content;
    width: 100%;
  }
}

/* "Register for an event" CTA in the hero — Figma shows a solid coral pill
   with no outline; the previous dark-coral border was a legacy style that
   the updated design dropped. Let the base .btn--primary coral border keep
   the coral background visually flush. */
.hero.hero--cgi .hero__container .hero__content .why-dawnzera-btn {
  border-color: var(--color-primary);
}

@media (max-width:768px) {
  .section-ionis .section__container{
    margin-block: 40px;
  }
}
