/* Landing page for signed-out visitors. awx colours; same type as the app. */
#landing { background: var(--paper); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; }
.lp-wrap { max-width: 1040px; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
.lp-top { position: sticky; top: 0; z-index: 5; background: var(--purple); padding-top: env(safe-area-inset-top); }
.lp-top .lp-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.lp-top .logo { color: #fff; } .lp-top .logo span { color: var(--lav); }
.lp-top .btn { background: #fff; color: var(--deep); min-height: 44px; padding: 8px 20px; }
.lp-top .btn:hover { background: var(--tint); }
.lp-hero { background: var(--purple); color: #fff; padding: 36px 0 56px; }
.lp-herogrid { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 24px; }
.lp-hero h1 { font-family: var(--head); font-weight: 800; font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: -.03em; margin: 0 0 16px; }
.lp-hero p { font-size: clamp(17px, 2.2vw, 20px); line-height: 1.5; margin: 0 0 28px; color: #efeafa; max-width: 34em; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-hero .lp-white { background: #fff; color: var(--deep); } .lp-hero .lp-white:hover { background: var(--tint); }
.lp-hero .lp-line { background: transparent; color: #fff; border: 1.5px solid var(--lav); text-decoration: none; display: inline-flex; align-items: center; }
.lp-hero .lp-line:hover { background: rgba(255,255,255,.1); }
.lp-kira { position: relative; width: 100%; max-width: 240px; justify-self: center; }
.lp-awi { display: block; width: 100%; height: auto; }
.lp-sec { padding: 52px 0 0; }
.lp-sec h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; }
.lp-lead { font-size: 18px; color: var(--muted); max-width: 40em; margin: 0 0 8px; }
.lp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 22px; }
.lp-card h3, .lp-card p { padding: 0 8px; }
.lp-art { background: var(--tint); border-radius: 12px; margin-bottom: 16px; line-height: 0; }
.lp-art svg { display: block; height: auto; }
.lp-card h3, .lp-steps h3 { font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: -.01em; margin: 0 0 6px; color: var(--headink); }
.lp-card p, .lp-steps p { margin: 0; color: var(--muted); }
.lp-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-steps li { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; gap: 16px; align-items: flex-start; }
.lp-steps li > span { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--purple); color: #fff; font-family: var(--head); font-weight: 800; font-size: 20px; display: grid; place-items: center; }
.lp-end { text-align: center; padding-bottom: 56px; }
.lp-end .lp-lead { margin: 0 auto 22px; }
@media (max-width: 860px) { .lp-cards { grid-template-columns: repeat(2, 1fr); } .lp-steps { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  /* phone: the headline and Kira share the first row, so there is no empty strip beside her */
  .lp-herogrid { grid-template-columns: minmax(0, 1fr) 118px; gap: 0 10px; align-items: end; }
  .lp-copy { display: contents; }
  .lp-hero h1 { grid-column: 1; grid-row: 1; align-self: center; font-size: clamp(27px, 8vw, 33px); margin: 0 0 20px; text-wrap: balance; }
  .lp-kira { grid-column: 2; grid-row: 1; max-width: 118px; justify-self: end; align-self: end; margin-bottom: 16px; }
  .lp-hero p { grid-column: 1 / -1; grid-row: 2; } .lp-cta { grid-column: 1 / -1; grid-row: 3; }
  .lp-hero p.lp-free { grid-row: 4; margin: 14px 0 0; } .lp-hero p.lp-count { grid-row: 4; margin: 14px 0 0; } .lp-hero p.lp-free { grid-row: 5; }
  .lp-hero { padding: 24px 0 40px; } .lp-cards { grid-template-columns: 1fr; } .lp-sec { padding-top: 40px; }
  .lp-cta .btn { flex: 1 1 100%; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.lp-faq { display: grid; gap: 10px; max-width: 760px; margin-top: 18px; }
.lp-faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.lp-faq summary { cursor: pointer; list-style: none; font-family: var(--head); font-weight: 700; font-size: 18px; color: var(--headink); padding: 16px 28px 16px 0; position: relative; min-height: 48px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; position: absolute; right: 2px; top: 12px; font-size: 24px; font-weight: 500; color: var(--accent); }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq details p { margin: 0 0 16px; color: var(--muted); }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; }
.lp-top .lp-wrap .lp-right { display: inline-flex; align-items: center; gap: 10px; }
[data-theme="dark"] .lp-hero { background: var(--purple); }
.lp-hero h1 { font-size: clamp(28px, 3.9vw, 50px); }
.lp-hero h1 span { display: block; }

/* From the blog */
.lp-blogsec .lp-card a { display: block; } .lp-blogsec .lp-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 10px; margin-bottom: 12px; }
.lp-blogsec .lp-card h3 a { color: var(--headink); text-decoration: none; } .lp-blogsec .lp-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lp-more { margin: 18px 0 0; } .lp-more a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* word-problems band */
.lp-words { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.lp-wcopy h2 { margin: 0 0 12px; } .lp-wcopy p { color: var(--muted); margin: 0 0 12px; } .lp-wcopy .lp-lead { margin-bottom: 12px; }
.lp-wsheet { margin: 0; background: var(--tint); border-radius: 12px; padding: 18px 20px; }
.lp-wsheet figcaption { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.lp-wsheet .lp-wq { margin: 0 0 14px; color: #1c1b22; font-size: 17px; }
.lp-wwork, .lp-wans { background: #fff; border: 1px solid var(--lav); border-radius: 8px; padding: 10px 12px; font-family: "Kalam", cursive; font-size: 20px; color: #2a3a8c; line-height: 1.4; }
.lp-wwork span, .lp-wans span { display: block; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.lp-wans { margin-top: 10px; }
@media (max-width: 860px) { .lp-words { grid-template-columns: 1fr; padding: 22px; gap: 22px; } }

/* fact band, video, screenshots, parents, built by */
.lp-free { margin: 16px 0 0; color: #e4dcf6; font-size: 15px; }
.lp-count { margin: 16px 0 0; color: #f1ecfb; font-size: 18px; line-height: 1.4; } .lp-count b { color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.lp-stats { margin-top: 28px; } .lp-stats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.lp-stats li { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 16px; text-align: center; }
.lp-stats b { display: block; font-family: var(--head); font-weight: 800; font-size: 32px; line-height: 1.1; color: var(--accent); letter-spacing: -.02em; }
.lp-stats span { display: block; margin-top: 4px; font-size: 14.5px; color: var(--muted); line-height: 1.35; }
.lp-vid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.lp-vid video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 12px; background: #3a2179; }
.lp-vidtext h2 { margin: 0 0 10px; } .lp-small { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.lp-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.lp-shots figure { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 10px 10px 14px; }
.lp-shots img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 10px; background: var(--tint); }
.lp-shots figcaption { margin: 10px 6px 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.lp-pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.lp-pgrid article { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; }
.lp-pgrid h3 { font-family: var(--head); font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 0 0 6px; color: var(--headink); }
.lp-pgrid p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.lp-pcta { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 22px; } .lp-pcta a { font-weight: 600; }
@media (max-width: 860px) { .lp-stats ul { grid-template-columns: repeat(2, 1fr); } .lp-shots, .lp-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lp-stats ul { grid-template-columns: repeat(2, 1fr); } .lp-vid { grid-template-columns: 1fr; padding: 16px; gap: 18px; } .lp-vid video { max-width: 300px; margin: 0 auto; } .lp-shots, .lp-pgrid { grid-template-columns: 1fr; } }
.lp-small a { color: var(--accent); text-underline-offset: 3px; }
.lp-hero p.lp-free { margin-top: 18px; }

/* Kira's whisper: a flat speech bubble beside her (separate from the picture, so her artwork stays whole) */
.lp-bubble { position: absolute; right: -6px; top: -50px; z-index: 1; background: #fff; color: var(--deep); font: 600 16px/1.25 var(--head); padding: 9px 14px; border-radius: 16px; white-space: nowrap; animation: lpbub .5s ease 1.2s both; }
.lp-bubble::after { content: ""; position: absolute; left: 34px; bottom: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff; }
@keyframes lpbub { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lp-bubble { animation: none; } }
@media (max-width: 600px) { .lp-hero { padding-top: 58px; } .lp-bubble { font-size: 13px; padding: 6px 11px; border-radius: 13px; top: -40px; right: 0; } .lp-bubble::after { left: auto; right: 34px; border-width: 6px; bottom: -6px; border-bottom: 0; } }

/* the people behind Mathhh */
.lp-made h2 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 18px; }
.lp-team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 760px; }
.lp-team article { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px 20px; }
.lp-team h3 { margin: 0 0 12px; font: 700 13px var(--head); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.lp-team ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lp-team li small { display: block; font-size: 14px; color: var(--muted); line-height: 1.3; }
.lp-team li b { font: 700 19px/1.3 var(--head); letter-spacing: -.01em; color: var(--headink); }
.lp-awx { margin: 16px 0 0; color: var(--muted); font-size: 16px; }
@media (max-width: 600px) { .lp-team { grid-template-columns: 1fr; } }
.lp-awx a { color: var(--accent); text-underline-offset: 3px; }
.lp-hero p.lp-free { margin: 8px 0 0; font-size: 14px; opacity: .9; } .lp-hero p.lp-count { margin: 18px 0 0; }
.lp-end .lp-count { color: var(--muted); margin: 14px 0 0; } .lp-end .lp-count b { color: var(--accent); }

/* a phone: shorter. The small pictures on the feature cards and the screenshots on the blog cards are left out, so each is just a title and a few lines */
@media (max-width: 600px) { .lp-art { display: none; } .lp-blogsec .lp-card img, .lp-blogsec .lp-card p { display: none; } .lp-card { padding: 16px 18px; } }
.lp-end .lp-about { margin: 22px 0 0; font-size: 16px; color: var(--muted); } .lp-end .lp-about a { color: var(--accent); font-weight: 600; }

.lp-fam { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 32px; }
.lp-famtext { flex: 1 1 320px; min-width: 0; } .lp-famtext .lp-small { margin: 8px 0 0; color: var(--muted); }
.lp-fam h2 { text-wrap: balance; }
.lp-famtiles { display: grid; grid-template-columns: repeat(5, 72px); gap: 14px; }
.lp-famtiles figure { margin: 0; display: grid; justify-items: center; gap: 8px; }
.lp-famtiles span { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: #6d3fc4; color: #fff; font-family: var(--head); font-weight: 800; font-size: 30px; box-sizing: border-box; }
.lp-famtiles figcaption { font-size: 14px; font-weight: 600; color: var(--headink); }
.lp-famtiles .lp-famadd { background: transparent; border: 3px dashed var(--purple); color: var(--purple); }
.lp-vidcta { margin-top: 18px; }
@media (min-width: 900px) { .lp-faq { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .lp-team { max-width: none; } }
@media (max-width: 560px) { .lp-fam { padding: 22px; } .lp-famtiles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; } .lp-famtiles span { width: 100%; height: auto; aspect-ratio: 1; font-size: 22px; border-radius: 16px; } .lp-famtiles figcaption { font-size: 12px; } }
