/* quadrille.it — presentation site. Same paper, ink and handwriting as the app. */
:root { --paper: #fbfaf5; --ink: #2b2b2b; --ink-soft: #6b6b66; --grid: rgba(112,156,214,0.22); --grid2: rgba(112,156,214,0.42); --accent: #2f5fb3; --yellow: #f2c94c; --green: #3f8f4e; --red: #c0392b; --card: rgba(255,253,247,0.96); --shadow: 0 2px 0 rgba(43,43,43,0.9), 0 8px 24px rgba(43,43,43,0.12); --hand: "Patrick Hand", "Segoe Print", "Bradley Hand", cursive; --title: "Caveat", "Segoe Print", cursive; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--hand); font-size: 19px; line-height: 1.45; color: var(--ink); background-color: var(--paper); background-image: linear-gradient(to right, var(--grid2) 1px, transparent 1px), linear-gradient(to bottom, var(--grid2) 1px, transparent 1px), linear-gradient(to right, var(--grid) 1px, transparent 1px), linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
kbd { font-family: inherit; font-size: 0.85em; border: 1.5px solid var(--ink); border-bottom-width: 3px; border-radius: 5px; padding: 0 6px; background: #fff; white-space: nowrap; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.8em; background: rgba(43,43,43,0.07); border-radius: 4px; padding: 1px 5px; }
mark { background: var(--yellow); padding: 0 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* header */
header.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1.5px solid var(--ink); }
header.top .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--title); font-size: 28px; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand img { width: 30px; height: 30px; }
nav.main { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
nav.main a, .burger nav a { text-decoration: none; color: var(--ink); font-size: 17px; }
nav.main a:hover { text-decoration: underline; }
nav.main a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--yellow); }
.btn { display: inline-block; padding: 8px 16px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; font-family: var(--hand); font-size: 18px; box-shadow: var(--shadow); cursor: pointer; line-height: 1.3; }
.btn.primary { background: var(--yellow); }
.btn:hover { transform: translateY(-1px); }
header .lang { font-size: 15px; text-decoration: none; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 8px; padding: 3px 9px; }
header .lang:hover { background: var(--ink); color: #fff; }
.burger { display: none; position: relative; margin-left: auto; }
.burger summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border: 1.5px solid var(--ink); border-radius: 8px; background: #fff; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 9px; }
.burger summary::-webkit-details-marker { display: none; }
.burger summary span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.burger nav { position: absolute; right: 0; top: 48px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 0; min-width: 200px; display: flex; flex-direction: column; }
.burger nav a { padding: 8px 16px; font-size: 18px; }
.burger nav a[aria-current="page"] { background: var(--yellow); }

/* hero and sections */
.hero { padding: 60px 0 30px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; }
.hero > *, .feature > *, .phones > *, .themes > * { min-width: 0; }
.hero h1 { font-family: var(--title); font-size: 56px; line-height: 1.05; margin: 0 0 12px; }
.hero p.lead { font-size: 22px; color: var(--ink-soft); margin: 0 0 22px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .tiny, p.tiny { font-size: 15px; color: var(--ink-soft); margin-top: 10px; }
.shot { border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow); background: #fff; overflow: hidden; }
section { padding: 40px 0; }
section h1 { font-family: var(--title); font-size: 52px; line-height: 1.05; margin: 0 0 10px; }
section h2 { font-family: var(--title); font-size: 40px; margin: 0 0 6px; line-height: 1.1; }
section h3 { font-family: var(--title); font-size: 28px; margin: 22px 0 4px; }
section p.sub { color: var(--ink-soft); margin: 0 0 24px; font-size: 20px; }
.intro { padding: 50px 0 20px; }
.intro .lead { font-size: 22px; color: var(--ink-soft); max-width: 820px; margin: 0 0 18px; }
.intro.slim { padding-bottom: 10px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { text-decoration: none; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 12px; font-size: 16px; background: #fff; }
.toc a:hover { background: var(--yellow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.card b { font-family: var(--title); font-size: 24px; display: block; margin-bottom: 4px; }
.card span.ico { font-size: 26px; display: block; margin-bottom: 4px; }
.card.big { padding: 22px 24px; align-self: center; }
.card.big p { margin: 6px 0 0; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.themes figure { margin: 0; }
.themes figcaption { font-family: var(--title); font-size: 22px; margin-top: 8px; }
.phones { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 18px; align-items: start; }
.phones .shot { max-width: 300px; margin: 0 auto; }
.phones div .shot { max-width: 100%; margin: 14px 0; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.platforms .card p { color: var(--ink-soft); font-size: 16px; margin: 0 0 12px; }
.platforms .card .btn { margin: 0 6px 6px 0; }
details { border-top: 1.5px dashed rgba(43,43,43,0.3); padding: 10px 0; }
summary { font-family: var(--title); font-size: 24px; cursor: pointer; }
.ribbon { background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 10px; padding: 10px 14px; display: inline-block; margin-bottom: 14px; font-family: var(--title); font-size: 22px; box-shadow: var(--shadow); }
.steps ol.three, .prose ol.three { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
ol.three li { background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px 16px 16px; box-shadow: var(--shadow); }
ol.three li > b { font-family: var(--title); font-size: 34px; color: var(--accent); display: block; line-height: 1; margin-bottom: 6px; }
ol.three strong { display: block; font-family: var(--title); font-size: 24px; font-weight: 700; }
.final { text-align: center; padding: 50px 0 60px; }
.final .cta { justify-content: center; }
.final p.tiny { text-align: left; max-width: 820px; margin: 0 auto 22px; }

/* feature rows */
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; border-top: 1.5px dashed rgba(43,43,43,0.25); }
.feature:nth-of-type(even) .text { order: 2; }
.feature ul, .feature ol { padding-left: 22px; margin: 8px 0; }
.feature li { margin: 6px 0; }
.feature .shot.tall { max-width: 300px; margin: 0 auto; }
.prose { max-width: 860px; }
.prose ul, .prose ol:not(.three) { padding-left: 22px; }
.prose li { margin: 6px 0; }
dl.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0; align-items: baseline; }
dl.keys dt { white-space: nowrap; }
dl.keys dd { margin: 0; color: var(--ink-soft); }

/* live demo */
.demo { position: relative; }
.demo .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 22px; padding: 12px 22px; }
.demo .play:hover { transform: translate(-50%, -52%); }
.demo iframe { width: 100%; aspect-ratio: 16 / 10; border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow); background: #fff; display: block; }
.demo.full iframe { aspect-ratio: auto; height: min(78vh, 900px); min-height: 480px; }
.demo.full .shot { max-height: min(78vh, 900px); object-fit: cover; width: 100%; }
.demo.on .shot, .demo.on .play { display: none; }
.tips { padding-top: 24px; }

/* comparison table */
.compare { overflow-x: auto; }
.compare table { border-collapse: collapse; width: 100%; background: var(--card); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: var(--shadow); font-size: 17px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1.5px dashed rgba(43,43,43,0.25); }
.compare th { font-family: var(--title); font-size: 24px; border-bottom: 1.5px solid var(--ink); }
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-family: var(--title); font-size: 21px; white-space: nowrap; }
.compare td.q { color: var(--green); font-weight: 700; }
.compare td.f { color: var(--red); font-weight: 700; }
.compare td.t { color: var(--ink-soft); }

/* changelog */
.changelog h2 { margin-top: 36px; font-size: 34px; }
.changelog h2 a { color: var(--ink); text-decoration: none; }
.changelog h2 a:hover { text-decoration: underline; }
.changelog h2 small { font-size: 22px; color: var(--ink-soft); font-weight: 400; }
.changelog ul { padding-left: 22px; }
.changelog li { margin: 8px 0; }

/* chooser at the root */
.chooser { text-align: center; padding: 15vh 20px 40px; }
.chooser .brand { justify-content: center; font-size: 40px; margin-bottom: 20px; }
.chooser .brand img { width: 44px; height: 44px; }
.chooser h1 { font-family: var(--title); font-size: 46px; margin: 0 0 24px; line-height: 1.1; }
.chooser h1 small { display: block; font-size: 28px; color: var(--ink-soft); font-weight: 400; }
.chooser .cta { justify-content: center; }
.chooser .btn { font-size: 24px; padding: 12px 28px; }

/* footer */
footer { border-top: 1.5px solid var(--ink); padding: 28px 0 40px; font-size: 16px; color: var(--ink-soft); }
footer .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
footer .cols div { display: flex; flex-direction: column; gap: 4px; }
footer .cols b { font-family: var(--title); font-size: 22px; color: var(--ink); margin-bottom: 4px; }
footer a { color: var(--ink); }
footer .fine { margin: 0; }
.legal-body { max-width: 780px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 30px; }
  .hero h1 { font-size: 42px; }
  section h1 { font-size: 40px; }
  .themes, .phones, .feature, ol.three, footer .cols { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .text { order: 0; }
  nav.main, header .lang { display: none; }
  .burger { display: block; }
  header.top .wrap { gap: 10px; }
  header .btn.app { padding: 6px 12px; font-size: 16px; }
  dl.keys { grid-template-columns: 1fr; gap: 2px 0; }
  dl.keys dd { margin-bottom: 8px; }
  .demo.full iframe { height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover, .demo .play:hover { transform: none; } .demo .play:hover { transform: translate(-50%, -50%); } }
