/* ==========================================================================
   WOMP site — "What's new in 4.0.0" page (whats-new-4-0-0.html)
   Page-only styles. Loaded AFTER styles.css?v=14.
   Every selector is scoped under .wn400 so nothing leaks into other pages.
   Uses the shared tokens from styles.css (:root). Site is light-only;
   the dark block below is a fixed local card, not a theme.
   ========================================================================== */

.wn400 {
  --wn-bezel: #18201B;
  --wn-bezel-on-dark: #2A332D;
  --wn-dark-bg: #111713;
  --wn-dark-text: #E6EDE7;
  --wn-dark-text-2: #A7B4AB;
  --wn-dark-green: #9FD6A8;
  --wn-soon-bg: #FFF4E0;
  --wn-soon-text: #8A5A12;
  display: block;
}

/* Anchor targets clear the sticky header */
.wn400 section[id] { scroll-margin-top: 92px; }

/* ---------- Hero ---------- */
.wn400 .wn-back {
  display: flex;
  width: fit-content;
  margin: 0 0 18px 0;
}
.wn400 .wn-title {
  font-size: clamp(64px, 7vw, 88px);
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
}
.wn400 .wn-accent { color: var(--green); }

.wn400 .wn-store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.wn400 .store-badge {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.wn400 .final-cta .store-badge { border-color: transparent; box-shadow: none; }

.wn400 .wn-hero-visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  aspect-ratio: 1 / 1.2;
}
.wn400 .wn-phone.wn-hero-phone {
  position: absolute;
  margin: 0;
  max-width: none;
}
.wn400 .wn-phone.wn-hero-phone--front { width: 54%; right: 6%; top: 0; z-index: 2; }
.wn400 .wn-phone.wn-hero-phone--back  { width: 47%; left: 4%; top: 9%; z-index: 1; transform: rotate(-6deg); }

.wn400 .wn-float-1 { top: 10%; left: -3%; animation: float 8s ease-in-out infinite; }
.wn400 .wn-float-2 { top: 46%; right: -3%; animation: float 9s ease-in-out infinite 1s; }
.wn400 .wn-float-3 { bottom: 6%; left: 8%; animation: float 10s ease-in-out infinite .5s; }

/* ---------- Glance strip + on-page nav ---------- */
.wn400 .wn-glance { padding-top: 8px; }
.wn400 .wn-k-ico { margin-right: 8px; }
.wn400 .wn-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.wn400 .wn-toc .chip {
  transition: border-color var(--dur-micro) var(--ease), background var(--dur-micro) var(--ease), color var(--dur-micro) var(--ease);
}
.wn400 .wn-toc .chip:hover { border-color: var(--border-strong); background: var(--green-soft-2); color: var(--green); }
.wn400 .wn-toc .wn-toc-cta { background: var(--green-soft); border-color: var(--border-strong); color: var(--green); font-weight: 600; }

/* ---------- Phone frame + screenshot slot ---------- */
.wn400 .wn-phone {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  padding: 2.4%;
  background: var(--wn-bezel);
  border-radius: 15% / 7%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 30px 60px -24px rgba(20, 26, 22, .35),
    0 14px 42px rgba(20, 26, 22, .08);
}
.wn400 .wn-phone-screen {
  position: relative;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: 13.4% / 6.2%;
  isolation: isolate;
  background:
    radial-gradient(70% 40% at 50% 30%, rgba(167, 215, 174, .30) 0%, rgba(167, 215, 174, 0) 70%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--green-soft-2) 100%);
}
.wn400 .wn-phone-screen--dark {
  background:
    radial-gradient(70% 40% at 50% 30%, rgba(47, 122, 58, .30) 0%, rgba(47, 122, 58, 0) 70%),
    linear-gradient(180deg, #1A221D 0%, #0F1411 100%);
}

/* Real screenshot sits on top of the placeholder */
.wn400 .wn-shot {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  color: transparent;   /* hide alt text while a missing file errors */
  font-size: 0;
}
.wn400 .wn-shot.is-missing { display: none; }

/* Placeholder (visible only when the PNG is missing) */
.wn400 .wn-ph {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 16px;
  text-align: center;
  color: var(--text-tertiary);
}
.wn400 .wn-ph-ico {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.wn400 .wn-ph-t { font-size: 14px; font-weight: 600; color: var(--text-secondary); line-height: 1.3; }
.wn400 .wn-ph-f {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(20, 26, 22, .05);
}
.wn400 .wn-phone-screen--dark .wn-ph { color: #8E9B92; }
.wn400 .wn-phone-screen--dark .wn-ph-t { color: #C9D3CC; }
.wn400 .wn-phone-screen--dark .wn-ph-ico { background: #222B25; box-shadow: none; }
.wn400 .wn-phone-screen--dark .wn-ph-f { background: rgba(255, 255, 255, .06); }

/* Optional video (block is commented out in the HTML) */
.wn400 .wn-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

/* ---------- Stage behind a phone ---------- */
.wn400 .wn-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
  border-radius: 40px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 30%, rgba(167, 215, 174, .36) 0%, rgba(167, 215, 174, 0) 70%),
    radial-gradient(50% 45% at 85% 90%, rgba(213, 232, 187, .40) 0%, rgba(213, 232, 187, 0) 70%),
    var(--surface);
}

/* ---------- Feature rows ---------- */
.wn400 .wn-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}
.wn400 .wn-row--flip > .wn-row-media { order: -1; }
.wn400 .wn-row-gap { margin-top: 80px; }
.wn400 .wn-copy, .wn400 .wn-row-media { min-width: 0; }

.wn400 .wn-copy .eyebrow { margin-bottom: 16px; }
.wn400 .wn-copy h2.h2 { font-size: 46px; line-height: 1.08; margin-bottom: 16px; }
.wn400 .wn-copy .h3 { margin-bottom: 10px; }
.wn400 .wn-copy .lead { font-size: 19px; margin-bottom: 24px; }
.wn400 .wn-sub { font-size: 17px; color: var(--text-secondary); line-height: 1.5; max-width: 560px; margin-bottom: 20px; }
.wn400 .wn-sub-sm { font-size: 14px; line-height: 1.55; margin: 18px 0 0; }

.wn400 .wn-list { gap: 12px; }
.wn400 .wn-list li { font-size: 16px; line-height: 1.45; }

.wn400 .wn-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}
.wn400 .wn-chips .chip { font-size: 13px; padding: 6px 12px; }
.wn400 .wn-chips-k { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-right: 2px; }
.wn400 .wn-chips + .wn-list { margin-top: 24px; }
.wn400 .lead + .wn-chips { margin-top: 0; }

.wn400 .wn-note {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ---------- "More screens" strip under a feature row ----------
   Below 1000px: a horizontal swipe strip, full-bleed to the screen edges so the
   next card visibly peeks out; scroll-snap lives inside .wn-strip only.
   From 1000px: the cards wrap into a centered row/grid, no scrolling.
   The list is width:max-content + margin auto, so short strips stay centered
   without breaking the scroll start (no justify-content:center on a scroller). */
.wn400 .wn-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.wn400 .wn-shots { margin-top: 56px; }
.wn400 .wn-shots-k {
  margin: 0 0 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-secondary);
}
.wn400 .wn-strip {
  position: relative;
  margin-inline: calc(-1 * var(--pad-x));
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad-x);
  border-radius: 0;
}
.wn400 .wn-strip:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
  border-radius: 24px;
}
.wn400 .wn-strip-list {
  display: flex;
  gap: 18px;
  width: max-content;
  margin: 0 auto;
  padding: 12px var(--pad-x) 30px;
  list-style: none;
}
.wn400 .wn-strip-item {
  flex: 0 0 auto;
  width: 200px;
  scroll-snap-align: start;
}
.wn400 .wn-strip-fig { margin: 0; }
.wn400 .wn-phone.wn-phone--sm {
  width: 100%;
  max-width: none;
  padding: 3%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .06),
    0 16px 30px -16px rgba(20, 26, 22, .32),
    0 6px 18px rgba(20, 26, 22, .06);
}
.wn400 .wn-strip-cap {
  margin-top: 12px;
  padding-inline: 2px;
  text-align: center;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
}

@media (prefers-reduced-motion: no-preference) {
  .wn400 .wn-strip { scroll-behavior: smooth; }
}

@media (min-width: 1000px) {
  .wn400 .wn-strip {
    margin-inline: 0;
    overflow: visible;
    scroll-snap-type: none;
  }
  .wn400 .wn-strip-list {
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    gap: 28px 24px;
    padding: 14px 0 8px;
  }
  .wn400 .wn-strip-item { width: 204px; }
}

/* ---------- Dark-theme showcase (fixed dark card) ---------- */
.wn400 .wn-dark {
  margin-top: 96px;
  padding: 64px;
  border-radius: 40px;
  color: var(--wn-dark-text);
  overflow: hidden;
  background:
    radial-gradient(55% 60% at 25% 45%, rgba(47, 122, 58, .38) 0%, rgba(47, 122, 58, 0) 70%),
    radial-gradient(40% 40% at 90% 10%, rgba(159, 214, 168, .10) 0%, rgba(159, 214, 168, 0) 70%),
    var(--wn-dark-bg);
}
.wn400 .wn-dark .h3 { color: #fff; }
.wn400 .wn-dark .wn-sub { color: var(--wn-dark-text-2); }
.wn400 .wn-dark .plan-list li { color: var(--wn-dark-text); }
.wn400 .wn-dark .plan-list li::before { background: #3E9A4B; }
.wn400 .wn-eyebrow-dark { background: rgba(159, 214, 168, .14); color: var(--wn-dark-green); }
.wn400 .wn-phone--on-dark {
  background: var(--wn-bezel-on-dark);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 30px 70px -20px rgba(0, 0, 0, .6);
}

/* ---------- Mini cards grid ---------- */
.wn400 .wn-grid-title { text-align: center; margin: 96px 0 28px; }
.wn400 .wn-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.wn400 .wn-mini {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-card);
  padding: 24px;
  transition: transform var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease);
}
.wn400 .wn-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border); }
.wn400 .wn-mini-ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.wn400 .wn-mini h3,
.wn400 .wn-mini h4 { font-size: 17px; letter-spacing: -0.01em; margin-bottom: 6px; }
.wn400 .wn-mini p { font-size: 14.5px; line-height: 1.5; color: var(--text-secondary); }

/* ---------- How to update ---------- */
.wn400 .wn-update-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
  margin-inline: auto;
}
.wn400 .wn-update { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.wn400 .wn-update h3 { font-size: 26px; }
.wn400 .wn-update p { flex-grow: 1; font-size: 16px; }
.wn400 .wn-update-ico {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
}
.wn400 .wn-pill-soon { background: var(--wn-soon-bg); color: var(--wn-soon-text); }

.wn400 .wn-final { padding-top: 0; }
/* Keyboard focus ring visible on the green panel */
.wn400 .final-cta :focus-visible { outline-color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .wn400 .wn-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wn400 .wn-row { gap: 48px; }
  .wn400 .wn-copy h2.h2 { font-size: 40px; }
}

@media (max-width: 1000px) {
  .wn400 .wn-back { margin-inline: auto; }
  .wn400 .wn-store-row { justify-content: center; }
  .wn400 .wn-hero-visual { max-width: 460px; }
}

@media (max-width: 900px) {
  .wn400 .wn-title { font-size: 64px; }
  .wn400 .wn-row { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .wn400 .wn-row--flip > .wn-row-media { order: 0; }
  .wn400 .wn-row-gap { margin-top: 64px; }
  .wn400 .wn-copy h2.h2 { font-size: 32px; line-height: 1.12; }
  .wn400 .wn-copy .lead { font-size: 17px; }
  .wn400 .wn-stage { padding: 36px 20px; border-radius: 28px; }
  .wn400 .wn-phone { max-width: 270px; }
  .wn400 .wn-phone.wn-hero-phone { max-width: none; }
  .wn400 .wn-dark { margin-top: 64px; padding: 40px 22px; border-radius: 28px; }
  .wn400 .wn-grid-title { margin: 64px 0 22px; }
  .wn400 .wn-update-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .wn400 .wn-shots { margin-top: 44px; }
  .wn400 .wn-strip {
    margin-inline: calc(-1 * var(--pad-x-mobile));
    scroll-padding-inline: var(--pad-x-mobile);
  }
  .wn400 .wn-strip-list { padding-inline: var(--pad-x-mobile); }
}

@media (max-width: 560px) {
  .wn400 .wn-mini-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .wn400 .wn-mini {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 14px;
    padding: 18px;
  }
  .wn400 .wn-mini-ico { grid-row: span 2; margin-bottom: 0; }
  .wn400 .wn-shots { margin-top: 36px; }
  .wn400 .wn-strip-list { gap: 14px; }
  .wn400 .wn-strip-item { width: 180px; }
}

@media (max-width: 500px) {
  .wn400 .wn-title { font-size: 50px; }
  .wn400 .wn-store-row .store-badge,
  .wn400 .final-cta-buttons .store-badge,
  .wn400 .wn-update .store-badge { flex: 1 1 100%; justify-content: center; }
  .wn400 .wn-update .store-badge { align-self: stretch; }
  .wn400 .wn-hero-visual { max-width: 360px; aspect-ratio: 1 / 1.34; }
  .wn400 .wn-phone.wn-hero-phone--front { width: 60%; right: 2%; }
  .wn400 .wn-phone.wn-hero-phone--back  { width: 52%; left: 0; top: 8%; }
  .wn400 .wn-copy h2.h2 { font-size: 26px; }
  .wn400 .wn-copy .lead { font-size: 16px; }
  .wn400 .wn-list li { font-size: 15px; }
  .wn400 .wn-sub { font-size: 16px; }
  .wn400 .wn-stage { padding: 28px 16px; }
  .wn400 .wn-phone { max-width: 250px; }
  .wn400 .wn-phone.wn-hero-phone { max-width: none; }
  .wn400 .wn-update h3 { font-size: 22px; }
}

@media (max-width: 400px) {
  .wn400 .wn-title { font-size: 44px; }
  .wn400 .wn-copy h2.h2 { font-size: 23px; }
  .wn400 .wn-phone { max-width: 236px; }
  .wn400 .wn-phone.wn-hero-phone { max-width: none; }
}

@media (max-width: 360px) {
  .wn400 .wn-title { font-size: 40px; }
  .wn400 .hero-badge { white-space: normal; text-align: center; }
  .wn400 .wn-hero-visual { max-width: 100%; }
  .wn400 .wn-toc .chip { font-size: 13px; padding: 7px 12px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .wn400 .wn-float-1,
  .wn400 .wn-float-2,
  .wn400 .wn-float-3 { animation: none; }
  .wn400 .wn-mini,
  .wn400 .wn-toc .chip { transition: none; }
  .wn400 .wn-mini:hover { transform: none; }
}
