/*
 * wiklik.ai — launch pages (index.html, students.html, 404.html) on top of /m360m/home.css. Colours: theme.css and
 * the .st block (Wiklik for Students). Owner 2026-10-18/19: white, tech, clean; the hero is the REAL webapp running on
 * recorded turns (sites/wiklik-demo, built into /wiklik/app/, loaded in an iframe when the frame is in view or on the
 * first tap; demo.js) inside a PHONE (390 x 844 CSS px) or a LAPTOP (1440 x 900) frame, at the device's own logical
 * viewport, scaled — never reflowed. First paint = a static poster of the real UI. Mobile-first: on a phone the frame
 * bleeds to the page edge and the app is (almost) 1:1.
 */
/* No height: 100% on html / body (owner 2026-10-25, "the header goes to the bottom of the screen"): a body exactly one
   window tall is the containing block of the sticky .wk-top, so the header stopped sticking ~one screen down and slid
   away while the long page scrolled on. The body grows with the page; min-height below keeps the short pages (404) full. */
.wk { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); }
.skip { left: 8px; transform: translateY(-300%); }
.skip:focus { transform: none; }

/* ---------------------------------------------------------------- top bar */
.wk-top { display: flex; align-items: center; gap: 8px; height: 60px; }
/* Logo = the W mark "Wi" (sites/wiklik/brand, docs_ativos/WIKLIK_DESIGN_SYSTEM.md §1): never a box, never "Wiklik Chat". */
.brand { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.04em; gap: 8px; align-items: center; direction: ltr; color: var(--ink); }
.brand img.brand-mark { height: 26px; width: auto; }
.brand-foot { font-size: 16px; gap: 6px; margin-bottom: 2px; }
.brand-foot img.brand-mark { height: 20px; }
.wk-top-r { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
.wk-signin {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); background: var(--bg);
}
.wk-signin:hover { background: var(--bg-soft); }

/* ---------------------------------------------------------------- hero: copy (a, b) + the device */
.wk-main { padding-top: 8px; padding-bottom: 28px; }
.wk-hero { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "demo" "b"; }
.wk-a { grid-area: a; }
.wk-demo { grid-area: demo; }
.wk-b { grid-area: b; display: grid; gap: 14px; align-content: start; }
.wk-a, .wk-b { min-width: 0; }
@media (min-width: 1000px) {
  .wk-hero { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a demo" "b demo"; column-gap: 56px; row-gap: 18px; align-items: start; }
  .wk-main { padding-top: 20px; }
}
.wk-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: var(--ink); background: var(--accent-soft); font-family: var(--mono); letter-spacing: -0.01em;
}
.wk-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: wk-pulse 2.4s ease-out infinite; }
@keyframes wk-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.wk-product { margin-top: 12px; font-weight: 800; font-size: 15px; color: var(--accent); }
.wk-a h1 { margin: 12px 0 0; font-size: clamp(34px, 8.8vw, 54px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 800; text-wrap: balance; }
.wk-product + h1 { margin-top: 4px; }
.wk-lead { margin: 12px 0 0; font-size: 16px; color: var(--ink-2); text-wrap: pretty; }
.wk-ctas { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.wk-cta { min-height: 52px; padding: 0 28px; font-size: 16px; font-weight: 700; box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--ink) 60%, transparent); }
@media (max-width: 480px) { .wk-cta { flex: 1 1 100%; } }
.wk-alt { display: inline-flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink-2); font-size: 13px; min-height: 44px; justify-content: center; }
.wk-alt strong { color: var(--ink); font-size: 15px; }
.wk-alt strong::after, .wk-alt-plain::after { content: " \2192"; }
[dir="rtl"] .wk-alt strong::after, [dir="rtl"] .wk-alt-plain::after { content: " \2190"; }
.wk-alt-plain { font-weight: 700; color: var(--ink); font-size: 15px; }
/* two price cards side by side (owner 2026-10-25): "Para você" (PF) and "Para sua empresa" (PME); mobile-first, never wrapping into a column */
.wk-price { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; max-width: 460px; font-size: 14px; color: var(--ink-2); }
.wk-plan { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line, color-mix(in srgb, var(--ink) 14%, transparent)); border-radius: 14px; background: var(--bg); text-align: start; }
.wk-plan-t { font-size: 13px; font-weight: 700; color: var(--ink); }
.wk-plan-p { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.wk-plan-p > span:first-child { font-weight: 800; color: var(--ink); }
.wk-price .strike { color: var(--ink-2); }
.wk-does { font-size: 15px; color: var(--ink-2); text-wrap: pretty; }
.wk-ai { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-soft); display: grid; gap: 4px; }
.wk-ai strong { font-size: 16px; letter-spacing: -0.01em; }
.wk-ai p { font-size: 14px; color: var(--ink-2); }
.wk-logos { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.wk-logos li { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 13px; font-weight: 600; color: var(--ink); }
.wk-logos img { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; }
.wk-logos .wk-logo-self img { border-radius: 0; }
.wk-channels { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wk-channels li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink); }
.wk-channels img, .wk-channels svg { flex: 0 0 auto; color: var(--ink-2); }
.wk-note { font-size: 13px; color: var(--ink-2); text-wrap: pretty; }

/* goal block (hidden until the page carries data; see wiklik.js) */
.wk-goal { max-width: 420px; display: grid; gap: 8px; }
.wk-goal-head { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); }
.wk-goal-head strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.wk-goal-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.wk-goal-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* ---------------------------------------------------------------- the device: toggle + phone / laptop
   The REAL app runs in #wkStage at the device's logical viewport (phone: 54 px status bar + 390 x 766 app + 24 px home
   indicator = 390 x 844, iPhone 19.5:9; laptop 1440 x 900) and the stage is scaled to the screen box (demo.js fit()), never reflowed.
   Mobile-first: on a phone the frame bleeds to the page edge and the app is (almost) 1:1. */
.wk-demo { display: grid; gap: 10px; justify-items: center; }
.wk-view { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
.wk-view button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.wk-view button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 16%, transparent); }
.wk-device {
  position: relative; box-sizing: border-box; width: 100%; background: var(--phone); overflow: hidden;
  box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--ink) 45%, transparent), 0 2px 6px color-mix(in srgb, var(--ink) 6%, transparent);
}
.wk-device.phone { max-width: 412px; padding: 11px; border-radius: 52px; }
.wk-device.phone .wk-screen { border-radius: 42px; aspect-ratio: 390 / 844; }
.wk-device.web { max-width: 780px; padding: 12px 12px 18px; border-radius: 18px; background: #1c1d21; }
.wk-device.web .wk-screen { border-radius: 8px; aspect-ratio: 1440 / 900; }
.wk-device.web::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 80px; height: 5px; border-radius: 3px; transform: translateX(-50%); background: #3a3b40; }
@media (max-width: 480px) {
  /* a phone drawn on a phone: about three quarters of the screen width, never edge to edge (owner 2026-10-19) */
  .wk-device.phone { max-width: 290px; padding: 8px; border-radius: 40px; }
  .wk-device.phone .wk-screen { border-radius: 33px; }
}
@media (min-width: 1000px) { .wk-device.phone { width: 340px; padding: 9px; border-radius: 46px; } .wk-device.phone .wk-screen { border-radius: 38px; } .wk-device.web { width: min(780px, 52vw); } }
.wk-ex { font-size: 12px; font-weight: 600; color: var(--ink-2); } /* the frame shows an illustrative example */
.wk-screen { position: relative; width: 100%; overflow: hidden; background: #fff; font-size: 14px; }
/* iOS status bar (the phone's safe-area-inset-top): time left, dynamic island, signal / wifi / battery right */
.wk-statusbar {
  position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: calc(54px * var(--wk-scale, 1)); display: flex; align-items: center;
  justify-content: space-between; padding: 0 calc(28px * var(--wk-scale, 1)); color: #0a0b0d; pointer-events: none;
  font: 600 calc(16px * var(--wk-scale, 1))/1 -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif; letter-spacing: -0.02em;
}
.wk-island { position: absolute; left: 50%; top: calc(11px * var(--wk-scale, 1)); width: calc(120px * var(--wk-scale, 1)); height: calc(36px * var(--wk-scale, 1)); border-radius: 999px; background: #000; transform: translateX(-50%); }
.wk-status-icons { display: inline-flex; gap: calc(6px * var(--wk-scale, 1)); align-items: center; }
.wk-status-icons i { display: inline-block; height: calc(12px * var(--wk-scale, 1)); background: currentColor; }
.wk-ic-signal { width: calc(18px * var(--wk-scale, 1)); clip-path: polygon(0 70%, 15% 70%, 15% 100%, 0 100%, 28% 50%, 43% 50%, 43% 100%, 28% 100%, 56% 30%, 71% 30%, 71% 100%, 56% 100%, 84% 0, 100% 0, 100% 100%, 84% 100%); }
.wk-ic-wifi { width: calc(16px * var(--wk-scale, 1)); clip-path: polygon(50% 100%, 0 35%, 15% 20%, 50% 60%, 85% 20%, 100% 35%); }
.wk-ic-battery { width: calc(26px * var(--wk-scale, 1)); border-radius: 3px; opacity: .95; }
.wk-device.web .wk-statusbar { display: none; }
.wk-stage { position: absolute; left: 0; top: calc(54px * var(--wk-scale, 1)); transform-origin: 0 0; background: #fff; }
.wk-device.web .wk-stage { top: 0; }
/* the home indicator strip under the app (the dock sits above it, as on an iPhone) */
.wk-homebar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: calc(24px * var(--wk-scale, 1)); background: #fff; pointer-events: none; }
.wk-homebar::after { content: ""; position: absolute; left: 50%; bottom: calc(7px * var(--wk-scale, 1)); width: calc(134px * var(--wk-scale, 1)); height: calc(5px * var(--wk-scale, 1)); border-radius: 999px; background: #0a0b0d; transform: translateX(-50%); }
.wk-device.web .wk-homebar { display: none; }

/* first paint: a static poster of the real UI; the tap (or the frame coming into view) loads the real app (/wiklik/app/) */
.wk-poster { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--bg-soft); cursor: pointer; }
.wk-poster img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.wk-play {
  position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); display: inline-flex; gap: 8px; align-items: center;
  min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font: inherit; font-size: 14px;
  font-weight: 700; white-space: nowrap; box-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 35%, transparent);
}
.wk-device.web .wk-play { bottom: 40px; font-size: 20px; min-height: 60px; padding: 0 26px; }
.wk-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg); opacity: 0; transition: opacity .3s; }
.is-live .wk-frame { opacity: 1; }
.is-live .wk-poster { visibility: hidden; }
.is-loading:not(.is-live) .wk-play::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: wk-spin .8s linear infinite; }
@keyframes wk-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- footer */
.wk-foot { padding-top: 14px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 6px; justify-items: center; text-align: center; border-top: 1px solid var(--line); }
.wk-foot .small { font-size: 12px; color: var(--ink-2); }
.wk-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; font-size: 13px; color: var(--ink-2); }
.wk-foot-links a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.wk-foot-links a:hover { color: var(--ink); text-decoration: underline; }
.wk-foot-links .foot-prefs { font-size: 13px; }

/* 404 */
.wk-404 { margin-top: 28px; font-size: clamp(64px, 16vw, 112px); font-weight: 900; letter-spacing: -0.05em; line-height: 1; color: var(--accent); }

/* Wiklik for Students: the same palette P1 Esmeralda as the home (owner 2026-10-19: P1 everywhere, no purple) — theme.css. */

@media (prefers-reduced-motion: reduce) {
  .wk-pulse, .is-loading:not(.is-live) .wk-play::after { animation: none !important; }
  .wk-frame { transition: none; }
}

/* A browser with a session (<html data-member>, wk_head.html): the signup CTAs keep their box but hide their label until
   signup-waitlist.js writes "Abrir o Wiklik" (data-member-ready), so the label never flashes "Entrar na fila"; the
   sign-in links would repeat the same action. */
html[data-member]:not([data-member-ready]) a[href="/signup"]:not([data-m360m-person="company"]),
html[data-member]:not([data-member-ready]) a[data-m360m-signup="1"]:not([data-m360m-person="company"]) { color: transparent; }
html[data-member] a[data-track^="cta_signin"] { display: none !important; }
