/*
 * "New in AIWA": the showcase of what shipped, on /, /black-friday, /whitelabel and /wl (2026-11-19).
 *
 * Its own prefix (.aw-) and its own colours, so it reads the same on the lp lander and the page-- marketing pages.
 * Every claim on it comes from the code (the plan's truth sheet): change the copy only against the source it names.
 *
 * Motion is a bonus, never the message. Without JS, or with reduced motion, every tile shows its final state.
 * whats-new.js sets [data-armed] on .aw-new (start states) and .is-in on each tile once it is in view (final states).
 */
.aw-new {
  --aw-tile: #13110f;
  --aw-tile-2: #181512;
  --aw-line: rgb(255 255 255 / 0.08);
  --aw-line-2: rgb(255 255 255 / 0.14);
  --aw-head: #f6efe6;
  --aw-text: #bdb4a8;
  --aw-mute: #948c80;
  --aw-amber: #fdac53;
  --aw-orange: #ff8a1f;
  --aw-live: #4ade80;
  color: var(--aw-text);
  text-align: left;
}
.aw-new *, .aw-new *::before, .aw-new *::after { box-sizing: border-box; }

/* On / the showcase is its own band; on the page-- pages it sits in a .page-section .shell. */
.aw-new-band { padding: clamp(72px, 10vw, 128px) 16px; }
.aw-new-band .aw-new { max-width: 1180px; margin: 0 auto; }

/* ---- head ------------------------------------------------------------------ */
.aw-new__head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.aw-new__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgb(255 138 31 / 0.08);
  box-shadow: inset 0 0 0 1px rgb(255 138 61 / 0.32);
  color: #ffc27a;
  font: 600 12px/1.3 'Commit Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.aw-new__pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--aw-orange); }
.aw-new__pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgb(255 138 31 / 0.6); animation: aw-pulse 2.4s ease-out infinite; }
.aw-new__title {
  margin: 18px 0 0;
  color: var(--aw-head);
  font-family: var(--font-display, inherit);
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.aw-new__title span { color: var(--aw-mute); }
.aw-new__lead { max-width: 620px; margin: 18px auto 0; color: var(--aw-text); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.6; }

/* ---- the bento --------------------------------------------------------------- */
.aw-new__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "engine engine chat"
    "credits keys chat"
    "publish publish chat";
  gap: 16px;
}
.aw-new--partner .aw-new__grid {
  grid-template-areas:
    "engine engine credits"
    "keys publish publish";
}
.aw-tile--engine { grid-area: engine; }
.aw-tile--credits { grid-area: credits; }
.aw-tile--keys { grid-area: keys; }
.aw-tile--publish { grid-area: publish; }
.aw-tile--chat { grid-area: chat; }

.aw-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 26px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--aw-tile-2), var(--aw-tile));
  box-shadow: inset 0 0 0 1px var(--aw-line);
}
.aw-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(60% 50% at 100% 0%, rgb(255 94 0 / 0.1), transparent 70%);
  pointer-events: none;
}
.aw-tile > * { position: relative; }
.aw-tile--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: center; }
.aw-tile__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--aw-amber);
  font: 600 11px/1.3 'Commit Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.aw-tile__title { margin: 10px 0 0; color: var(--aw-head); font-family: var(--font-display, inherit); font-size: clamp(20px, 2vw, 25px); font-weight: 600; line-height: 1.2; letter-spacing: -0.012em; }
.aw-tile__text { margin: 10px 0 0; font-size: 15px; line-height: 1.6; }
.aw-tile__fine { margin: 0; color: var(--aw-mute); font-size: 12.5px; line-height: 1.5; }
.aw-badge {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgb(74 222 128 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(74 222 128 / 0.35);
  color: #a7f3c4;
  font-size: 10.5px;
  letter-spacing: 0.1em;
}

/* ---- 1. the engine: prompt, first screen, whole site --------------------------- */
.aw-run { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.aw-run__track { position: relative; height: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.08); }
.aw-run__fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #ff5e00, #ffb300); transform-origin: left center; }
.aw-run__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.aw-run__step { display: grid; gap: 4px; }
.aw-run__step b { display: flex; align-items: center; gap: 8px; color: var(--aw-head); font-size: 14px; font-weight: 600; }
.aw-run__step b::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--aw-orange); box-shadow: 0 0 0 4px rgb(255 138 31 / 0.16); }
.aw-run__step span { color: var(--aw-mute); font-size: 13px; }
.aw-build {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #0c0a09;
  box-shadow: inset 0 0 0 1px var(--aw-line);
}
.aw-build__bar { display: flex; gap: 5px; }
.aw-build__bar i { width: 7px; height: 7px; border-radius: 50%; background: rgb(255 255 255 / 0.14); }
.aw-build__hero { height: 58px; border-radius: 9px; background: linear-gradient(110deg, rgb(255 94 0 / 0.38), rgb(255 179 0 / 0.16) 60%, rgb(255 255 255 / 0.04)); }
.aw-build__line { height: 8px; width: 64%; border-radius: 999px; background: rgb(255 255 255 / 0.12); }
.aw-build__line--short { width: 38%; }
.aw-build__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.aw-build__cards i { height: 34px; border-radius: 7px; background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.05); }

/* ---- 2. credits: what a build costs now, against before ------------------------- */
.aw-bars { display: grid; gap: 16px; margin: 4px 0 0; }
.aw-bars__row { display: grid; gap: 7px; margin: 0; }
.aw-bars__row dt { display: flex; justify-content: space-between; gap: 10px; color: var(--aw-head); font-size: 14px; font-weight: 600; }
.aw-bars__row dt b { color: #ffc27a; font-weight: 600; font-variant-numeric: tabular-nums; }
.aw-bars__row dd { display: grid; gap: 5px; margin: 0; }
.aw-bar { position: relative; height: 9px; border-radius: 999px; background: rgb(255 255 255 / 0.05); }
.aw-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; transform-origin: left center; }
.aw-bar--now i { background: linear-gradient(90deg, #ff5e00, #ffb300); }
.aw-bar--was i { width: 100%; background: rgb(255 255 255 / 0.16); }
.aw-bar--w41 i { width: 41%; }
.aw-bar--w10 i { width: 10%; }
.aw-bars__was { color: var(--aw-mute); font-size: 12.5px; }
.aw-bars__was s { text-decoration-thickness: 1px; }

/* ---- 3. keys: providers, ready and coming ----------------------------------------- */
.aw-keys { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.aw-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.04);
  box-shadow: inset 0 0 0 1px var(--aw-line-2);
  color: var(--aw-head);
  font-size: 13.5px;
  font-weight: 560;
}
.aw-key__mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #f6efe6; }
.aw-key__mark--dark { background: #0c0a09; box-shadow: inset 0 0 0 1px var(--aw-line-2); }
.aw-key__mark img { display: block; width: 14px; height: 14px; object-fit: contain; }
.aw-key__state { margin-left: 2px; color: #a7f3c4; font-size: 11px; font-weight: 600; }
.aw-key__state::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--aw-live); vertical-align: 1px; }
.aw-key--soon { color: var(--aw-text); box-shadow: inset 0 0 0 1px var(--aw-line); }
.aw-key--soon .aw-key__mark { opacity: 0.7; }
.aw-key--soon .aw-key__state { color: var(--aw-mute); }
.aw-key--soon .aw-key__state::before { background: var(--aw-mute); }

/* ---- 4. publishing: preview to live, releases kept --------------------------------- */
.aw-pub { display: grid; gap: 12px; }
.aw-switch { display: flex; align-items: center; gap: 12px; color: var(--aw-mute); font-size: 13.5px; font-weight: 600; }
.aw-switch__track { position: relative; width: 52px; height: 30px; border-radius: 999px; background: rgb(74 222 128 / 0.22); box-shadow: inset 0 0 0 1px rgb(74 222 128 / 0.45); }
.aw-switch__knob { position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #f6efe6; box-shadow: 0 4px 10px -4px rgb(0 0 0 / 0.8); transform: translateX(22px); }
.aw-switch__live { color: #a7f3c4; }
.aw-url {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: #0c0a09;
  box-shadow: inset 0 0 0 1px var(--aw-line);
  color: var(--aw-head);
  font: 500 13px/1.3 'Commit Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.aw-url__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aw-live); box-shadow: 0 0 0 4px rgb(74 222 128 / 0.15); }
.aw-releases { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.aw-releases li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgb(255 255 255 / 0.03); box-shadow: inset 0 0 0 1px var(--aw-line); font-size: 12.5px; }
.aw-releases b { color: var(--aw-head); font-weight: 600; }
.aw-releases span { color: var(--aw-amber); }

/* ---- 5. Telegram: the bot's own words ------------------------------------------------ */
/* A flex column, newest at the bottom like a real chat: in the tall tile the conversation sits low, not floating. */
.aw-chat {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding: 14px;
  border-radius: 20px;
  background: #0d0f12;
  box-shadow: inset 0 0 0 1px var(--aw-line);
  font-size: 13.5px;
  line-height: 1.45;
}
.aw-chat__top { display: flex; align-items: center; gap: 10px; margin-bottom: auto; padding: 2px 2px 10px; border-bottom: 1px solid var(--aw-line); }
.aw-chat__avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #2aabee, #229ed9); color: #fff; }
.aw-chat__avatar svg { width: 16px; height: 16px; }
.aw-chat__who { display: grid; gap: 1px; color: var(--aw-head); font-size: 13.5px; font-weight: 600; }
.aw-chat__who span { color: var(--aw-mute); font-size: 11.5px; font-weight: 500; }
.aw-msg { align-self: flex-start; max-width: 88%; margin: 0; padding: 9px 12px; border-radius: 14px 14px 14px 4px; background: #1d2127; color: #e7e3dc; }
.aw-msg--me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: linear-gradient(135deg, #2b5278, #2a4a6b); color: #f2f6fa; }
.aw-msg__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aw-msg__actions span { padding: 6px 12px; border-radius: 9px; background: rgb(255 255 255 / 0.08); color: #8fcbff; font-size: 12.5px; font-weight: 600; }
.aw-msg__actions span:first-child { background: #2aabee; color: #06263b; }
.aw-msg--live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aw-msg--live .aw-msg__actions { flex-basis: 100%; margin-top: 2px; }
.aw-msg--live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--aw-live); box-shadow: 0 0 0 4px rgb(74 222 128 / 0.15); }

/* ---- also new -------------------------------------------------------------------------- */
.aw-also { margin-top: 16px; padding: 22px; border-radius: 24px; background: rgb(255 255 255 / 0.02); box-shadow: inset 0 0 0 1px var(--aw-line); }
.aw-also__title { margin: 0 0 14px; color: var(--aw-amber); font: 600 11px/1.3 'Commit Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.14em; text-transform: uppercase; }
.aw-also__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
/* Even rows: six items in threes, four or eight in fours. */
.aw-also__list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aw-also__list--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* An odd last item takes the whole row, so adding one never leaves a gap. */
.aw-also__list--3 > li:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.aw-also__list--4 > li:last-child:nth-child(4n + 1) { grid-column: 1 / -1; }
.aw-also__list li { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--aw-tile); box-shadow: inset 0 0 0 1px var(--aw-line); font-size: 13.5px; line-height: 1.5; }
.aw-also__list b { color: var(--aw-head); font-size: 14.5px; font-weight: 600; }
.aw-new__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* ---- motion (only after whats-new.js arms the section) ------------------------------------- */
.aw-new[data-armed] .aw-run__fill { transform: scaleX(0); transition: transform 2.4s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s; }
.aw-new[data-armed] .aw-run__step,
.aw-new[data-armed] .aw-build > *,
.aw-new[data-armed] .aw-key,
.aw-new[data-armed] .aw-msg { opacity: 0; transform: translateY(8px); transition: opacity 0.45s ease, transform 0.45s ease; }
.aw-new[data-armed] .aw-bar--now i { transform: scaleX(0); transition: transform 1.2s cubic-bezier(0.3, 0.6, 0.2, 1) 0.3s; }
.aw-new[data-armed] .aw-switch__knob { transform: translateX(0); transition: transform 0.5s cubic-bezier(0.3, 0.6, 0.2, 1) 0.9s; }
.aw-new[data-armed] .aw-switch__track { background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px var(--aw-line-2); transition: background 0.3s ease 1s, box-shadow 0.3s ease 1s; }
.aw-new[data-armed] .aw-url__dot { background: var(--aw-mute); box-shadow: none; transition: background 0.3s ease 1.2s, box-shadow 0.3s ease 1.2s; }

.aw-new[data-armed] .is-in .aw-run__fill,
.aw-new[data-armed] .is-in .aw-bar--now i { transform: scaleX(1); }
.aw-new[data-armed] .is-in .aw-run__step,
.aw-new[data-armed] .is-in .aw-build > *,
.aw-new[data-armed] .is-in .aw-key,
.aw-new[data-armed] .is-in .aw-msg { opacity: 1; transform: none; }
.aw-new[data-armed] .is-in .aw-switch__knob { transform: translateX(22px); }
.aw-new[data-armed] .is-in .aw-switch__track { background: rgb(74 222 128 / 0.22); box-shadow: inset 0 0 0 1px rgb(74 222 128 / 0.45); }
.aw-new[data-armed] .is-in .aw-url__dot { background: var(--aw-live); box-shadow: 0 0 0 4px rgb(74 222 128 / 0.15); }

.aw-new[data-armed] .is-in .aw-run__step:nth-child(2) { transition-delay: 1.1s; }
.aw-new[data-armed] .is-in .aw-run__step:nth-child(3) { transition-delay: 2.2s; }
.aw-new[data-armed] .is-in .aw-build > :nth-child(2) { transition-delay: 0.5s; }
.aw-new[data-armed] .is-in .aw-build > :nth-child(3) { transition-delay: 0.9s; }
.aw-new[data-armed] .is-in .aw-build > :nth-child(4) { transition-delay: 1.2s; }
.aw-new[data-armed] .is-in .aw-build > :nth-child(5) { transition-delay: 1.6s; }
.aw-new[data-armed] .is-in .aw-key:nth-child(2) { transition-delay: 0.08s; }
.aw-new[data-armed] .is-in .aw-key:nth-child(3) { transition-delay: 0.16s; }
.aw-new[data-armed] .is-in .aw-key:nth-child(4) { transition-delay: 0.3s; }
.aw-new[data-armed] .is-in .aw-key:nth-child(5) { transition-delay: 0.38s; }
.aw-new[data-armed] .is-in .aw-key:nth-child(6) { transition-delay: 0.46s; }
.aw-new[data-armed] .is-in .aw-key:nth-child(7) { transition-delay: 0.54s; }
.aw-new[data-armed] .is-in .aw-msg:nth-of-type(2) { transition-delay: 0.5s; }
.aw-new[data-armed] .is-in .aw-msg:nth-of-type(3) { transition-delay: 1.1s; }
.aw-new[data-armed] .is-in .aw-msg:nth-of-type(4) { transition-delay: 1.7s; }
.aw-new[data-armed] .is-in .aw-msg:nth-of-type(5) { transition-delay: 2.4s; }
.aw-new[data-armed] .is-in .aw-msg:nth-of-type(6) { transition-delay: 3s; }
.aw-new[data-armed] .is-in .aw-msg:nth-of-type(7) { transition-delay: 3.8s; }
.aw-new[data-armed] .is-in .aw-msg:nth-of-type(8) { transition-delay: 4.5s; }

@keyframes aw-pulse { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---- sizes ------------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .aw-new__grid,
  .aw-new--partner .aw-new__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "engine engine"
      "credits keys"
      "publish publish"
      "chat chat";
  }
  .aw-new--partner .aw-new__grid { grid-template-areas: "engine engine" "credits keys" "publish publish"; }
  .aw-also__list--3, .aw-also__list--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aw-also__list--3 > li:last-child:nth-child(3n + 1), .aw-also__list--4 > li:last-child:nth-child(4n + 1) { grid-column: auto; }
  .aw-also__list--3 > li:last-child:nth-child(odd), .aw-also__list--4 > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .aw-tile--chat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
}
@media (max-width: 720px) {
  .aw-new__grid,
  .aw-new--partner .aw-new__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .aw-new__grid > .aw-tile { grid-area: auto; }
  .aw-tile, .aw-also { padding: 20px; border-radius: 20px; }
  .aw-tile--split, .aw-tile--chat { display: flex; flex-direction: column; gap: 18px; }
  .aw-new__head { margin-bottom: 28px; }
  .aw-msg--intro { display: none; }
  .aw-also__list--3, .aw-also__list--4 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .aw-new__pulse::after { animation: none; }
}
