/* ==========================================================================
   FGX — Email marketing (email-marketing/index.html)
   Builds on /assets/fgx/fgx-type.css (fonts + fluid type scale) and
   ui-ux.css (tokens, grid, buttons, quotes, logos, CTA).
     FGX-EM-01 hero + live inbox          FGX-EM-04 personalisation toggle + stats
     FGX-EM-02 capabilities               FGX-EM-07 campaign goal chips
     FGX-EM-03 mobile-first stat + phone
   Colour: every section is a panel that owns its colour (dark, paper, red,
   charcoal, photo) and slides over the previous one with rounded corners.
   The body never flashes between themes.
   ========================================================================== */

.em .ux-eyebrow a { color: inherit; text-decoration: none; }
.em .ux-eyebrow a:hover { color: var(--ux-red); }
.em-intro { margin-top: 28px !important; max-width: 46ch; }

/* ---------- Panels -------------------------------------------------------- */
.em-panel { position: relative; background: var(--ux-bg); color: var(--ux-fg); border-radius: 0; }
.em-panel + .em-panel { --em-r: 0px; margin-top: calc(var(--em-r) * -1); }
.em-panel:nth-child(1) { z-index: 1; } .em-panel:nth-child(2) { z-index: 2; } .em-panel:nth-child(3) { z-index: 3; }
.em-panel:nth-child(4) { z-index: 4; } .em-panel:nth-child(5) { z-index: 5; } .em-panel:nth-child(6) { z-index: 6; } .em-panel:nth-child(7) { z-index: 7; }
.em-panel + .em-panel.ux-pad { padding-top: calc(clamp(96px, 13vw, 220px) + var(--em-r)); }
.em-panels .em-panel { overflow: clip; }
.em-panel + .em-panel { box-shadow: 0 -28px 60px rgba(0, 0, 0, .22); }

.em-panel--dark { --ux-bg: var(--ux-ink); --ux-fg: var(--ux-paper); --ux-muted: rgba(244, 240, 238, .56); --ux-line: rgba(244, 240, 238, .16); }
.em-panel--charcoal {
  --ux-bg: #171514; --ux-fg: var(--ux-paper); --ux-muted: rgba(244, 240, 238, .56); --ux-line: rgba(244, 240, 238, .14);
  background: radial-gradient(70% 60% at 85% 0%, rgba(229, 36, 33, .16), transparent 70%), radial-gradient(60% 50% at 0% 100%, rgba(242, 169, 0, .06), transparent 70%), #171514;
}
.em-panel--paper { --ux-bg: var(--ux-paper); --ux-fg: var(--ux-ink); --ux-muted: rgba(15, 15, 15, .55); --ux-line: rgba(15, 15, 15, .14); }
.em-panel--red { --ux-bg: var(--ux-red); --ux-fg: var(--ux-ink); --ux-muted: rgba(15, 15, 15, .62); --ux-line: rgba(15, 15, 15, .2); }
.em-panel--photo { --ux-bg: var(--ux-ink); --ux-fg: #fff; }
/* Accents follow the panel, never the body theme */
.fgx-email .em .em-panel em { color: var(--ux-red); }
.fgx-email .em .em-panel--red em { color: var(--ux-paper); }
.em-panel--red .ux-label { color: var(--ux-ink); }
.em-panel--red .ux-dot { background: var(--ux-ink); }
.em-panel.ux-cta { padding-top: calc(clamp(140px, 18vw, 280px) + var(--em-r, 0px)); }
.em-panel.ux-quotes { padding-top: calc(140px + var(--em-r, 0px)); }

/* ---------- 01 Hero ------------------------------------------------------- */
.em-hero { padding-top: clamp(120px, 17vh, 200px); padding-bottom: calc(clamp(88px, 11vw, 180px) + 40px); }
.em-hero::before { content: ""; position: absolute; right: -20vw; top: 25vh; width: 75vw; height: 75vw; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(229, 36, 33, .16), transparent 70%); }
.em-hero__body { position: relative; display: grid; gap: 56px; margin-top: clamp(40px, 5vw, 88px); }
@media (min-width: 1200px) { .em-hero__body { grid-template-columns: 5fr 7fr; gap: var(--ux-gap); align-items: start; } .em-hero__copy { padding-top: 12px; } }
.em-hero__copy .ux-lead { max-width: 25ch; }
.em-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: clamp(36px, 4vw, 64px) 0 0; padding: 0; }
.em-tags li { padding: 9px 16px; border: 1px solid var(--ux-line); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ux-muted); }

.em-inbox {
  position: relative; display: grid; place-items: center; min-height: clamp(540px, 44vw, 720px); padding: clamp(64px, 6vw, 96px) 0;
  overflow: hidden; isolation: isolate; border: 0; border-radius: 0;
  background: transparent;
}
.em-inbox::before { content: none; }
.em-inbox__cap { position: absolute; left: 0; top: 20px; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(244, 240, 238, .55); }
.em-inbox__rec { width: 8px; height: 8px; border-radius: 50%; background: var(--ux-red); animation: ux-pulse 2.4s infinite; }

.em-win { width: min(100%, 540px); border-radius: 18px; overflow: hidden; background: #f7f4f2; color: #0f0f0f; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 50px 100px rgba(0, 0, 0, .55); }
.em-win__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #eae5e2; font-size: 12px; font-weight: 700; }
.em-win__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(15, 15, 15, .18); }
.em-win__bar span { margin-left: 12px; }
.em-win__bar b { margin-left: auto; padding: 4px 10px; border-radius: 99px; background: #fff; font-size: 11px; color: var(--ux-red); }
.em-win__list { list-style: none; margin: 0; padding: 6px; height: 356px; overflow: hidden; }
.em-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; overflow: hidden; }
.em-row + .em-row { border-top: 1px solid rgba(15, 15, 15, .06); }
.em-row:first-child { background: #fff; box-shadow: 0 1px 0 rgba(15, 15, 15, .05); }
.em-row__av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font-style: normal; font-weight: 700; font-size: 14px; }
.em-row__txt { min-width: 0; }
.em-row__txt p { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.em-row__from { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.em-row__from span { font-weight: 500; color: rgba(15, 15, 15, .45); }
.em-row__sub { margin-top: 3px !important; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.em-row__sub mark { padding: 0 4px; margin: 0 -2px; border-radius: 4px; background: rgba(229, 36, 33, .12); color: var(--ux-red); transition: background .6s var(--ux-ease); }
.em-row__sub mark.is-token { background: #0f0f0f; color: #f2d200; font-family: ui-monospace, Menlo, monospace; font-size: .86em; }
.em-row__pre { margin-top: 2px !important; font-size: 12px; color: rgba(15, 15, 15, .5); }
.em-row__st { padding: 4px 9px; border-radius: 99px; background: rgba(15, 15, 15, .06); color: rgba(15, 15, 15, .55); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.em-row__st.is-click { background: var(--ux-red); color: #fff; }
.em-row__st.is-new { background: #0f0f0f; color: #fff; }

.em-chip { position: absolute; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-radius: 14px; background: rgba(20, 20, 20, .74); border: 1px solid rgba(255, 255, 255, .12); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 20px 40px rgba(0, 0, 0, .35); }
.em-chip i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ux-red); font-style: normal; font-size: 11px; }
.em-chip--1 { left: 4%; top: 16%; }
.em-chip--2 { right: 4%; top: 52%; }
.em-chip--3 { left: 7%; bottom: 8%; }
@media (max-width: 767px) {
  .em-inbox { min-height: 600px; padding-top: 110px; padding-bottom: 110px; }
  .em-win__list { height: 330px; }
  .em-row { grid-template-columns: 30px 1fr; }
  .em-row__av { width: 30px; height: 30px; }
  .em-row__st { display: none; }
  .em-chip--1 { left: 4%; top: 48px; }
  .em-chip--2 { right: 4%; top: auto; bottom: 56px; }
  .em-chip--3 { left: 4%; bottom: 12px; }
}

/* ---------- 02 Capabilities ---------------------------------------------- */
.em-caps { margin-top: clamp(72px, 9vw, 160px); }
.em-caps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px var(--ux-gap); }
@media (min-width: 768px) { .em-caps__list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .em-caps__list { grid-template-columns: repeat(4, 1fr); } }
.em-caps__list li { padding-top: 22px; border-top: 1px solid var(--ux-line); }
.em-caps__list span { display: block; margin-bottom: clamp(28px, 4vw, 64px); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ux-red); }
.em-caps__list .ux-body { color: var(--ux-muted); max-width: 30ch; }

/* ---------- 03 Mobile ----------------------------------------------------- */
.em-mobile__grid { display: grid; gap: 64px var(--ux-gap); margin-top: clamp(40px, 5vw, 80px); }
@media (min-width: 1200px) { .em-mobile__grid { grid-template-columns: 6fr 6fr; align-items: start; } }
.em-mobile__stat { display: grid; grid-template-columns: 1fr auto; gap: 0 clamp(20px, 3vw, 48px); align-items: start; }
.em-mobile__stat .em-big { grid-column: 1 / -1; }
.em-big { display: flex; align-items: flex-start; font-family: var(--ux-display); font-weight: 600; font-size: clamp(96px, 15vw, 300px); line-height: .85; letter-spacing: -.07em; font-variant-numeric: tabular-nums; margin-bottom: 28px !important; }
.em-big b { font-weight: 400; margin: 0 .02em; }
.em-big sup { font-size: .3em; top: 0; line-height: 1.3; margin-left: .06em; color: var(--ux-paper); }
.em-mobile__stat .ux-lead { max-width: 24ch; }
.em-phone { position: relative; width: clamp(200px, 17vw, 260px); aspect-ratio: 9 / 18.5; margin-top: 8px; padding: 8px; border-radius: 34px; background: #0f0f0f; box-shadow: 0 40px 80px rgba(80, 0, 0, .35); transform: rotate(-4deg); }
@media (max-width: 575px) { .em-mobile__stat { grid-template-columns: 1fr; } .em-phone { margin-inline: auto; } }
.em-phone__screen { height: 100%; overflow: hidden; border-radius: 27px; background: #fff; color: #0f0f0f; padding: 30px 14px 14px; display: flex; flex-direction: column; }
.em-phone__hd { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; padding-bottom: 10px; border-bottom: 1px solid rgba(15, 15, 15, .08); }
.em-phone__hd span { color: rgba(15, 15, 15, .45); }
.em-phone__img { margin-top: 12px; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; }
.em-phone__img img { width: 100%; height: 100%; object-fit: cover; }
.em-phone__h { margin: 12px 0 0; font-family: var(--ux-display); font-weight: 600; font-size: 20px; line-height: 1; letter-spacing: -.04em; }
.em-phone__l { display: grid; gap: 5px; margin: 10px 0 0; }
.em-phone__l i { height: 5px; border-radius: 99px; background: rgba(15, 15, 15, .12); }
.em-phone__l i + i { width: 70%; }
.em-phone__btn { margin-top: auto; display: block; padding: 12px; border-radius: 10px; background: var(--ux-red); color: #fff; text-align: center; font-size: 12px; font-weight: 700; }

.em-benefits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ux-line); }
.em-benefits li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: clamp(18px, 1.8vw, 28px) 0; border-bottom: 1px solid var(--ux-line); transition: padding .5s var(--ux-ease); }
.em-benefits li:hover { padding-left: 12px; }
.em-benefits span { padding-top: .6em; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.em-benefits h3 { margin: 0; font-family: var(--ux-display); font-weight: 600; font-size: clamp(26px, 2.4vw, 44px); line-height: 1.05; letter-spacing: -.04em; }
.em-benefits p { margin: 8px 0 0; color: var(--ux-muted); font-size: 16px; line-height: 1.45; }

/* ---------- 04 Personalisation ------------------------------------------- */
.em-pers { display: grid; gap: 64px var(--ux-gap); margin-top: clamp(48px, 6vw, 96px); }
@media (min-width: 1200px) { .em-pers { grid-template-columns: 5fr 7fr; align-items: start; } .em-pers__demo { position: sticky; top: 14vh; } }

.em-switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 5px; margin-bottom: 20px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--ux-line); }
.em-switch button { all: unset; position: relative; z-index: 1; cursor: pointer; padding: 11px 22px; border-radius: 999px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ux-muted); transition: color .4s var(--ux-ease); }
.em-switch button[aria-pressed="true"] { color: #fff; }
.em-switch button:focus-visible { outline: 3px solid #f2d200; outline-offset: 2px; }
.em-switch__thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--ux-red); transition: transform .6s var(--ux-ease), background .6s var(--ux-ease); transform: translateX(100%); }
.em-pers.is-generic .em-switch__thumb { transform: translateX(0); background: #5c5957; }

.em-mail { border-radius: 18px; overflow: hidden; background: #f7f4f2; color: #0f0f0f; box-shadow: 0 40px 80px rgba(0, 0, 0, .45); max-width: 520px; }
.em-mail__meta { display: flex; gap: 12px; align-items: baseline; margin: 0; padding: 16px 20px; background: #eae5e2; font-size: 14px; font-weight: 700; }
.em-mail__meta b { flex: 0 0 auto; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(15, 15, 15, .45); }
.em-mail__body { padding: 22px 22px 24px; }
.em-mail__hi { margin: 0; font-family: var(--ux-display); font-weight: 600; font-size: 26px; letter-spacing: -.04em; }
.em-mail__p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: rgba(15, 15, 15, .7); min-height: 4.5em; }
.em-mail__card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; margin-top: 18px; padding: 10px; border-radius: 14px; background: #fff; }
.em-mail__img { aspect-ratio: 1; overflow: hidden; border-radius: 10px; }
.em-mail__img img { width: 100%; height: 100%; object-fit: cover; }
.em-mail__k { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ux-red); }
.em-mail__t { margin: 4px 0 0; font-family: var(--ux-display); font-weight: 600; font-size: 20px; letter-spacing: -.03em; }
.em-mail__btn { display: inline-block; margin-top: 18px; padding: 13px 20px; border-radius: 999px; background: var(--ux-red); color: #fff; font-size: 14px; font-weight: 700; transition: background .5s var(--ux-ease); }
.em-pers.is-generic .em-mail__btn { background: #5c5957; }
.em-pers.is-generic .em-mail__k { color: rgba(15, 15, 15, .45); }
.em-mail__note { margin: 0; padding: 0 22px 16px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(15, 15, 15, .35); }

.em-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ux-line); }
.em-stats { transition: opacity .6s var(--ux-ease); }
.em-stats li { padding: 28px 16px 32px 0; border-bottom: 1px solid var(--ux-line); }
.em-stats li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--ux-line); }
@media (min-width: 768px) { .em-stats li { padding: 36px 28px 40px 0; } .em-stats li:nth-child(even) { padding-left: 32px; } }
.em-stats strong { display: flex; align-items: flex-start; font-family: var(--ux-display); font-weight: 600; font-size: clamp(56px, 6.4vw, 128px); line-height: .9; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.em-stats sup { font-size: .36em; top: 0; line-height: 1.3; margin-left: .06em; color: var(--ux-red); }
.em-stats p { margin: 14px 0 0; max-width: 26ch; color: var(--ux-muted); font-size: 15px; line-height: 1.45; }
.em-pers.is-generic .em-stats { opacity: .35; }

/* ---------- 07 Goal chips ------------------------------------------------- */
.em-goals { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.em-goals button {
  all: unset; box-sizing: border-box; cursor: pointer; padding: 13px 20px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
  font-size: 15px; font-weight: 700; color: #fff; transition: background .35s var(--ux-ease), border-color .35s var(--ux-ease), transform .35s var(--ux-ease);
}
.em-goals button:hover { border-color: #fff; }
.em-goals button[aria-pressed="true"] { background: var(--ux-red); border-color: var(--ux-red); }
.em-goals button[aria-pressed="true"]::before { content: "✓ "; }
.em-goals button:active { transform: scale(.96); }
.em-goals button:focus-visible { outline: 3px solid #f2d200; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { .em-inbox__rec { animation: none; } }
