/* Audify — wholesale/retail, STIR/SHAKEN, shared code cards and feature lists */

/* ---------- Segmented control ---------- */

.seg {
  position: relative; display: inline-flex; max-width: 100%;
  padding: 5px; margin-bottom: 30px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.seg::before {
  content: ""; position: absolute; top: 5px; bottom: 5px; left: 0;
  width: var(--ind-w, 0); transform: translateX(var(--ind-x, 0)); border-radius: 999px;
  background: linear-gradient(180deg, #e2143d, var(--cherry-600));
  box-shadow: 0 6px 16px -4px rgba(210, 4, 45, 0.55);
  transition: transform 0.55s var(--ease), width 0.55s var(--ease);
}
.seg [role="tab"] { position: relative; padding: 10px 22px; border-radius: 999px; font-weight: 600; font-size: 0.98rem; white-space: nowrap; color: var(--text-2); transition: color 0.3s; }
.seg [role="tab"] span { margin-left: 6px; font-weight: 400; font-size: 0.86rem; opacity: 0.75; }
.seg [role="tab"][aria-selected="true"] { color: #fff; }
@media (max-width: 640px) { .seg [role="tab"] span { display: none; } }

/* ---------- Wholesale / retail ---------- */

.split__panel { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(24px, 4vw, 60px); align-items: start; }
[role="tabpanel"]:not([hidden]) { animation: panelIn 0.6s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }

.specs { display: grid; border-top: 1px solid var(--line-strong); }
.specs > div { display: grid; grid-template-columns: 148px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.specs dt { padding-top: 5px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--cherry-700); }
.specs dd { color: var(--text-2); }

@media (max-width: 900px) { .split__panel { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .specs > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Code cards + syntax tokens ---------- */

.codecard {
  margin: 0; overflow: hidden; border-radius: var(--radius);
  color: var(--on-dark-2);
  background: linear-gradient(180deg, #2c0b15, var(--ink));
  border: 1px solid rgba(255, 183, 197, 0.2);
  box-shadow: var(--shadow-lg);
}
.codecard figcaption, .codecard__bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-dark); font-family: var(--font-mono); font-size: 0.74rem; color: var(--on-dark-3); }
.codecard__dots { display: flex; gap: 6px; }
.codecard__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 183, 197, 0.22); }
.codecard__dots i:first-child { background: var(--cherry-500); }
.codecard pre { padding: 18px 20px 22px; font-size: 0.8rem; line-height: 1.75; overflow-x: auto; tab-size: 2; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }

.tok-c { color: var(--on-dark-3); font-style: italic; }
.tok-k { color: var(--cherry-400); }
.tok-p { color: var(--cherry-300); }
.tok-s { color: var(--on-dark); }
.tok-n { color: var(--cherry-400); }

/* ---------- STIR/SHAKEN: call flow ---------- */

.flow { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 44px; }
.flow::before {
  content: ""; position: absolute; top: 19px; left: 19px; width: calc(80% + 12.8px); height: 1px;
  background: linear-gradient(90deg, var(--cherry-500), var(--line-dark-strong));
}
.flow::after {
  content: ""; position: absolute; top: 14px; left: 19px; width: 64px; height: 11px; margin-left: -32px; border-radius: 11px;
  background: radial-gradient(closest-side, #fff, rgba(255, 125, 151, 0.75) 45%, transparent);
  animation: flowPulse 7.5s linear infinite;
}
.flow li { position: relative; display: grid; gap: 4px; justify-items: start; align-content: start; padding-right: 8px; }
.flow__dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 50%;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--cherry-300);
  background: var(--ink-2); border: 1px solid var(--line-dark-strong);
  animation: flowDot 7.5s linear infinite; animation-delay: calc(var(--i) * 1.5s);
}
.flow b { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.02em; }
.flow small { font-size: 0.88rem; line-height: 1.45; color: var(--on-dark-2); }
@keyframes flowPulse {
  0% { left: 19px; opacity: 0; }
  4% { opacity: 1; }
  80% { left: calc(80% + 31.8px); opacity: 1; }
  86%, 100% { left: calc(80% + 31.8px); opacity: 0; }
}
@keyframes flowDot {
  0%, 2% { background: var(--ink-2); color: var(--cherry-300); border-color: var(--line-dark-strong); box-shadow: 0 0 0 0 rgba(210, 4, 45, 0); }
  5%, 16% { background: var(--cherry-600); color: #fff; border-color: var(--cherry-300); box-shadow: 0 0 0 7px rgba(210, 4, 45, 0.22); }
  30%, 100% { background: var(--ink-2); color: var(--cherry-300); border-color: var(--line-dark-strong); box-shadow: 0 0 0 0 rgba(210, 4, 45, 0); }
}

@media (max-width: 820px) {
  .flow { grid-template-columns: 1fr; gap: 20px; }
  .flow::before { top: 19px; bottom: 30px; left: 19px; width: 1px; height: auto; background: linear-gradient(180deg, var(--cherry-500), var(--line-dark-strong)); }
  .flow::after { display: none; }
  .flow li { grid-template-columns: 38px 1fr; column-gap: 16px; }
  .flow__dot { grid-row: span 2; margin: 0; }
}

/* ---------- STIR/SHAKEN: attestation explorer ---------- */

.attest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr) 250px; gap: 22px; align-items: stretch; margin-bottom: 60px; }
.attest__levels { display: grid; gap: 10px; align-content: start; }

.level {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 18px; text-align: left;
  background: rgba(255, 183, 197, 0.04); border: 1px solid var(--line-dark);
  transition: background-color 0.35s, border-color 0.35s, box-shadow 0.35s, transform 0.5s var(--ease);
}
.level:hover { background: rgba(255, 183, 197, 0.08); border-color: var(--line-dark-strong); }
.level[aria-checked="true"] { border-color: var(--cherry-400); background: linear-gradient(135deg, rgba(210, 4, 45, 0.38), rgba(210, 4, 45, 0.08)); box-shadow: 0 18px 38px -20px rgba(210, 4, 45, 0.9); }
.level__badge {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  font-size: 1.15rem; font-weight: 700; color: var(--cherry-300);
  background: rgba(255, 183, 197, 0.1); border: 1px solid var(--line-dark-strong);
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.level[aria-checked="true"] .level__badge { background: #fff; border-color: #fff; color: var(--cherry-600); }
.level__text b { display: block; font-weight: 600; letter-spacing: -0.02em; }
.level__text small { display: block; margin-top: 2px; font-size: 0.88rem; line-height: 1.45; color: var(--on-dark-2); }
.attest__note { margin-top: 6px; padding: 14px 16px; border-radius: 0 14px 14px 0; border-left: 2px solid var(--cherry-400); background: rgba(255, 183, 197, 0.05); font-size: 0.92rem; color: var(--on-dark-2); }

.passport { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: rgba(26, 7, 12, 0.66); border: 1px solid var(--line-dark-strong); box-shadow: 0 34px 60px -34px #000; }
.passport__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-dark); font-family: var(--font-mono); font-size: 0.74rem; color: var(--on-dark-3); }
.passport__jwt { padding: 14px 16px; border-bottom: 1px solid var(--line-dark); font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.6; word-break: break-all; }
.passport__jwt i { font-style: normal; color: var(--on-dark-3); }
.j-h { color: var(--cherry-300); }
.j-p { color: #fff; }
.j-s { color: var(--cherry-500); }
.passport__decoded { flex: 1; display: grid; align-content: start; gap: 12px; padding: 14px 16px; }
.passport__decoded pre { padding: 10px 14px; border-left: 2px solid currentColor; border-radius: 0 10px 10px 0; background: rgba(255, 183, 197, 0.05); font-size: 0.77rem; line-height: 1.65; overflow-x: auto; }
.passport__decoded code { color: var(--on-dark-2); }
.passport__decoded pre.is-flash { animation: flash 0.9s var(--ease); }
@keyframes flash { 0% { background: rgba(210, 4, 45, 0.5); } 100% { background: rgba(255, 183, 197, 0.05); } }
.passport__foot { display: grid; grid-template-columns: auto 1fr; margin: 0; border-top: 1px solid var(--line-dark); }
.passport__foot > div { padding: 12px 16px; }
.passport__foot > div + div { border-left: 1px solid var(--line-dark); }
.passport__foot dt { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-dark-3); }
.passport__foot dd { font-family: var(--font-mono); font-size: 0.84rem; color: var(--cherry-300); }

.handset { justify-self: center; width: 250px; padding: 9px; border-radius: 44px; background: linear-gradient(160deg, #4d1b28, #12050a); box-shadow: inset 0 0 0 1.5px rgba(255, 183, 197, 0.3), 0 44px 80px -34px #000; }
.handset__screen {
  position: relative; display: flex; flex-direction: column; align-items: center; overflow: hidden;
  height: 100%; min-height: 440px; padding: 58px 18px 26px; border-radius: 36px; text-align: center;
  background: radial-gradient(130% 62% at 50% 0%, var(--cherry-600), transparent 72%), linear-gradient(180deg, #3a0c18, #14060a);
  transition: filter 0.5s;
}
.handset:not([data-level="A"]) .handset__screen { filter: saturate(0.45); }
.handset__island { position: absolute; top: 12px; left: 50%; width: 76px; height: 22px; margin-left: -38px; border-radius: 12px; background: #000; }
.handset__label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.handset__name { margin-top: 10px; font-size: 1.55rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; color: #fff; }
.handset__num { margin-top: 5px; font-family: var(--font-mono); font-size: 0.78rem; color: rgba(255, 255, 255, 0.76); }
.handset__badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 6px 12px 6px 7px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: #fff; color: var(--cherry-700); }
.handset__badge .icon { width: 17px; height: 17px; padding: 3.5px; border-radius: 50%; background: var(--cherry-600); color: #fff; stroke-width: 3.6; }
.handset:not([data-level="A"]) .handset__badge { padding-left: 12px; background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.9); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.handset:not([data-level="A"]) .handset__badge .icon { display: none; }
.handset__actions { display: flex; justify-content: space-between; width: 100%; margin-top: auto; padding: 0 12px; }
.handset__btn { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font-size: 1.3rem; color: #fff; }
.handset__btn--no { background: rgba(255, 255, 255, 0.16); }
.handset__btn--no .icon { transform: rotate(135deg); }
.handset__btn--yes { position: relative; background: var(--ok); }
.handset__btn--yes::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--ok); animation: ring 2s ease-out infinite; }

@media (max-width: 1080px) {
  .attest { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .handset { grid-column: 1 / -1; }
}
@media (max-width: 760px) { .attest { grid-template-columns: 1fr; } }

/* ---------- Feature lists ---------- */

.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; }
.feats li { display: grid; gap: 8px; align-content: start; padding: 26px 0 30px; border-top: 1px solid var(--line-strong); }
.feats .icon { font-size: 1.4rem; color: var(--cherry-600); margin-bottom: 6px; }
.feats h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }
.feats p { font-size: 0.96rem; color: var(--text-2); }
.feats--dark li { border-top-color: var(--line-dark-strong); }
.feats--dark .icon { color: var(--cherry-300); }
.feats--dark p { color: var(--on-dark-2); }
@media (max-width: 900px) { .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feats { grid-template-columns: 1fr; } }
