/*
 * homepage.css
 * Custom styles for the homepage sections.
 * Depends on: layout.css (design tokens, fonts, .esc-btn, .esc-animate, etc.)
 */


/* ==========================================================
   SHARED TYPOGRAPHY UTILITIES
   (used across multiple sections on this page)
========================================================== */

/*
 * .serif  — Cormorant-Garamond roman
 * .italic — Fraunces italic, accent-coloured
 * These also appear in the newsletter section and can be
 * applied inline inside heading elements.
 */
.serif {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
}

.italic {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
}


/* ==========================================================
   SECTION-LEVEL EYEBROW (repeated pattern)
   All eyebrows across the page share the same spec;
   only the colour context differs (light vs. dark bg).
========================================================== */

/*
 * Rather than repeating the 6 typographic properties in every
 * section, we declare them once and let each section ID/class
 * inherit via the cascade.
 */
#esc-eyebrow-hero,
#esc-eyebrow-accompagnements,
#esc-eyebrow-pharmacie,
#esc-eyebrow-formations,
.esc-eyebrow-blog,
#esc-eyebrow-newsletter,
.esc-contact__eyebrow,
.invitation-panel-eyebrow {
  font-family: "Poppins";
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 2.53px;
  text-transform: uppercase;
  line-height: 17.28px;
}

#esc-eyebrow-hero {
  font-size: 15px;
}

/* Default colour (light backgrounds) */
#esc-eyebrow-hero,
#esc-eyebrow-accompagnements,
#esc-eyebrow-pharmacie,
.esc-eyebrow-blog,
#esc-eyebrow-newsletter,
.esc-contact__eyebrow {
  color: var(--color-muted);
}

/* Light colour (dark background: formations panel) */
#esc-eyebrow-formations,
.invitation-panel-eyebrow {
  color: var(--color-secondary);
}

/* Spacing that varies per section */
#esc-eyebrow-pharmacie  { margin-bottom: 16px; }
#esc-eyebrow-newsletter { /* no extra margin needed */ }


/* ==========================================================
   HERO
========================================================== */

#esc-hero {
  padding: 176px 80px 128px;
  position: relative;
  background-color: var(--color-bg);
  background-image:
    radial-gradient(106% 85% at 25% 40%, rgba(242, 234, 221, 0.60) 0%, transparent 55%),
    linear-gradient(180deg, rgba(242, 234, 221, 0.65) 0%, rgba(242, 234, 221, 0.40) 50%, rgba(242, 234, 221, 0.70) 100%),
    url("../../img/home-hero-background.jpg");
  background-size: cover;
  background-position: center;
}

#esc-hero-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#esc-hero-title {
  max-width: 1024px;
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 92px;
  line-height: 0.95;
  letter-spacing: -2.3px;
  color: var(--color-text);
  margin: 0;
}

#esc-hero-title span {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
}

#esc-hero-text {
  max-width: 960px;
  font-family: "Poppins";
  font-weight: 400;
  font-size: 18px;
  line-height: 29px;
  color: var(--color-text-soft);
}

/* Bold inline variant inside the hero paragraph */
#esc-hero-text span {
  font-weight: 700;
}

#esc-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

#esc-hero-badges {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 32px;
  /* Typography inherited from shared eyebrow rule above */
  color: var(--color-muted);
}

#esc-hero-badges .divider {
  width: 40px;
  height: 1px;
  background: var(--color-muted);
}

/* --- Hero: mobile --- */
@media (max-width: 768px) {
  #esc-hero {
    padding: 64px 20px;
  }

  #esc-hero-inner {
    padding: 0 24px;
    gap: 24px;
  }

  #esc-hero-title {
    font-size: 40px;
    line-height: 46px;
    letter-spacing: -1.2px;
    max-width: 100%;
  }

  #esc-hero-text {
    font-size: 16px;
    line-height: 26px;
    max-width: 100%;
  }

  #esc-hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  #esc-hero-badges {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  #esc-hero-badges .divider {
    width: 28px;
  }
}


/* ==========================================================
   PILIERS (value pillars)
========================================================== */

.esc-piliers {
  background-color: var(--color-bg);
  padding: 96px 120px;
}

#piliers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 96px;
}

.pilier-card {
  position: relative;
  background-color: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 44px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 100%;
}

.pilier-badge {
  position: absolute;
  top: -28px;
  left: -24px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(168, 191, 168, 0.50);
  border: 1px solid rgba(108, 109, 51, 0.30);
  border-radius: 50%;
}

.pilier-badge img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.pilier-card h3 {
  font-family: "Cormorant-Garamond";
  font-weight: 300;
  font-size: 24px;
  letter-spacing: -0.24px;
  margin: 0;
}

.pilier-card p {
  font-family: "Poppins";
  font-weight: 400;
  font-size: 14px;
  line-height: 22.75px;
  margin: 0;
}

/* --- Piliers: mobile --- */
@media (max-width: 768px) {
  .esc-piliers {
    padding: 64px 20px;
  }

  #piliers-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .pilier-card {
    min-width: 0;
    width: 100%;
    padding: 40px 24px 24px;
  }
}


/* ==========================================================
   ACCOMPAGNEMENTS
========================================================== */

#esc-accompagnements {
  padding: 96px 240px;
  min-height: 823px;
  background:
    radial-gradient(70.71% 70.71% at 50% 50%, rgba(242, 234, 221, 0.60) 0%, transparent 70%),
    radial-gradient(120.21% 120.21% at 85% 85%, rgba(108, 109, 51, 0.14) 0%, transparent 60%),
    radial-gradient(120.21% 127.28% at 15% 10%, rgba(168, 191, 168, 0.22) 0%, transparent 55%),
    var(--color-bg);
}

#esc-accompagnement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

#esc-title-accompagnements {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 48px;
  line-height: 50.4px;
  letter-spacing: -0.48px;
  margin: 0 0 24px;
  color: var(--color-text);
}

#esc-title-accompagnements span {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  color: var(--color-accent);
}

#esc-description-accompagnements {
  font-family: "Poppins";
  font-weight: 400;
  font-size: 16px;
  line-height: 26px;
  margin: 0;
  color: var(--color-text-soft);
  padding-right: 120px;
}

#esc-accompagnements-link {
  font-family: "Poppins";
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
}

#esc-accompagnement-right {
  justify-self: end;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 620px;
}

.esc-accompagnement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px;
}

.esc-accompagnement-number {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 30px;
  line-height: 30px;
  color: rgba(108, 109, 51, 0.70);
}

.esc-accompagnement-text {
  font-family: "Poppins";
  font-weight: 400;
  font-size: 18px;
  line-height: 29.25px;
  color: var(--color-text-thin);
  flex: 1;
  margin-left: 16px;
}

/* --- Accompagnements: mobile --- */
@media (max-width: 768px) {
  #esc-accompagnements {
    padding: 64px 20px;
  }

  #esc-accompagnement-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  #esc-accompagnement-left {
    width: 100%;
  }

  #esc-eyebrow-accompagnements {
    margin-bottom: 16px;
  }

  #esc-title-accompagnements {
    font-size: 36px;
    line-height: 38px;
    margin-bottom: 16px;
  }

  #esc-description-accompagnements {
    margin-bottom: 16px;
    padding-right: 0;
  }

  #esc-accompagnement-right {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .esc-accompagnement-item {
    width: 100%;
    gap: 16px;
    align-items: flex-start;
  }

  .esc-accompagnement-number {
    width: 36px;
    flex: 0 0 36px;
    font-size: 28px;
    line-height: 28px;
  }

  .esc-accompagnement-text {
    font-size: 16px;
    line-height: 26px;
  }

  /* CTA button: full-width centred on mobile */
  #esc-accompagnements-link-span {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0 16px;
  }

  #esc-accompagnements-link-span a {
    white-space: normal;
  }
}


/* ==========================================================
   INVITATION (hidden on mobile)
========================================================== */

#esc-invitation {
  position: relative;
  padding: 96px 80px;
  background: var(--color-bg);
  overflow: hidden;
}

/* Cream overlay on top of the background image */
#esc-invitation::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(242, 234, 221, 0.60),
    rgba(242, 234, 221, 0.40),
    rgba(242, 234, 221, 0.75)
  );
  z-index: 0;
}

#esc-invitation__top {
  position: relative;
  z-index: 1;
}

#esc-invitation-text {
  font-family: "Poppins";
  font-weight: 400;
  font-size: 20px;
  line-height: 63px;
  letter-spacing: -0.6px;
}

#esc-invitation-title {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 48px;
  line-height: 50.4px;
  letter-spacing: -0.48px;
  margin: 0;
  color: var(--color-text);
}

#esc-invitation-title span {
  font-family: "Fraunces";
  font-style: italic;
  color: var(--color-accent);
}

/* Sticky panel */
#invitation-sticky {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 528px;
  isolation: isolate;
  width: 1024px;
  margin: 0 auto;
}

/* Foliage decorative images */
.foliage {
  position: absolute;
  top: 50%;
  overflow: hidden;
  width: 50%;
  height: 528px;
  transform: translateY(-50%);
  background-size: auto 100%;
  background-repeat: no-repeat;
  z-index: 3;
  pointer-events: none;
  transition: transform 0.1s linear;
}

#foliage-left {
  left: 0;
  border-top-left-radius:    20px;
  border-bottom-left-radius: 20px;
  background-image: url('../../img/foliage-left.jpg');
  background-position: right center;
}

#foliage-right {
  right: 0;
  border-top-right-radius:    20px;
  border-bottom-right-radius: 20px;
  background-image: url('../../img/foliage-right.jpg');
  background-position: left center;
}

/* Cards wrapper */
#esc-invitation__cards-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

#esc-invitation__cards {
  position: relative;
  display: flex;
  gap: 32px;
  margin-top: 80px;
  width: min(1100px, 100%);
}

/* Dark inner panel */
#invitation-panel {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1536px;
  height: 528px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0px 20px 60px -25px rgba(26, 47, 27, 0.35);
  background:
    radial-gradient(40% 80% at 50% 30%, rgba(226, 204, 145, 0.35) 0%, transparent 70%),
    radial-gradient(70.71% 70.71% at 50% 50%, #1F3A25 0%, #041608 60%, #000802 100%);
}

.invitation-panel__side {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.invitation-panel__divider {
  width: 1px;
  height: 80%;
  align-self: center;
  background: rgba(247, 243, 235, 0.20);
}

#invitation-panel__side--left  { text-align: left;  padding: 40px 20px 40px 180px; }
#invitation-panel__side--right { text-align: right; padding: 40px 180px 40px 20px; }

#invitation-panel h3 {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 36px;
  line-height: 45px;
  letter-spacing: -0.36px;
  color: var(--color-secondary);
}

#invitation-panel p {
  font-family: "Poppins";
  font-weight: 400;
  font-size: 14px;
  line-height: 22.75px;
  color: rgba(247, 243, 235, 0.75);
}

#invitation-panel a {
  font-family: "Poppins";
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: #A8BFA8;
}

/* Quote block */
#esc-invitation__quote {
  margin-top: 120px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.quote-main {
  font-size: 24px;
  font-family: "Fraunces";
  font-style: italic;
  color: var(--color-text);
}

.quote-sub {
  font-size: 18px;
  font-family: "Fraunces";
  font-style: italic;
  color: #264C34;
}

#esc-quote {
  display: inline-block;
  margin-top: 16px;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}

/* Entire section hidden on mobile (complex parallax not suitable) */
@media (max-width: 768px) {
  #esc-invitation {
    display: none;
  }
}


/* ==========================================================
   PHARMACIE  (flip-card grid)
========================================================== */

#esc-pharmacy {
  padding: 96px 80px;
  background: var(--bg-tinted);
}

#esc-pharmacy-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

#esc-pharmacy-title {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 48px;
  line-height: 50.4px;
  letter-spacing: -0.48px;
  margin: 0;
  color: var(--color-text);
}

#esc-pharmacy-title span {
  font-family: "Fraunces";
  font-style: italic;
  color: var(--color-accent);
}

#esc-pharmacy-link {
  font-family: "Poppins";
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
}

#esc-pharmacy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}

#esc-pharmacy-grid::-webkit-scrollbar {
  display: none;
}

/* Card shell */
.esc-pharmacy-card {
  position: relative;
  min-height: 400px;
  border-radius: 20px;
  box-shadow: 0px 8px 30px -12px var(--color-border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  /* 3-D flip */
  perspective: 1400px;
}

.esc-phar-card-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform-origin: center right;
  transition: transform 0.85s cubic-bezier(0.645, 0.045, 0.355, 1);
  will-change: transform;
}

.esc-phar-card-front,
.esc-phar-card-back {
  position: absolute;
  inset: 0;
  padding: 28px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.esc-phar-card-front {
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.esc-phar-card-back {
  justify-content: flex-start;
  background: var(--color-primary);
  transform: rotateY(180deg);
  overflow: hidden;
}

.esc-phar-card-back-links:has(> span) {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.esc-phar-card-back-links > span {
  color: #fff;
  font: inherit;
  text-align: center;
}

.esc-pharmacy-card:hover {
  z-index: 2;
}

/* Flip triggers */
.esc-pharmacy-card:hover .esc-phar-card-inner,
.esc-pharmacy-card.is-flipped .esc-phar-card-inner {
  transform: translateX(-100%) rotateY(-180deg);
}

/* Per-card front images
   (shared overlay layers extracted to avoid repetition) */
#esc-phar-1 .esc-phar-card-front { background-image: linear-gradient(rgba(255,255,255,0.10),rgba(255,255,255,0.10)), linear-gradient(rgba(0,0,0,0.45),rgba(0,0,0,0.45)), url("../../img/phar-horses.jpg"); }
#esc-phar-2 .esc-phar-card-front { background-image: linear-gradient(rgba(255,255,255,0.10),rgba(255,255,255,0.10)), linear-gradient(rgba(0,0,0,0.45),rgba(0,0,0,0.45)), url("../../img/phar-dogs.jpg"); }
#esc-phar-3 .esc-phar-card-front { background-image: linear-gradient(rgba(255,255,255,0.10),rgba(255,255,255,0.10)), linear-gradient(rgba(0,0,0,0.45),rgba(0,0,0,0.45)), url("../../img/phar-essentials.jpg"); }
#esc-phar-4 .esc-phar-card-front { background-image: linear-gradient(rgba(255,255,255,0.10),rgba(255,255,255,0.10)), linear-gradient(rgba(0,0,0,0.45),rgba(0,0,0,0.45)), url("../../img/phar-seasons.jpg"); }

/* Front card content */
.esc-phar-card-meta {
  font-family: "Poppins";
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 2.53px;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 12px;
  background-color: var(--color-muted);
  align-self: flex-start;
  padding: 3px 6px;
}

/* NOTE: .esc-phar-card-back-title shares the meta font style
   but with different sizing — only the font-family/weight are merged. */
.esc-phar-card-back-title {
  display: none;
  font-family: "Cormorant-Garamond";
  font-size: 28px;
  font-weight: 400;
}

.esc-phar-card-title {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 30px;
  line-height: 36px;
  color: var(--color-secondary);
  margin-bottom: 15px;
}

.esc-phar-card-cta {
  font-family: "Poppins";
  font-size: 14px;
  color: var(--color-secondary);
}

.esc-phar-card-content {
  position: relative;
  width: 100%;
  margin-top: auto;
}

.esc-card-icon {
  width: 160px;
  height: 160px;
  position: absolute;
  border-radius: 50%;
}

/* Back card links */
.esc-phar-card-back-links {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  width: 100%;
  height: 100%;
  gap: 0;
}

.esc-phar-card-back-links a {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 28px;
  color: var(--color-secondary);
  border-bottom: 1px solid rgba(247, 243, 235, 0.16);
  font-family: "Poppins";
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  opacity: 1;
  white-space: normal;
  text-decoration: none;
  transition:
    padding-left 0.25s ease,
    background-color 0.25s ease;
}

.esc-phar-card-back-links a:last-child {
  border-bottom: 0;
}

.esc-phar-card-back-links a:hover {
  padding-left: 34px;
  background: rgba(247, 243, 235, 0.08);
}

/* Disable the existing animated underline on these full-width links. */
.esc-phar-card-back-links a::after {
  display: none;
}

/* Arrow aligned to the right of each link. */
.esc-phar-card-back-links a::before {
  content: "→";
  order: 2;
  margin-left: auto;
  padding-left: 18px;
  font-size: 18px;
  transition: transform 0.25s ease;
}

.esc-phar-card-back-links a:hover::before {
  transform: translateX(4px);
}

/* Underline offset for card-back links
   (the ::after pseudo is declared in layout.css) */
.esc-phar-card-back-links a::after {
  bottom: 0;
}

/* Disable scroll-reveal animations inside the pharmacy section —
   the flip interaction is the animation here */
#esc-pharmacy .esc-animate,
#esc-pharmacy .esc-animate-from-left {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* --- Pharmacy: mobile --- */
@media (max-width: 768px) {
  #esc-pharmacy {
    padding: 64px 20px;
  }

  #esc-pharmacy-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  #esc-pharmacy-title {
    font-size: 40px;
    line-height: 46px;
    letter-spacing: -1.2px;
    max-width: 100%;
  }

  #esc-pharmacy-title span {
    text-wrap: nowrap;
  }

  /* Horizontal scroll carousel on mobile */
  #esc-pharmacy-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 12px;
    scroll-padding-left: 20px;
  }

  .esc-pharmacy-card {
    flex: 0 0 calc(100% - 24px);
    min-width: 100%;
    scroll-snap-align: center;
    margin-right: 12px;
  }

  .esc-pharmacy-card:last-child {
    margin-right: 0;
  }

  /* Mobile CTA link: centred */
  #esc-pharma-link-span {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0 16px;
  }

  #esc-pharma-link-span a {
    white-space: normal;
  }
}


/* ==========================================================
   FORMATIONS (dark full-bleed section)
========================================================== */

#esc-formations {
  padding: 96px 208px;
  background-color: var(--color-primary);
  position: relative;
  background-image:
    linear-gradient(
      180deg,
      var(--color-text-soft)  0%,
      var(--color-text-faint) 50%,
      var(--color-text-thin)  100%
    ),
    url("../../img/home-formations-background.png");
  background-size: cover;
  background-position: center;
}

#esc-formations-content {
  max-width: 1024px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

#esc-title-formations {
  font-family: "Cormorant-Garamond";
  font-weight: 400;
  font-size: 60px;
  line-height: 75px;
  letter-spacing: -0.6px;
  color: var(--color-secondary);
  margin: 0;
}

#esc-title-formations span {
  font-family: "Fraunces";
  font-style: italic;
  color: #A8BFA8;
}

#esc-text-formations {
  max-width: 576px;
  font-family: "Poppins";
  font-size: 16px;
  line-height: 26px;
  color: rgba(247, 243, 235, 0.75);
}

/* --- Formations: mobile --- */
@media (max-width: 768px) {
  #esc-formations {
    padding: 80px 24px;
  }

  #esc-formations-content {
    width: 100%;
    max-width: 100%;
    gap: 16px;
  }

  #esc-eyebrow-formations {
    font-size: 11px;
    letter-spacing: 2.2px;
    margin-bottom: 4px;
  }

  #esc-title-formations {
    font-size: 36px;
    line-height: 40px;
  }

  #esc-text-formations {
    max-width: 100%;
    padding: 0 8px;
  }

  #esc-btn-formations {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}


/* ==========================================================
   JOURNAL / BLOG
========================================================== */

#esc-blog {
  background: var(--color-bg);
  padding: 96px 0;
}

/* Reusable max-width container for this section */
.esc-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.esc-blog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

.esc-blog-title {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.esc-blog-title h2 {
  font-size: 48px;
  line-height: 1;
  margin: 0;
  white-space: nowrap;
}

#esc-blog-link {
  font-family: "Poppins";
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
}

#esc-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.esc-article-card {
  height: 487px;
  padding: 24px;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(circle, rgba(168, 191, 168, 0.25) 0%, transparent 70%),
    #DBE0D3;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  cursor: pointer;
  transition:
    box-shadow 0.35s ease,
    transform  0.35s ease;
}

.esc-article-card:hover {
  box-shadow: 0px 18px 40px -18px rgba(26, 47, 27, 0.22);
  transform: translateY(-3px);
}

.esc-article-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.esc-tag,
.esc-meta {
  font-family: "Poppins";
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.esc-article-content h3 {
  font-family: "Cormorant-Garamond";
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  color: var(--color-text);
}

/* --- Blog: mobile --- */
@media (max-width: 768px) {
  #esc-blog {
    padding: 64px 20px;
  }

  .esc-blog-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
  }

  .esc-blog-title h2 {
    font-size: 36px;
    line-height: 40px;
  }

  .esc-article-card {
    height: auto;
    min-height: 360px;
    padding: 20px;
  }

  .esc-article-content h3 {
    font-size: 22px;
    line-height: 30px;
  }

  /* Horizontal scroll carousel on mobile */
  #esc-blog-grid {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
  }

  .esc-article {
    flex: 0 0 calc(100% - 24px);
    scroll-snap-align: center;
    margin-right: 12px;
  }

  .esc-article:last-child {
    margin-right: 0;
  }

  #esc-blog-grid::-webkit-scrollbar {
    display: none;
  }

  /* CTA link: centred */
  #esc-blog-link-span {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0 16px;
  }

  #esc-blog-link-span a {
    white-space: normal;
  }

  /* Disable scroll-reveal inside the blog carousel */
  #esc-blog .esc-animate,
  #esc-blog .esc-animate-from-left {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}


/* ==========================================================
   NEWSLETTER
========================================================== */

#esc-newsletter {
  position: relative;
  padding: 96px 0;
  background: #F2EADD;
}

#esc-newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(113% 99% at 20% 30%, rgba(168, 191, 168, 0.35) 0%, transparent 55%),
    radial-gradient(113% 99% at 80% 70%, rgba(108, 109,  51, 0.22) 0%, transparent 60%);
  opacity: 0.7;
}

#esc-newsletter-inner {
  position: relative;
  max-width: 976px;
  margin: 0 auto;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: rgba(253, 250, 244, 0.80);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  backdrop-filter: blur(4px);
  box-shadow: 0px 8px 30px -12px var(--color-border);
}

#esc-newsletter-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#esc-newsletter-text h2 {
  font-size: 48px;
  line-height: 1.2;
  margin: 0;
}

#esc-newsletter-text p {
  font-family: "Poppins";
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-soft);
}

#esc-newsletter-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

#esc-newsletter-form label {
  font-family: "Poppins";
  font-size: 11.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-muted);
  text-align: start;
}

#esc-input-group {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(26, 47, 27, 0.30);
  padding-bottom: 8px;
}

#esc-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: "Poppins";
  font-size: 14px;
  color: var(--color-text);
}

#esc-input-group input::placeholder {
  color: #B6BEA9;
}

#esc-input-group button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Poppins";
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(108, 109, 51, 0.70);
}

#esc-input-group button:hover {
  font-weight: 600;
}

#esc-newsletter-form small {
  font-family: "Poppins";
  font-size: 10px;
  line-height: 1.5;
  color: #B6BEA9;
}

#esc-newsletter__message {
  margin-top: 10px;
  font-size: 14px;
}

#esc-newsletter__message.is-success {
  color: #2f6b3a;
}

#esc-newsletter__message.is-error {
  color: #a32727;
}

.esc-newsletter__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

#esc-newsletter-form button:disabled {
  cursor: wait;
  opacity: 0.55;
}

/* --- Newsletter: mobile --- */
@media (max-width: 768px) {
  #esc-newsletter {
    padding: 64px 24px;
  }

  #esc-newsletter-inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    padding: 48px 18px;
  }

  #esc-newsletter-text {
    max-width: 100%;
  }

  #esc-newsletter-text h2 {
    font-size: 32px;
    line-height: 38px;
  }

  #esc-newsletter-text p {
    font-size: 15px;
    line-height: 24px;
  }

  #esc-newsletter-form {
    width: 100%;
    max-width: 420px;
  }

  /* Stack input + button on mobile */
  #esc-input-group {
    flex-direction: column;
    gap: 12px;
  }

  #newsletter-email,
  #esc-input-group button {
    width: 100%;
    padding: 14px 16px;
  }

  small {
    display: block;
    margin-top: 12px;
  }
}


/* ==========================================================
   CONTACT
========================================================== */

#esc-contact {
  padding: 96px 80px;
  background: var(--bg-tinted);
}

.esc-contact__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 614px;
  gap: 80px;
  align-items: center;
}

.esc-contact__content {
  display: flex;
  flex-direction: column;
}

.esc-contact__title {
  margin: 24px 0 32px;
  font-family: "Cormorant-Garamond";
  font-size: 48px;
  font-weight: 400;
  line-height: 60px;
  letter-spacing: -0.48px;
  color: var(--color-text);
}

.esc-contact__title span {
  font-family: "Fraunces";
  font-style: italic;
  color: var(--color-accent);
}

.esc-contact__text {
  max-width: 380px;
  margin: 0 0 40px;
  font-family: "Poppins";
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: var(--color-text-soft);
}

.esc-contact__meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.esc-contact__meta-row {
  display: flex;
  gap: 32px;
  align-items: center;
}

.esc-contact__meta-row span:first-child {
  min-width: 90px;
  font-family: "Poppins";
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 2.534px;
  text-transform: uppercase;
  color: var(--color-muted);
}

.esc-contact__meta-row span:last-child {
  font-family: "Poppins";
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-soft);
}

.esc-contact__cta {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.esc-contact__cta p {
  margin: 0;
  font-family: "Poppins";
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2.534px;
  text-transform: uppercase;
  color: var(--color-text);
}

/* Form card */
.esc-contact__form-card {
  background: var(--color-surface);
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0px 20px 60px -25px var(--color-border);
}

.esc-contact__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.esc-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.esc-form__field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esc-form__field label {
  font-family: "Poppins";
  font-size: 11.5px;
  font-weight: 500;
  line-height: 17px;
  letter-spacing: 2.534px;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-muted);
}

.esc-form__field input,
.esc-form__field textarea {
  width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: "Poppins";
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow   0.2s ease;
}

.esc-form__field input:focus,
.esc-form__field textarea:focus {
  border-color: rgba(108, 109, 51, 0.60);
  box-shadow: 0 0 0 3px rgba(108, 109, 51, 0.08);
}

.esc-form__field textarea {
  min-height: 120px;
  resize: vertical;
}

/* Reset native button styles on the contact submit */
#esc-btn-contact {
  border: none;
  outline: none;
  appearance: none;
}

/* --- Contact: mobile --- */
@media (max-width: 768px) {
  #esc-contact {
    padding: 64px 24px;
  }

  .esc-contact__inner {
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: stretch;
  }

  .esc-contact__title {
    font-size: 32px;
    line-height: 40px;
    margin: 16px 0 24px;
  }

  .esc-contact__text {
    max-width: 100%;
    margin-bottom: 32px;
  }

  .esc-contact__meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .esc-contact__meta-row span:first-child {
    min-width: unset;
  }

  .esc-contact__cta {
    gap: 16px;
  }

  .esc-contact__form-card {
    padding: 24px;
    border-radius: 16px;
  }

  .esc-contact__form {
    gap: 20px;
  }

  .esc-form__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .esc-form__field input,
  .esc-form__field textarea {
    font-size: 16px; /* prevent iOS zoom */
    padding: 14px;
  }

  .esc-form__field textarea {
    min-height: 140px;
  }

  #esc-btn-contact {
    width: 100%;
    justify-content: center;
  }
}
