/* KaiWire landing. Site base (/styles.css) + KaiTheme (/assets/kaitheme.css), with the
   app's own safety yellow (#ffc400, from the app icon) as the accent. Scoped to .kw-page. */

body.kw-page {
  --kw-yellow: #ffc400;
  --kw-yellow-ink: #1a1400;
  --kw-paper: #f4efe6;
  --kw-card: #ffffff08;
  --kw-line: #ffffff1a;
  background:
    radial-gradient(1100px 680px at 85% -12%, #ffc40024 0, transparent 55%),
    radial-gradient(900px 600px at 4% 4%, #0a7afa22 0, transparent 52%),
    var(--bg);
  background-attachment: fixed;
}

.kw-page main { padding-bottom: 32px; }
.kw-page h1, .kw-page h2, .kw-page h3 { text-wrap: balance; }
.kw-page section { scroll-margin-top: 24px; }

/* ---------- Hero ---------- */
.kw-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 48px;
  align-items: center;
  padding: 56px 0 64px;
}
.kw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kw-yellow);
}
.kw-eyebrow img { border-radius: 10px; }
.kw-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.02em;
}
.kw-mark { color: var(--kw-yellow); white-space: nowrap; }
.kw-lead { margin: 0 0 28px; max-width: 34em; font-size: 1.15rem; line-height: 1.6; color: #d4dbe8; }
.kw-platforms { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* Store buttons. The script adds .is-yours to the one for the visitor's device. */
.kw-stores { display: flex; flex-wrap: wrap; gap: 12px; }
.kw-stores--center { justify-content: center; }
.kw-store {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 22px 10px 18px;
  border: 1px solid #ffffff40;
  border-radius: 14px;
  background: #0b0f17;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.kw-store:hover, .kw-store:focus-visible { border-color: var(--kw-yellow); color: var(--text); }
.kw-store:focus-visible { outline: 3px solid var(--kw-yellow); outline-offset: 3px; }
.kw-store-text { display: flex; flex-direction: column; font-size: 19px; font-weight: 700; line-height: 1.1; }
.kw-store-text small { font-size: 12px; font-weight: 500; opacity: .85; }
.kw-store.is-yours {
  background: var(--kw-yellow);
  border-color: var(--kw-yellow);
  color: var(--kw-yellow-ink);
  box-shadow: 0 8px 28px #ffc40040;
}
.kw-store.is-yours:hover, .kw-store.is-yours:focus-visible { color: var(--kw-yellow-ink); filter: brightness(1.05); }
.kw-yours {
  position: absolute;
  top: -11px;
  left: 14px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #06080d;
  color: var(--kw-yellow);
  border: 1px solid var(--kw-yellow);
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .04em;
  white-space: nowrap;
}
.kw-stores:has(.is-yours) { padding-top: 8px; }

.kw-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.kw-facts li {
  padding: 6px 12px;
  border: 1px solid var(--kw-line);
  border-radius: 999px;
  background: var(--kw-card);
  font-size: 14px;
  color: #d4dbe8;
}

/* Phone frames: 9:19.5, the screenshot fills the screen. */
.kw-hero-visual { position: relative; display: flex; justify-content: center; min-height: 520px; }
.kw-phone {
  margin: 0;
  width: min(300px, 70%);
  aspect-ratio: 9 / 19.5;
  padding: 10px;
  border-radius: 13% / 6%;
  background: #11151d;
  border: 1px solid #ffffff22;
  box-shadow: 0 24px 60px #00000080;
}
.kw-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 10% / 4.6%;
}
.kw-phone--front { position: relative; z-index: 2; }
.kw-phone--back {
  position: absolute;
  z-index: 1;
  top: 40px;
  right: 32px;
  width: min(250px, 56%);
  opacity: .55;
  transform: rotate(6deg);
}
.kw-hero-visual .kw-phone--front { transform: translateX(-18%); }

/* ---------- From the videos ---------- */
.kw-videos { padding: 8px 0 56px; }
.kw-videos-inner {
  padding: 28px 32px;
  border: 1px solid #ffc40055;
  border-left: 6px solid var(--kw-yellow);
  border-radius: 16px;
  background: #ffc4000d;
}
.kw-kicker {
  margin: 0 0 8px;
  font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kw-yellow);
}
.kw-videos h2 { margin: 0 0 10px; font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.kw-videos-inner > p:not(.kw-kicker) { margin: 0; max-width: 52em; color: #d4dbe8; line-height: 1.65; }
.kw-videos-inner > p.kw-maker { margin-top: 12px; color: var(--muted); font-size: 15px; }

/* ---------- Sections ---------- */
.kw-tools, .kw-how, .kw-screens, .kw-note, .kw-cta { padding: 56px 0; border-top: 1px solid var(--line); }
.kw-page section > h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -.01em; }
.kw-sub { margin: 0 0 28px; color: var(--muted); }

.kw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.kw-plan {
  padding: 28px;
  border: 1px solid var(--kw-line);
  border-radius: 20px;
  background: var(--kw-card);
}
.kw-plan--pro { border-color: #ffc40066; background: linear-gradient(160deg, #ffc40014, #ffffff05 60%); }
.kw-plan header { margin-bottom: 14px; }
.kw-plan-tag {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--kw-line);
  font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
}
.kw-plan--pro .kw-plan-tag { background: var(--kw-yellow); border-color: var(--kw-yellow); color: var(--kw-yellow-ink); }
.kw-plan h3 { margin: 0; font-size: 1.3rem; }
.kw-plan ul { margin: 0; padding-left: 1.1em; display: grid; gap: 12px; line-height: 1.55; color: #d4dbe8; }
.kw-plan li strong { color: var(--text); }
.kw-plan-note { margin: 16px 0 0; color: var(--muted); font-size: 15px; }

.kw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.kw-card {
  padding: 22px;
  border: 1px solid var(--kw-line);
  border-radius: 16px;
  background: var(--kw-card);
}
.kw-card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.kw-card p { margin: 0; color: #c7cfdd; line-height: 1.55; }

.kw-gal {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.kw-gal figure { margin: 0; }
.kw-gal img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1304;
  border-radius: 18px;
  border: 1px solid #ffffff22;
  background: var(--kw-paper);
}
.kw-gal figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }

.kw-note p {
  margin: 0;
  max-width: 52em;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid var(--kw-line);
  background: #ffffff06;
  line-height: 1.65;
  color: #d4dbe8;
}

.kw-cta { text-align: center; }
.kw-cta img { border-radius: 18px; margin-bottom: 12px; }
.kw-cta > p { margin: 0 auto 24px; max-width: 36em; color: #d4dbe8; }
.kw-page .kw-cta > h2 { margin-bottom: 8px; }
.kw-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kw-gal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kw-hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 48px; }
  .kw-hero-visual { min-height: 0; }
  .kw-phone { width: min(260px, 62%); }
  .kw-phone--back { width: min(220px, 50%); top: 30px; right: max(28px, 8%); }
  .kw-plans { grid-template-columns: 1fr; }
  .kw-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .kw-grid { grid-template-columns: 1fr; }
  .kw-gal { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kw-videos-inner { padding: 22px 20px; }
  .kw-plan { padding: 22px; }
  .kw-store { flex: 1 1 100%; justify-content: center; }
  .kw-lead { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .kw-store { transition: none; }
}
