/* The Visibility product page (/ai-visibility; server/visibility-page.js). Builds on the iPhone
   page's panels, buttons and closing (app.css) in the homepage's type and palette. KNWN's own
   screens sit in soft frames; the parts drawn in HTML use the same hairline look. */

/* Hero: the promise and the trial, then the Overview in a browser with the AI models beside it. */
.vis-hero { padding-bottom: clamp(24px, 4vw, 40px); }
.vis-hero-copy { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px clamp(28px, 5vw, 72px); align-items: end; }
.vis-hero h1 { margin-top: 12px; font: 580 clamp(42px, 5.4vw, 68px)/1.04 var(--heading); letter-spacing: -.05em; }
.vis-hero .resource-intro { margin-top: 0; }
.vis-hero .app-actions { margin-top: 24px; }
.vis-cta { min-height: 52px; padding-inline: 20px; font-size: 15px; font-weight: 550; }

.vis-stage { position: relative; margin-top: clamp(32px, 5vw, 56px); padding: 0 clamp(0px, 7vw, 96px) 0 0; }
.vis-stage::before { content: ''; position: absolute; inset: 8% 0 -6% 18%; border-radius: 50%; background: radial-gradient(closest-side, #b5a1f37a, #b5a1f300); }
[dir='rtl'] .vis-stage { padding: 0 0 0 clamp(0px, 7vw, 96px); }
[dir='rtl'] .vis-stage::before { inset: 8% 18% -6% 0; }
.vis-stage .kui--window { box-shadow: 0 0 0 .5px #19191b24, 0 40px 80px -36px #3a2a7a66, 0 16px 32px -20px #19191b40; }
.vis-float { position: absolute; z-index: 2; bottom: -6%; inset-inline-end: 0; width: clamp(240px, 30%, 330px); }
.vis-float .kui { box-shadow: var(--pop); }
.vis-caption { margin-top: clamp(36px, 5vw, 52px); color: var(--muted); font-size: 13px; text-align: center; }

/* How it works: four steps in a row, joined by a line. */
.vis-how h2 { margin-top: 12px; }
.vis-lead { margin-top: 12px; color: #48454e; font-size: 16px; }
.vis-steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 32px 0 0; padding: 0; list-style: none; }
.vis-steps::before { content: ''; position: absolute; top: 27px; right: 12%; left: 12%; height: 1px; background: repeating-linear-gradient(90deg, #b5a1f3 0 6px, #0000 6px 12px); }
.vis-steps li { position: relative; display: grid; align-content: start; justify-items: center; gap: 10px; padding: 0 8px; text-align: center; }
.vis-step-icon { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 18px; background: var(--surface); color: var(--accent); box-shadow: var(--card); }
.vis-step-icon svg { width: 24px; height: 24px; }
.vis-steps small { color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.vis-steps p { max-width: 220px; font-size: 15px; font-weight: 600; line-height: 1.45; }

/* Section heads with their link on the right. */
.vis-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 28px; }
.vis-head h2 { font: 580 clamp(30px, 3.6vw, 44px)/1.1 var(--heading); letter-spacing: -.035em; }
.vis-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }

/* What you see: a grid of tiles, each figure above the screen that shows it, cut by the tile. */
.vis-see, .vis-tools { margin-top: clamp(48px, 7vw, 88px); }
.vis-bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.vis-tile { display: flex; min-width: 0; flex-direction: column; padding: 26px 26px 0; overflow: hidden; border-radius: 24px; background: var(--surface); box-shadow: var(--card); }
.vis-tile h3 { display: flex; align-items: center; gap: 10px; font: 580 21px/1.3 var(--heading); letter-spacing: -.015em; }
.vis-tile h3 svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.vis-tile > p { margin-top: 8px; color: #5b5560; font-size: 14px; line-height: 1.7; }
/* The screens are left-to-right in every language, so their crops keep their left edge. */
.vis-shot { direction: ltr; position: relative; margin-top: 22px; overflow: hidden; border-radius: 14px 14px 0 0; background: #f1f3f6; box-shadow: 0 0 0 .5px #19191b1a, 0 10px 30px -18px #19191b40; }
.vis-shot .kui { width: 100%; max-width: none; border-radius: 0; }
.vis-bento .vis-shot { margin-top: auto; }
.vis-bento .vis-tile > p { margin-bottom: 22px; }
/* Each screen is cut to the same height, showing the part that tells its story. */
.vis-bento .vis-shot { height: 276px; }
.vis-shot--chart .kui { width: 150%; }
.vis-shot--sources .kui { width: 150%; }
.vis-shot--answer .kui { width: 125%; }

/* A real change against noise. */
.vis-noise { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.vis-noise h2 { color: #fff; }
.vis-noise h2, .vis-head h2 { hyphens: auto; overflow-wrap: break-word; }
.vis-noise-copy p { margin-top: 16px; color: #ffffffc7; font-size: 15px; line-height: 1.8; }
.vis-noise-copy .vis-quiet { color: #ffffff8c; font-size: 14px; }
.vis-ranges { display: grid; gap: 14px; padding: 22px; border-radius: 20px; background: #ffffff0d; box-shadow: inset 0 0 0 1px #ffffff1a; }
.vis-range-row + .vis-range-row { padding-top: 14px; border-top: 1px solid #ffffff17; }
.vis-range-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.vis-range-head strong { font-weight: 600; }
.vis-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: #b5a1f333; color: #d9cffb; font-size: 12px; font-weight: 650; white-space: nowrap; }
.vis-badge--flat { background: #ffffff1a; color: #ffffffb3; }
.vis-up { width: 11px; height: 11px; flex: none; }
.vis-track { position: relative; height: 36px; margin-top: 12px; border-radius: 10px; background: linear-gradient(90deg, #ffffff14 1px, #0000 1px) 0 0 / 10% 100%, #ffffff08; }
.vis-range { position: absolute; top: 9px; left: var(--from); width: calc(var(--to) - var(--from)); height: 18px; border-radius: 99px; }
[dir='rtl'] .vis-range { right: var(--from); left: auto; }
.vis-range::after { content: ''; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); }
.vis-range--before { background: #ffffff38; }
.vis-range--after { background: var(--accent); box-shadow: 0 0 0 1px #b5a1f3; }
.vis-legend { display: flex; justify-content: space-between; margin-top: 8px; color: #ffffff99; font-size: 12px; }
.vis-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; }
.vis-stats p { padding: 18px 20px; border-radius: 18px; background: #ffffff0d; box-shadow: inset 0 0 0 1px #ffffff1a; }
.vis-stats strong { display: block; font: 600 34px/1 var(--heading); letter-spacing: -.03em; color: #fff; }
.vis-stats span { display: block; margin-top: 8px; color: #ffffffa6; font-size: 13px; line-height: 1.5; }

/* Go deeper and your own tools: three tiles, the picture first. */
.vis-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.vis-deeper .vis-tile { padding: 0 0 24px; background: #fff; }
.vis-deeper .vis-tile > :not(.vis-shot):not(.vis-pdf) { margin-inline: 24px; }
.vis-deeper .vis-tile h3 { margin-top: 20px; }
.vis-deeper .vis-shot, .vis-pdf { height: 250px; margin: 0; border-radius: 0; box-shadow: none; }
.vis-deeper .vis-shot { display: flex; align-items: flex-start; justify-content: center; padding: 22px 22px 0; background: #f3f2f6; box-shadow: inset 0 -1px #19191b0f; }
.vis-deeper .vis-shot .kui { flex: none; border-radius: 12px 12px 0 0; box-shadow: 0 0 0 .5px #19191b1f, 0 10px 24px -14px #19191b4d; }
.vis-deeper .vis-shot--briefs { justify-content: flex-start; }
.vis-shot--briefs .kui { width: 210%; }

.vis-pdf { display: flex; justify-content: center; padding: 22px 22px 0; overflow: hidden; background: #f3f2f6; box-shadow: inset 0 -1px #19191b0f; }
.vis-pdf-page { width: 230px; padding: 18px 18px 0; border-radius: 6px 6px 0 0; background: #fff; box-shadow: 0 0 0 .5px #19191b1f, 0 14px 30px -14px #19191b59; transform: rotate(-2deg) translateY(6px); }
.vis-pdf p { margin: 0; }
.vis-pdf-brand { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.vis-mark { width: 1.2em; height: 1.2em; flex: none; color: var(--accent); }
.vis-pdf-title { margin-top: 12px !important; font: 600 15px/1.25 var(--heading); }
.vis-pdf-sub { margin-top: 3px !important; color: var(--muted); font-size: 9.5px; }
.vis-pdf-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.vis-pdf-metrics p { padding: 8px; border-radius: 6px; background: var(--lavender-soft); }
.vis-pdf-metrics small { display: block; overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.vis-pdf-metrics strong { font: 650 17px/1.2 var(--body); }
.vis-pdf-bars { display: grid; gap: 6px; margin-top: 12px; }
.vis-pdf-bars p { display: grid; grid-template-columns: 74px minmax(0, 1fr) 34px; align-items: center; gap: 6px; font-size: 8.5px; }
.vis-pdf-bars span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vis-pdf-bars span:last-child { text-align: end; font-variant-numeric: tabular-nums; }
.vis-pdf-bars i { position: relative; height: 5px; overflow: hidden; border-radius: 99px; background: #efedf3; }
.vis-pdf-bars b { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: #c4c1cc; }
[dir='rtl'] .vis-pdf-bars b { inset: 0 0 0 auto; }
.vis-pdf-bars .is-you { font-weight: 700; }
.vis-pdf-bars .is-you b { background: var(--accent); }

.vis-tile--tool { padding: 0 0 24px; }
.vis-tile--tool > :not(.vis-tool-art) { margin-inline: 24px; }
.vis-tile--tool h3 { margin-top: 20px; }
.vis-tool-art { display: flex; height: 230px; align-items: center; justify-content: center; padding: 20px; overflow: hidden; background: var(--lavender-soft); }
.vis-convo { display: grid; width: 100%; max-width: 300px; gap: 8px; font-size: 12.5px; line-height: 1.45; }
.vis-convo p { margin: 0; }
.vis-convo-ask { justify-self: end; max-width: 85%; padding: 9px 12px; border-radius: 16px 16px 4px 16px; background: var(--ink); color: #fff; }
[dir='rtl'] .vis-convo-ask { border-radius: 16px 16px 16px 4px; }
.vis-convo-tool { display: inline-flex; justify-self: start; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 99px; background: #fff; color: var(--muted); font-size: 11px; box-shadow: var(--card); }
.vis-convo-tool code { font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent-dark); }
.vis-convo-reply { max-width: 92%; padding: 10px 12px; border-radius: 16px 16px 16px 4px; background: #fff; box-shadow: var(--card); }
[dir='rtl'] .vis-convo-reply { border-radius: 16px 16px 4px 16px; }
.vis-code { width: 100%; max-width: 320px; margin: 0; padding: 14px 16px; overflow: hidden; border-radius: 14px; background: #19191b; color: #e9e6f2; font: 10.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; direction: ltr; text-align: left; box-shadow: 0 14px 30px -16px #19191b80; }
.vis-code-dim { color: #8d8a96; }
.vis-code-key { color: #c9bcf7; }
.vis-tool-art:has(.vis-phone) { align-items: flex-start; padding-bottom: 0; }
.vis-phone { display: flex; justify-content: center; height: 100%; overflow: hidden; }
.vis-phone .app-lock { flex: none; zoom: .5; }

/* The closing panel holds the trial and the free check. */
.vis-closing .app-closing-copy { max-width: 640px; }
.vis-closing .app-actions { margin-top: 22px; }

/* Arriving: the browser and the models as the page opens; the ranges as they scroll in. */
@media (prefers-reduced-motion: no-preference) {
  .vis-browser { animation: vis-rise 900ms var(--ease-out) both; }
  .vis-float { animation: vis-rise 900ms var(--ease-out) 380ms both; }
  [data-reveal='shown'] .vis-range--after { animation: vis-slide 1200ms var(--ease-out) 300ms both; }
}
@keyframes vis-rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes vis-slide { from { left: var(--from); opacity: 0; } }

@media (max-width: 1020px) {
  .vis-hero-copy { grid-template-columns: minmax(0, 1fr); }
  .vis-stage, [dir='rtl'] .vis-stage { padding: 0; }
  .vis-float { position: relative; bottom: auto; inset-inline-end: auto; width: min(360px, 86%); margin: -64px 0 0 auto; }
  [dir='rtl'] .vis-float { margin: -64px auto 0 0; }
  .vis-caption { margin-top: 20px; }
  .vis-noise { grid-template-columns: minmax(0, 1fr); }
  .vis-trio { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin-inline: auto; }
  .vis-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .vis-steps::before { display: none; }
}
@media (max-width: 620px) {
  .vis-bento { grid-template-columns: minmax(0, 1fr); }
  .vis-tile { padding: 22px 20px 0; }
  .vis-stage .kui--window { border-radius: 12px; }
  .vis-float, [dir='rtl'] .vis-float { width: 76%; margin-top: -20px; }
  .vis-bento .vis-shot { height: auto; max-height: 260px; }
  .vis-shot--chart .kui { width: 170%; }
  .vis-shot--sources .kui { width: 200%; }
  .vis-shot--answer .kui { width: 170%; }
  .vis-steps { grid-template-columns: minmax(0, 1fr); }
  .vis-steps li { grid-template-columns: 56px minmax(0, 1fr); justify-items: start; align-items: center; text-align: start; column-gap: 14px; row-gap: 0; }
  .vis-steps li small { grid-row: 1; grid-column: 2; align-self: end; }
  .vis-steps li .vis-step-icon { grid-row: 1 / span 2; }
  .vis-steps li p { grid-column: 2; }
  .vis-stats { grid-template-columns: minmax(0, 1fr); }
  .vis-code { font-size: 9.5px; padding: 12px 14px; }
}

.vis-phone .app-lock { align-self: flex-start; }

/* The ways in each link to where you set them up: the MCP server's address, the guides, the App Store. */
.vis-tile--tool { display: flex; flex-direction: column; }
.vis-tool-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: auto 24px 0; padding-top: 18px; }
.vis-address { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--lavender-soft); color: var(--accent-dark); font: 600 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; }
.vis-address:hover { background: #e7e0f8; }
