/*
 * EWNS V3 refinement pass
 * Corrects the brand lockup, anchor clipping and image/card layer breaks.
 */

:root {
  --v3r-navy: #071f2b;
  --v3r-navy-deep: #04161f;
  --v3r-gold: #d8af5a;
  --v3r-gold-soft: #ead08d;
  --v3r-ivory: #f7f4ec;
  --v3r-ink: #0b2733;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 118px;
}

body.ewns-v3-luxury img {
  display: block;
}

body.ewns-v3-luxury main section[id] {
  scroll-margin-top: 118px;
}

/* Brand lockup: match the supplied EWNS reference, not a generic globe. */
body.ewns-v3-luxury .cc-brand {
  width: 218px;
  min-width: 218px;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  gap: 0;
  color: #fff;
  text-decoration: none;
}

body.ewns-v3-luxury .cc-brand .v3-emblem {
  width: 148px;
  height: 40px;
  margin: 0 0 -9px;
  display: grid;
  place-items: center;
  overflow: visible;
}

body.ewns-v3-luxury .cc-brand .v3-emblem img {
  content: url("/assets/images/ewns-luxury-emblem-v2.svg");
  width: 148px;
  height: auto;
  max-width: none;
}

body.ewns-v3-luxury .cc-brand strong {
  display: block;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 52px;
  font-weight: 500;
  line-height: .78;
  letter-spacing: -.035em;
  color: #fff;
  text-shadow: 0 2px 20px rgb(0 0 0 / 22%);
}

body.ewns-v3-luxury .cc-brand small {
  display: block;
  margin-top: 10px;
  font-size: 8px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: .265em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgb(255 255 255 / 92%);
}

body.ewns-v3-luxury .cc-main-nav {
  gap: clamp(18px, 1.55vw, 30px);
}

body.ewns-v3-luxury .cc-main-nav > a {
  position: relative;
  padding-block: 12px;
  letter-spacing: .115em;
}

body.ewns-v3-luxury .cc-main-nav > a::after {
  content: "";
  position: absolute;
  right: 50%;
  bottom: 4px;
  left: 50%;
  height: 1px;
  background: var(--v3r-gold-soft);
  transition: right .25s ease, left .25s ease;
}

body.ewns-v3-luxury .cc-main-nav > a:hover::after,
body.ewns-v3-luxury .cc-main-nav > a[aria-current="page"]::after {
  right: 0;
  left: 0;
}

/* Restore a controlled editorial rhythm and prevent clipped anchor headings. */
body.ewns-v3-luxury #tailored {
  scroll-margin-top: 126px;
  padding-top: clamp(104px, 8vw, 142px);
  padding-bottom: clamp(104px, 8vw, 142px);
  overflow: visible;
}

body.ewns-v3-luxury #tailored h2 {
  max-width: 13ch;
  margin: 0 auto;
  padding: .08em 0 .04em;
  font-size: clamp(48px, 4.6vw, 76px);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow: visible;
}

body.ewns-v3-luxury #tailored h2 + * {
  margin-top: 26px;
}

body.ewns-v3-luxury .cc-audience-grid {
  align-items: stretch;
  gap: clamp(22px, 2vw, 34px);
  margin-top: clamp(44px, 4vw, 64px);
}

/* Fix the visible card break: image, icon and content now share one layer stack. */
body.ewns-v3-luxury .cc-audience-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 510px;
  padding: 0 32px 34px;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  background: rgb(255 255 255 / 96%);
  border: 1px solid rgb(11 39 51 / 10%);
  box-shadow: 0 24px 70px rgb(11 39 51 / 10%);
  isolation: isolate;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

body.ewns-v3-luxury .cc-audience-card:hover {
  transform: translateY(-7px);
  border-color: rgb(216 175 90 / 55%);
  box-shadow: 0 34px 88px rgb(11 39 51 / 16%);
}

body.ewns-v3-luxury .cc-audience-card .cc-card-image {
  position: relative;
  z-index: 1;
  width: calc(100% + 64px);
  height: 226px;
  margin: 0 -32px;
  overflow: hidden;
  background: var(--v3r-navy);
}

body.ewns-v3-luxury .cc-audience-card .cc-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgb(4 22 31 / 30%));
  pointer-events: none;
}

body.ewns-v3-luxury .cc-audience-card .cc-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.015);
  transition: transform .7s cubic-bezier(.2, .72, .2, 1);
}

body.ewns-v3-luxury .cc-audience-card:hover .cc-card-image img {
  transform: scale(1.055);
}

body.ewns-v3-luxury .cc-audience-card .cc-card-icon {
  position: relative;
  z-index: 5;
  top: auto;
  left: auto;
  width: 58px;
  height: 58px;
  margin: -29px auto 20px;
  display: grid;
  flex: 0 0 58px;
  place-items: center;
  transform: none;
  color: #fff;
  background: var(--v3r-navy);
  border: 1px solid var(--v3r-gold-soft);
  border-radius: 50%;
  box-shadow: 0 12px 30px rgb(4 22 31 / 24%);
}

body.ewns-v3-luxury .cc-audience-card .cc-card-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
}

body.ewns-v3-luxury .cc-audience-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.ewns-v3-luxury .cc-audience-card p {
  max-width: 34ch;
  margin: 18px auto 28px;
  color: rgb(11 39 51 / 76%);
  line-height: 1.7;
  text-align: center;
}

body.ewns-v3-luxury .cc-audience-card > a {
  margin-top: auto;
}

body.ewns-v3-luxury main h1,
body.ewns-v3-luxury main h2 {
  text-wrap: balance;
}

html[lang="de"] body.ewns-v3-luxury :is(.display-title, .service-card h3, .ccp-hero h1, .ccp-feature h2) {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

html[lang="de"] body.ewns-v3-luxury .display-title {
  font-size: clamp(58px, 5.4vw, 84px);
}

html[lang="de"] body.ewns-v3-luxury .service-card h3 {
  max-width: 100%;
  font-size: clamp(30px, 2.4vw, 38px);
}

@media (max-width: 720px) {
  html[lang="de"] .page-home.ewns-v3-luxury .cc-home-hero-copy {
    margin-inline: auto !important;
    transform: none !important;
  }

  html[lang="de"] .page-home.ewns-v3-luxury .cc-home-hero-copy h1 {
    font-size: clamp(56px, 16vw, 68px);
    overflow-wrap: break-word;
    hyphens: auto;
  }

  html[lang="de"] .page-home.ewns-v3-luxury main h2 {
    font-size: clamp(46px, 12.5vw, 50px);
  }
}

body.ewns-v3-luxury .v3-signature-band {
  border-top: 1px solid rgb(216 175 90 / 32%);
  border-bottom: 1px solid rgb(216 175 90 / 22%);
}

body.ewns-v3-luxury .cc-site-footer .cc-brand {
  width: 248px;
  min-width: 248px;
}

body.ewns-v3-luxury .cc-site-footer .cc-brand .v3-emblem {
  width: 168px;
  height: 46px;
}

body.ewns-v3-luxury .cc-site-footer .cc-brand .v3-emblem img {
  width: 168px;
}

body.ewns-v3-luxury .cc-site-footer .cc-brand strong {
  font-size: 58px;
}

@media (max-width: 1180px) {
  body.ewns-v3-luxury .cc-brand {
    width: 188px;
    min-width: 188px;
  }

  body.ewns-v3-luxury .cc-brand strong {
    font-size: 46px;
  }

  body.ewns-v3-luxury .cc-main-nav {
    gap: 15px;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 86px;
  }

  body.ewns-v3-luxury main section[id],
  body.ewns-v3-luxury #tailored {
    scroll-margin-top: 86px;
  }

  body.ewns-v3-luxury .cc-brand {
    width: 158px;
    min-width: 158px;
    justify-items: start;
  }

  body.ewns-v3-luxury .cc-brand .v3-emblem {
    width: 116px;
    height: 30px;
    margin-left: 8px;
    margin-bottom: -7px;
  }

  body.ewns-v3-luxury .cc-brand .v3-emblem img {
    width: 116px;
  }

  body.ewns-v3-luxury .cc-brand strong {
    font-size: 40px;
  }

  body.ewns-v3-luxury .cc-brand small {
    margin-top: 8px;
    font-size: 6px;
    letter-spacing: .21em;
  }

  body.ewns-v3-luxury #tailored {
    padding-top: 88px;
    padding-bottom: 88px;
  }

  body.ewns-v3-luxury #tailored h2 {
    font-size: clamp(42px, 11vw, 60px);
  }

  body.ewns-v3-luxury .cc-audience-card {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  body.ewns-v3-luxury .cc-audience-card {
    padding-right: 22px;
    padding-bottom: 28px;
    padding-left: 22px;
  }

  body.ewns-v3-luxury .cc-audience-card .cc-card-image {
    width: calc(100% + 44px);
    height: 205px;
    margin-right: -22px;
    margin-left: -22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body.ewns-v3-luxury .cc-audience-card,
  body.ewns-v3-luxury .cc-audience-card .cc-card-image img,
  body.ewns-v3-luxury .cc-main-nav > a::after {
    transition: none;
  }
}
