/* Polka's site. The tokens are the app's own (renderer/styles.css), light and dark. */
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/AtkinsonHyperlegible-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/fonts/AtkinsonHyperlegible-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --background: 40 30% 97%;
  --card: 40 40% 99.6%;
  --foreground: 30 22% 11%;
  --muted: 38 20% 93%;
  --muted-foreground: 30 10% 36%;
  --border: 36 18% 86%;
  --primary: 318 55% 36%;
  --primary-foreground: 0 0% 100%;
  --primary-hover: 318 58% 29%;
  --ring: 318 55% 42%;
  --dot: 318 55% 36% / .07;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: 30 6% 10%;
    --card: 30 6% 12.5%;
    --foreground: 36 14% 91%;
    --muted: 30 6% 17%;
    --muted-foreground: 34 8% 67%;
    --border: 30 6% 21%;
    --primary: 318 62% 72%;
    --primary-foreground: 318 40% 10%;
    --primary-hover: 318 66% 80%;
    --ring: 318 62% 72%;
    --dot: 318 62% 72% / .07;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font: 400 1.0625rem/1.6 "Atkinson Hyperlegible", system-ui, sans-serif;
}
a { color: hsl(var(--primary)); }
:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 16px; top: -48px; padding: 8px 12px; background: hsl(var(--card)); border-radius: 8px; }
.skip:focus { top: 12px; }

.bar, main, .foot { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: inherit; text-decoration: none; }
.brand img { border-radius: 7px; }

.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: 10px; font-weight: 700; text-decoration: none;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  transition: background-color 120ms ease-out;
}
.btn:hover { background: hsl(var(--primary-hover)); }
.btn.quiet { background: transparent; color: hsl(var(--primary)); border: 1px solid hsl(var(--border)); min-height: 38px; padding: 0 14px; }
.btn.quiet:hover { background: hsl(var(--muted)); }

/* The hero sits on the icon's half-drop polka pattern, kept faint. */
.hero {
  text-align: center;
  padding: 72px 24px 88px;
  margin: 8px 0 0;
  border-radius: 24px;
  background-color: hsl(var(--card));
  background-image:
    radial-gradient(circle, hsl(var(--dot)) 5px, transparent 5.5px),
    radial-gradient(circle, hsl(var(--dot)) 5px, transparent 5.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  border: 1px solid hsl(var(--border));
}
.mark { border-radius: 26px; box-shadow: 0 10px 30px -12px hsl(30 22% 11% / .35); }
h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; margin: 28px 0 16px; text-wrap: balance; }
.lede { max-width: 36em; margin: 0 auto; font-size: 1.2rem; color: hsl(var(--muted-foreground)); text-wrap: pretty; }
.acts { margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 12px 16px; justify-content: center; align-items: center; }
.note { color: hsl(var(--muted-foreground)); font-size: .95rem; }

h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 24px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }

.features { padding: 88px 0 24px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.grid li { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: 16px; padding: 22px 22px 18px; }
.grid p { margin: 0; color: hsl(var(--muted-foreground)); }

.trust { padding: 72px 0 24px; max-width: 44em; }
.trust ul { margin: 0; padding-left: 1.2em; }
.trust li { margin: 0 0 10px; padding-left: 4px; }
.trust li::marker { color: hsl(var(--primary)); }

.foot { padding-top: 72px; padding-bottom: 40px; color: hsl(var(--muted-foreground)); font-size: .9rem; }
.foot p { border-top: 1px solid hsl(var(--border)); padding-top: 20px; margin: 0; }

.lost { text-align: center; padding: 96px 24px; }

@media (max-width: 560px) {
  .bar, main, .foot { padding: 0 16px; }
  .hero { padding: 48px 20px 56px; border-radius: 18px; }
  .lede { font-size: 1.1rem; }
  .foot { padding-top: 48px; padding-bottom: 32px; }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* The coming-soon page: one card, in the middle of the window. */
.soon { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.soon main { flex: 1; display: flex; align-items: center; width: 100%; padding-top: 24px; }
.soon .hero { width: 100%; padding: 88px 24px 96px; }
.soon .foot { width: 100%; padding-top: 24px; text-align: center; }
.soon .foot p { border-top: 0; padding-top: 0; }

/* A long page to read (Privacy): one column at a reading measure. */
.doc { max-width: 40em; padding-top: 48px; }
.doc h1 { margin: 0 0 16px; }
.doc .lede { margin: 0 0 8px; text-align: left; }
.doc h2 { font-size: 1.3rem; margin: 40px 0 12px; }
.doc p, .doc li { line-height: 1.6; text-wrap: pretty; }
.doc ul { padding-left: 1.25em; }
.doc li { margin: 0 0 8px; }
.doc li::marker { color: hsl(var(--primary)); }
.doc a { color: hsl(var(--primary)); }

/* The contact form. */
.form { margin: 32px 0 0; display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; }
.opt { font-weight: 400; color: hsl(var(--muted-foreground)); }
.field input, .field textarea {
  font: inherit; color: inherit; width: 100%;
  background: hsl(var(--card)); border: 1px solid hsl(var(--muted-foreground) / .6); border-radius: 10px;
  padding: 10px 12px; min-height: 44px;
}
.field textarea { resize: vertical; min-height: 9em; }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-radius: 10px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-acts .btn { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.form-acts .btn:disabled { opacity: .6; cursor: default; }
.form-say { margin: 0; color: hsl(var(--muted-foreground)); }
.form-say:empty { display: none; }
.sent { margin: 32px 0 0; padding: 24px; border: 1px solid hsl(var(--border)); border-radius: 16px; background: hsl(var(--card)); }
.sent h2 { margin: 0 0 8px; }
.sent p { margin: 0; color: hsl(var(--muted-foreground)); }
.foot a { color: inherit; }

/* A school's download page (/get/<slug>): its logo as it is, on no plate. */
.mark.school-logo { border-radius: 0; box-shadow: none; object-fit: contain; width: auto; max-width: min(240px, 80vw); height: 112px; }

/* ---------------------------------------------------------------------------------------------------------------
   The home page (body.home). No script and no inline styles (site/_headers), so everything here is CSS: the
   pictures are the app's own screens from Polka Demo, light and dark by <picture>, and motion is one rise as a
   picture comes into view, only where motion is welcome and the browser can tie it to the scroll.
   --------------------------------------------------------------------------------------------------------------- */
:root {
  --side: 38 22% 93.5%;
  --amber-bg: 44 100% 91%;
  --amber-border: 42 78% 62%;
  --amber-fg: 32 70% 19%;
  --shot-shadow: 0 34px 70px -34px hsl(30 30% 12% / .34), 0 10px 24px -14px hsl(30 30% 12% / .18);
  --lights: 30 10% 36% / .28;
}
@media (prefers-color-scheme: dark) {
  :root {
    --side: 30 6% 7.5%;
    --amber-bg: 38 40% 14%;
    --amber-border: 38 45% 32%;
    --amber-fg: 40 80% 84%;
    --shot-shadow: 0 34px 70px -34px hsl(0 0% 0% / .8), 0 10px 24px -14px hsl(0 0% 0% / .5);
    --lights: 34 8% 67% / .3;
  }
}

/* The pictures that run off the window's edge are cut there, never scrolled to. Both are needed: the body's own
   overflow is handed to the window unless the root has one of its own. */
html { scroll-padding-top: 24px; overflow-x: clip; }
.home { overflow-x: clip; }
.home .bar, .home main, .home .foot { max-width: 1200px; }
.home h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; text-wrap: balance; }
.home h3 { font-size: 1.15rem; margin: 0 0 6px; }

.nav { display: flex; align-items: center; gap: 8px 28px; }
.nav a:not(.btn) { color: hsl(var(--muted-foreground)); text-decoration: none; font-size: 1rem; padding: 10px 0; }
.nav a:not(.btn):hover { color: hsl(var(--foreground)); }
.btn:active { transform: translateY(1px); }

/* A screen of the app, in a window's frame. The three marks sit where the window's own are. */
.shot { position: relative; margin: 0; border-radius: 14px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); box-shadow: var(--shot-shadow); overflow: hidden; }
.shot picture { display: block; position: relative; }
.shot img { display: block; width: 100%; height: auto; }
.shot picture::before {
  content: ""; position: absolute; left: 1.3%; top: 2.1%; width: 4.1%; aspect-ratio: 52 / 12;
  background:
    radial-gradient(circle closest-side, hsl(var(--lights)) 88%, transparent) 0 50% / 23.1% 100% no-repeat,
    radial-gradient(circle closest-side, hsl(var(--lights)) 88%, transparent) 50% 50% / 23.1% 100% no-repeat,
    radial-gradient(circle closest-side, hsl(var(--lights)) 88%, transparent) 100% 50% / 23.1% 100% no-repeat;
}

.lp-copy p { margin: 0; max-width: 31em; font-size: 1.15rem; color: hsl(var(--muted-foreground)); text-wrap: pretty; }

/* The hero: the words beside Today, which runs off the window's edge. */
.lp-hero, .lp-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.lp-hero { padding: 48px 0 88px; }
.lp-hero h1 { font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.03; letter-spacing: -0.03em; margin: 0 0 20px; }
.lp-hero .lede { margin: 0; text-align: left; font-size: 1.25rem; max-width: 26em; }
.lp-hero .acts { justify-content: flex-start; margin-top: 32px; }
.lp-hero .btn.quiet, .lp-get .btn.quiet { min-height: 44px; padding: 0 18px; }
.bleed-r .shot { width: 150%; }
.bleed-l .shot { width: 150%; margin-left: -50%; }
.lp-split.bleed-l { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* What holds, said once, under the hero. */
.lp-facts ul { list-style: none; margin: 0; padding: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 40px; border-top: 1px solid hsl(var(--border)); }
.lp-facts li { color: hsl(var(--muted-foreground)); font-size: 1rem; line-height: 1.5; }
.lp-facts strong { display: block; color: hsl(var(--foreground)); font-size: 1.05rem; margin: 0 0 4px; }

.lp-split { padding: 120px 0 0; }

/* Claude's part is amber, as what waits for the student is in the app. */
.lp-claude { margin: 128px 0 0; padding: 64px 64px 0; border-radius: 24px; background: hsl(var(--amber-bg)); border: 1px solid hsl(var(--amber-border)); overflow: hidden; }
.lp-claude h2 { color: hsl(var(--amber-fg)); }
.lp-claude .lp-copy p { color: hsl(var(--amber-fg)); max-width: 36em; }
.lp-claude .shot { margin: 48px 0 -1px; border-radius: 14px 14px 0 0; border-bottom: 0; box-shadow: none; }

.lp-more { padding: 128px 0 0; }
.lp-more h2 { margin-bottom: 32px; }
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cell { grid-column: span 2; padding: 28px 28px 30px; border-radius: 20px; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); overflow: hidden; }
.cell p { margin: 0; color: hsl(var(--muted-foreground)); max-width: 30em; }
.cell.pic { grid-column: span 3; padding-bottom: 0; }
.cell.tint { background: hsl(var(--side)); }
.cell.dots {
  background-image:
    radial-gradient(circle, hsl(var(--dot)) 5px, transparent 5.5px),
    radial-gradient(circle, hsl(var(--dot)) 5px, transparent 5.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}
/* A piece of a screen at a size that reads: from the sidebar's edge, running off the cell's right and foot. */
.crop { margin: 28px -29px 0 0; height: 300px; overflow: hidden; border: 1px solid hsl(var(--border)); border-width: 1px 0 0 1px; border-radius: 12px 0 0 0; }
.crop img { display: block; width: 960px; max-width: none; height: auto; margin: -34px 0 0 -198px; }
.crop.inset img { margin-left: -236px; }

.lp-faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 56px; padding: 128px 0 0; align-items: start; }
.faq details { border-bottom: 1px solid hsl(var(--border)); }
.faq details:first-child { border-top: 1px solid hsl(var(--border)); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; position: absolute; right: 6px; top: 50%; translate: 0 -50%; font-weight: 400; font-size: 1.5rem; line-height: 1; color: hsl(var(--muted-foreground)); }
.faq details[open] summary::after { content: "\2212"; content: "\2212" / ""; }
.faq summary:hover { color: hsl(var(--primary)); }
.faq p { margin: 0; padding: 0 40px 22px 0; max-width: 40em; color: hsl(var(--muted-foreground)); }

.lp-get { margin-top: 128px; }
.lp-get h2 { margin: 24px 0 0; }
.lp-get .mark { border-radius: 22px; }
.lp-get .acts { margin-top: 28px; }
.lp-get .note { margin: 20px 0 0; }

.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; border-top: 1px solid hsl(var(--border)); padding-top: 20px; }
.home .foot .fine { border-top: 0; padding-top: 12px; max-width: 60em; }

/* One column below a laptop's width. A picture then shows a part of its screen, large enough to read. */
@media (max-width: 959px) {
  .nav a:not(.btn) { display: none; }
  .lp-hero, .lp-split, .lp-split.bleed-l, .lp-faq { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lp-hero { padding: 24px 0 56px; }
  .lp-split { padding-top: 80px; }
  .lp-split.bleed-l .lp-copy { order: -1; }
  .bleed-r .shot, .bleed-l .shot { width: 100%; margin-left: 0; }
  .bleed-r .shot picture, .bleed-l .shot picture { width: 165%; }
  .bleed-l .shot picture { margin-left: -65%; }
  .lp-facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-claude { margin-top: 80px; padding: 40px 24px 0; }
  .lp-claude .shot picture { width: 190%; margin-left: -90%; }
  .lp-more, .lp-faq { padding-top: 80px; }
  .cell, .cell.pic { grid-column: span 6; }
  .lp-get { margin-top: 80px; }
}
@media (max-width: 560px) {
  .lp-facts ul { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .lp-copy p, .lp-hero .lede { font-size: 1.08rem; }
  .crop { height: 240px; }
  .crop img { width: 800px; margin: -28px 0 0 -165px; }
  .crop.inset img { margin-left: -232px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn { transition: background-color 120ms ease-out, transform 120ms ease-out; }
  .shot.first { animation: rise 700ms cubic-bezier(.16, 1, .3, 1) both; }
  @supports (animation-timeline: view()) {
    .shot.reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
