/* ==========================================================================
   SurfEnglish cross-promotion — pinned announcement bar + promo section.
   Markup, copy and locale handling live in js/surfenglish-promo.js; this file
   only styles what that script injects. Brand tokens mirror surfenglish.app
   (dark "oceanic liquid glass") so the block reads as a SurfEnglish card
   sitting inside the light WordByWord site.
   ========================================================================== */

:root {
  --se-accent: #4FD2FF;
  --se-accent2: #B388FF;
  --se-ink: #EAF1FF;
  --se-ink-soft: rgba(234, 241, 255, 0.74);
  --se-ink-faint: rgba(234, 241, 255, 0.52);
  --se-hairline: rgba(255, 255, 255, 0.12);
  --se-glass: rgba(255, 255, 255, 0.07);
  --se-grad: linear-gradient(135deg, #4FD2FF, #B388FF);
  --se-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans", "Microsoft YaHei",
    "Noto Sans", sans-serif;

  /* Set by js/surfenglish-promo.js while the bar is visible. */
  --wbw-se-offset: 0px;      /* announcement bar height (+ service notice, if on) */
  --wbw-se-header-h: 64px;   /* measured height of the fixed site header */
}

/* In-page anchors (#features, #faq …) clear the fixed header and the bar. */
section[id] {
  scroll-margin-top: calc(var(--wbw-se-header-h) + var(--wbw-se-offset));
}

/* ———————————————————————— announcement bar ———————————————————————— */

.wbw-se-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100; /* above the fixed header (100), below site-notice (1200) */
  background: linear-gradient(90deg, #0A1630 0%, #10224A 48%, #1B1F4E 100%);
  color: var(--se-ink);
  font-family: var(--se-font);
  box-shadow: 0 1px 0 rgba(79, 210, 255, 0.28), 0 12px 30px -14px rgba(4, 6, 13, 0.6);
}

.wbw-se-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wbw-se-bar__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.wbw-se-bar__new {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--se-grad);
  color: #06131F;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
  white-space: nowrap;
}

.wbw-se-bar__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--se-ink-soft);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.wbw-se-bar__text strong {
  color: #fff;
  font-weight: 700;
}
.wbw-se-bar__text--short {
  display: none;
}

.wbw-se-bar__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.wbw-se-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.2s, border-color 0.2s;
}
.wbw-se-bar__cta:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
}

.wbw-se-bar__more {
  color: var(--se-accent);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.wbw-se-bar__more:hover {
  text-decoration: underline;
}

.wbw-se-arrow {
  width: 0.85em;
  height: 0.85em;
  flex: 0 0 auto;
}
[dir="rtl"] .wbw-se-arrow {
  transform: scaleX(-1);
}

.wbw-se-bar__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  color: var(--se-ink-faint);
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}
.wbw-se-bar__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.wbw-se-bar a:focus-visible,
.wbw-se-bar button:focus-visible,
.wbw-se-promo a:focus-visible {
  outline: 2px solid var(--se-accent);
  outline-offset: 2px;
}

@media (max-width: 639px) {
  .wbw-se-bar__inner {
    padding: 8px 10px;
    gap: 8px;
  }
  /* The short copy already starts with "New:" — drop the pill to give the text room. */
  .wbw-se-bar__icon,
  .wbw-se-bar__new,
  .wbw-se-bar__more,
  .wbw-se-bar__text--long {
    display: none;
  }
  .wbw-se-bar__text {
    font-size: 0.82rem;
    line-height: 1.3;
  }
  .wbw-se-bar__text--short {
    display: inline;
  }
  .wbw-se-bar__cta {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .wbw-se-bar__close {
    width: 26px;
    height: 26px;
  }
}

/* ———————————————————————— promo section ———————————————————————— */

.wbw-se-promo {
  background: #ffffff;
  padding: 56px 16px 0;
  font-family: var(--se-font);
}

.wbw-se-promo__card {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 28px;
  color: var(--se-ink);
  background:
    radial-gradient(900px 520px at 0% 0%, rgba(79, 210, 255, 0.22), transparent 60%),
    radial-gradient(820px 540px at 100% 18%, rgba(179, 136, 255, 0.2), transparent 60%),
    radial-gradient(700px 500px at 30% 110%, rgba(25, 240, 200, 0.1), transparent 60%),
    linear-gradient(160deg, #122448 0%, #0A1530 55%, #070B18 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px -30px rgba(7, 11, 24, 0.55);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 32px;
  align-items: end;
  padding: 48px 48px 0;
}

.wbw-se-promo__copy {
  min-width: 0;
  padding-bottom: 48px;
  text-align: start;
}

.wbw-se-promo__eyebrow {
  margin: 0 0 18px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--se-accent);
}

.wbw-se-promo__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.wbw-se-promo__brand img {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.wbw-se-promo__name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: #fff;
}
.wbw-se-promo__tagline {
  margin-top: 2px;
  font-size: 0.92rem;
  color: var(--se-ink-soft);
}

.wbw-se-promo__title {
  margin: 0 0 14px;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #fff;
  text-align: start;
}

.wbw-se-promo__lead {
  margin: 0 0 18px;
  max-width: 54ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--se-ink-soft);
}

.wbw-se-promo__chips {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.wbw-se-promo__chips li {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--se-glass);
  border: 1px solid var(--se-hairline);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--se-ink);
}

.wbw-se-promo__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-bottom: 14px;
}
.wbw-se-promo__store {
  display: inline-block;
  line-height: 0;
  transition: transform 0.2s, filter 0.2s;
}
.wbw-se-promo__store img {
  height: 54px;
  width: auto;
  display: block;
}
.wbw-se-promo__store:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.wbw-se-promo__site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--se-accent);
  font-weight: 700;
  font-size: 0.98rem;
}
.wbw-se-promo__site:hover {
  text-decoration: underline;
}
.wbw-se-promo__note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--se-ink-faint);
}

/* Three phones fanned out and cropped by the card's bottom edge. */
.wbw-se-promo__shots {
  align-self: stretch;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: -120px;
  padding: 24px 0 0;
  pointer-events: none;
}
.wbw-se-phone {
  flex: 0 0 46%;
  max-width: 232px;
  margin: 0;
  padding: 6px;
  border-radius: 34px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 60px -20px rgba(4, 6, 13, 0.9), 0 0 80px -30px rgba(79, 210, 255, 0.35);
}
.wbw-se-phone img {
  width: 100%;
  height: auto;
  border-radius: 28px;
  display: block;
}
.wbw-se-phone:nth-child(1) {
  transform: rotate(-7deg) translate(18%, 40px);
  z-index: 1;
}
.wbw-se-phone:nth-child(2) {
  position: relative;
  z-index: 2;
  transform: translateY(-10px);
}
.wbw-se-phone:nth-child(3) {
  transform: rotate(7deg) translate(-18%, 40px);
  z-index: 1;
}

@media (max-width: 900px) {
  .wbw-se-promo {
    padding: 40px 12px 0;
  }
  .wbw-se-promo__card {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 32px 24px 0;
    border-radius: 22px;
  }
  .wbw-se-promo__copy {
    padding-bottom: 28px;
  }
  .wbw-se-promo__lead {
    max-width: none;
  }
  .wbw-se-promo__shots {
    min-height: 0;
    margin-bottom: -90px;
    padding-top: 10px;
  }
  .wbw-se-phone {
    flex-basis: 40%;
    max-width: 180px;
    padding: 5px;
    border-radius: 26px;
  }
  .wbw-se-phone img {
    border-radius: 22px;
  }
}

@media (max-width: 480px) {
  .wbw-se-promo__card {
    padding: 28px 18px 0;
  }
  .wbw-se-promo__brand img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  .wbw-se-promo__store img {
    height: 48px;
  }
}

@media print {
  .wbw-se-bar {
    display: none;
  }
}
