/* LogicLab Kids — dorflerpatrik.com/logiclabkids
   Product page. White page, black type. Display face is Lora, the app's own
   font; text is SF. Inside the phones it is the app: parchment, cream cards,
   gold, and the saturated domain colours of its heroes. */

@font-face {
  font-family: "Lora";
  src: url("assets/lora.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #000;
  --page: #fff;
  --soft: #f5f5f7;
  --muted: #6e6e73;
  --hair: rgba(0, 0, 0, 0.1);

  /* the app (Theme/LLTheme.swift) */
  --parch: #efe3c7;
  --cream: #f9f5ea;
  --app-ink: #1a1a1a;
  --gold: #c9a66b;
  --gold-deep: #8a6a3b;      /* parentTint: gold that stays legible as text */
  --success: #5b8c5a;
  --error: #c75b39;

  /* domain heroes (Content/Courses/domains.json) */
  --d-pattern: #d97706;
  --d-deduction: #059669;
  --d-evidence: #0284c7;
  --d-fallacy: #e11d48;
  --d-systems: #7c3aed;
  --d-perspective: #0d9488;

  --serif: "Lora", "New York", ui-serif, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --max: 1080px;
  --gutter: max(22px, 4vw);
  --phone-w: clamp(250px, 27vw, 340px);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--page);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
}
.h1 { font-size: clamp(52px, 9.4vw, 120px); }
.h2 { font-size: clamp(40px, 6.2vw, 78px); }
.h3 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.lede {
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.4;
  letter-spacing: -0.016em;
  font-weight: 500;
  color: var(--muted);
  max-width: 34ch;
}
.lede b { color: var(--ink); font-weight: 600; }
.center { text-align: center; margin-left: auto; margin-right: auto; text-wrap: balance; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.kicker {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 600; color: var(--gold-deep);
  margin-bottom: 14px; letter-spacing: -0.01em;
}

/* ---------- phone ---------- */
.phone {
  position: relative;
  width: var(--phone-w);
  aspect-ratio: 1293 / 2656;
  flex: none;
  container-type: inline-size;
}
.phone-frame {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 3;
}
.phone-screen {
  position: absolute;
  left: 4.4857%; top: 1.8825%;
  width: 91.1833%; height: 96.2349%;
  border-radius: 13.6% / 6.3%;
  overflow: hidden;
  background: var(--parch);
  color: var(--app-ink);
  isolation: isolate;
  z-index: 1;
  font-family: var(--serif);
  --pt: calc(91.1833cqw / 393); /* one iPhone point; .phone is the container */
  font-size: calc(17 * var(--pt));
  line-height: 1.3;
  letter-spacing: 0;
}
.status {
  position: absolute; top: 0; left: 0; right: 0;
  height: calc(54 * var(--pt));
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(6 * var(--pt)) calc(36 * var(--pt)) 0 calc(48 * var(--pt));
  font-family: var(--sans); font-weight: 600; font-size: calc(17 * var(--pt));
  z-index: 4;
}
.status i { display: flex; gap: calc(6 * var(--pt)); align-items: center; }
.status i::before { content: ""; width: calc(18 * var(--pt)); height: calc(12 * var(--pt)); background: currentColor; -webkit-mask: var(--wifi) center / contain no-repeat; mask: var(--wifi) center / contain no-repeat; }
.status i::after { content: ""; width: calc(27 * var(--pt)); height: calc(13 * var(--pt)); border-radius: calc(4 * var(--pt)); background: currentColor; }
.status.light { color: #fff; }
:root { --wifi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 13'%3E%3Cpath d='M9 2.6c2.5 0 4.8 1 6.5 2.6l1.3-1.3C14.7 1.8 12 .7 9 .7S3.3 1.8 1.2 3.9l1.3 1.3C4.2 3.6 6.5 2.6 9 2.6zm0 3.7c1.5 0 2.9.6 3.9 1.5l1.3-1.3C12.8 5.2 11 4.4 9 4.4S5.2 5.2 3.8 6.5l1.3 1.3c1-.9 2.4-1.5 3.9-1.5zm0 3.6c.6 0 1.1.2 1.5.5L9 12 7.5 10.4c.4-.3.9-.5 1.5-.5z'/%3E%3C/svg%3E"); }

/* Liquid Glass stand-in for the web */
.glass {
  background: rgba(255, 255, 255, 0.58);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.9), 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 4px 18px rgba(0, 0, 0, 0.08);
}
.glass.dark {
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.22), 0 4px 18px rgba(0, 0, 0, 0.1);
  color: #fff;
}

/* app pieces shared by scenes (LLComponents.swift) */
.ll-card {
  background: var(--cream);
  border-radius: calc(14 * var(--pt));
  box-shadow: 0 calc(2 * var(--pt)) calc(4 * var(--pt)) rgba(26, 26, 26, 0.06);
}
.ll-btn {
  display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--pt));
  height: calc(54 * var(--pt)); border-radius: calc(14 * var(--pt));
  background: var(--gold); color: #fff;
  font-family: var(--serif); font-weight: 600; font-size: calc(17 * var(--pt));
}
.ll-btn.secondary { background: transparent; color: var(--gold-deep); box-shadow: inset 0 0 0 calc(1.5 * var(--pt)) rgba(201, 166, 107, 0.5); }

/* ---------- sections ---------- */
section { position: relative; }
.chapter { padding-block: clamp(110px, 16vh, 180px); }
.track { position: relative; }
.stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  padding: 12px 22px; border-radius: 980px; font-weight: 600; font-size: 17px;
  transition: transform 0.3s var(--spring), background 0.2s;
}
.btn:hover { background: #2a2a2a; }
.btn:active { transform: scale(0.96); }
.more { color: var(--gold-deep); font-weight: 600; font-size: 17px; }
.more::after { content: " ›"; }
.more:hover { text-decoration: underline; }

/* ---------- tiles ---------- */
.tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: clamp(48px, 7vh, 80px);
}
.tile {
  background: var(--soft); border-radius: 28px;
  padding: 34px 30px 30px; min-height: 300px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden; position: relative;
}
.tile h3 { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.14; letter-spacing: -0.015em; margin-bottom: 8px; }
.tile p { color: var(--muted); font-size: 16px; line-height: 1.42; }
.tile.wide { grid-column: span 2; }
.tile > div:last-child:not(:first-child) { margin-top: 28px; }

/* the parent chapter sits on the app's own parchment */
.parch { background: var(--parch); color: var(--app-ink); }
.parch .lede { color: rgba(26, 26, 26, 0.6); }
.parch .lede b { color: var(--app-ink); }
.parch .tile { background: var(--cream); }
.parch .tile p { color: rgba(26, 26, 26, 0.58); }

/* ---------- final ---------- */
.final { text-align: center; padding: clamp(120px, 18vh, 200px) 0 clamp(90px, 12vh, 140px); }
.final .logo { width: 150px; height: 150px; margin: 0 auto 34px; border-radius: 22.37%; box-shadow: 0 0 0 0.5px rgba(0,0,0,.08), 0 22px 50px rgba(138, 106, 59, 0.22); }
.final .h1 { margin-bottom: 18px; }
.final .lede { margin: 0 auto 36px; }
.final .cta { display: flex; gap: 26px; justify-content: center; align-items: center; flex-wrap: wrap; }
.soon { font-size: 17px; font-weight: 600; color: var(--muted); }

footer {
  border-top: 0.5px solid var(--hair);
  padding: 22px 0 40px; font-size: 12px; color: var(--muted);
}
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a:hover { color: var(--ink); }

/* ---------- the app's globe: switches every phone on the page ---------- */
.globe {
  position: fixed; top: calc(var(--menubar-h) + 10px); right: 14px; z-index: 50;
}
.globe-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
  transition: transform .35s var(--spring);
}
.globe-btn:active { transform: scale(.9); }
.globe-btn svg { width: 21px; height: 21px; }
.globe-menu {
  position: absolute; top: 48px; right: 0; min-width: 190px;
  border-radius: 14px; padding: 6px;
  background: rgba(250, 250, 250, 0.82);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.12), 0 14px 40px rgba(0,0,0,.16);
  transform-origin: top right;
  opacity: 0; transform: scale(.86); pointer-events: none;
  transition: opacity .18s, transform .35s var(--spring);
}
.globe.open .globe-menu { opacity: 1; transform: none; pointer-events: auto; }
.globe-menu button {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; font-size: 15px; text-align: left;
}
.globe-menu button:hover, .globe-menu button:focus-visible { background: rgba(0,0,0,.06); outline: none; }
.globe-menu button::before { content: ""; width: 14px; height: 14px; flex: none; }
.globe-menu button[aria-checked="true"]::before {
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7.4l3.2 3.1L12 3.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 7.4l3.2 3.1L12 3.6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* over a dark scene the globe goes white (scenes mark themselves data-dark) */
.globe.on-dark .globe-btn { color: #fff; }

/* reveal on enter (used sparingly; scenes do their own motion) */
.rise { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--out), transform 1.1s var(--out); }
.rise.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
}

/* =================================================== live tiles (tiles.js) */

/* apps: Apple's picker ticks, then the shield */
.apps-demo { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 2vw, 22px); max-width: 520px; }
.app { position: relative; aspect-ratio: 1; }
.app-icon { position: absolute; inset: 0; border-radius: 22.37%; display: grid; place-items: center; transition: filter .5s, transform .5s var(--spring); }
.app-icon svg { width: 62%; height: 62%; }
.app-tick { position: absolute; right: -6px; bottom: -6px; width: 42%; height: 42%; min-width: 22px; min-height: 22px; border-radius: 50%; background: #007aff; color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2.5px var(--cream); transform: scale(0); transition: transform .45s var(--spring); }
.app-tick svg { width: 70%; height: 70%; }
.app.picked .app-tick { transform: scale(1); }
.app-shield { position: absolute; inset: 0; border-radius: 22.37%; display: grid; place-items: center; color: #fff; background: rgba(26, 26, 26, .38); opacity: 0; transition: opacity .5s; }
.app-shield svg { width: 42%; height: 42%; }
.app.shielded .app-icon { filter: grayscale(1) brightness(.85); transform: scale(.94); }
.app.shielded .app-shield { opacity: 1; }
.app.shielded .app-tick { transform: scale(0); }

/* early bird: segmented + the two rows from Reward Settings */
.early-seg { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(118, 118, 128, .12); border-radius: 10px; padding: 2px; font-family: var(--sans); }
.early-seg button { position: relative; z-index: 1; height: 32px; font-size: 13px; font-weight: 600; border-radius: 8px; }
.early-seg button:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 1px; }
.early-thumb { position: absolute; left: 2px; top: 2px; bottom: 2px; width: calc((100% - 4px) / 4); background: #fff; border-radius: 8px; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); transition: transform .45s var(--spring); }
.early-rows { margin-top: 14px; background: #fff; border-radius: 12px; padding: 0 14px; font-family: var(--sans); font-size: 16px; }
.early-row { display: flex; justify-content: space-between; align-items: center; height: 46px; }
.early-row + .early-row { border-top: .5px solid rgba(60, 60, 67, .2); }
.early-v { font-weight: 500; color: rgba(60, 60, 67, .6); font-variant-numeric: tabular-nums; }
.early-vb { color: var(--gold-deep); font-weight: 600; display: inline-block; }
.early-vb.bump { animation: tbump .5s var(--spring); }
@keyframes tbump { 0% { transform: scale(1.35); } 100% { transform: none; } }

/* switch account + dashboard: native grouped list */
.sw-list, .dash-card { background: #fff; border-radius: 14px; font-family: var(--sans); overflow: hidden; }
.sw-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; }
.sw-row + .sw-row { border-top: .5px solid rgba(60, 60, 67, .2); }
.sw-row:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: -2px; }
.sw-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; flex: none; }
.sw-name { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.sw-name b { font-weight: 600; font-size: 16px; }
.sw-name span { font-size: 13px; color: rgba(60, 60, 67, .6); }
.sw-check { width: 20px; height: 20px; color: var(--gold-deep); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .45s var(--spring); }
.sw-row[aria-pressed="true"] .sw-check { opacity: 1; transform: none; }

.dash-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.dash-row { display: flex; justify-content: space-between; padding: 11px 14px; border-top: .5px solid rgba(60, 60, 67, .2); font-size: 15px; }
.dash-row span:last-child { color: rgba(60, 60, 67, .6); font-variant-numeric: tabular-nums; }

/* areas */
.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.area { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 12px; min-width: 0; }
.area-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.area-icon svg { width: 22px; height: 22px; }
.area-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.area-text b { font-family: var(--serif); font-weight: 700; font-size: 16px; }
.area-text span { font-size: 12px; color: var(--muted); }

/* language segmented */
.langs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(118, 118, 128, .12); border-radius: 12px; padding: 3px; }
.langs button { position: relative; z-index: 1; height: 40px; font-weight: 600; font-size: 15px; border-radius: 9px; }
.langs button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.langs-thumb { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 3); background: #fff; border-radius: 9px; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); transition: transform .45s var(--spring); }

/* trophies */
.trophies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.trophy { display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1.2; }
.trophy b { font-family: var(--serif); font-size: 13px; }
.trophy > span:last-child { font-size: 11px; color: var(--muted); }
.trophy-medal { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; margin-bottom: 6px; background: var(--c); box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent); }
.trophy.bronze .trophy-medal { background: linear-gradient(160deg, #d9a877, #a8703f); }
.trophy.silver .trophy-medal { background: linear-gradient(160deg, #d4d6da, #8e9299); }
.trophy.gold .trophy-medal { background: linear-gradient(160deg, #e6c98a, #b38a45); }
.trophy-medal svg { width: 26px; height: 26px; }

/* animals */
.animals { display: flex; align-items: center; gap: 18px; }
.animal-big { width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 46px; transition: background-color .4s; }
.animal-big.pop { animation: tbump .55s var(--spring); }
.animal-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; flex: 1; }
.animal-grid button { aspect-ratio: 1; font-size: 19px; border-radius: 9px; transition: background .2s, transform .3s var(--spring); }
.animal-grid button:hover { background: rgba(0,0,0,.05); }
.animal-grid button:active { transform: scale(.88); }
.animal-grid button[aria-checked="true"] { background: #fff; box-shadow: 0 0 0 1.5px var(--gold); }

/* iOS 26 glass vs iOS 18 painted */
.ios-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ios-col { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 0 14px; border-radius: 18px; background: linear-gradient(150deg, #e11d48, #9f1239); }
.ios-pill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; color: #fff; font-family: var(--sans); font-size: 17px; }
.ios-pill svg { width: 17px; height: 17px; }
.ios-painted { background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18); }
.ios-k { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.8); }

@media (max-width: 860px) {
  .areas { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .dash-demo { grid-template-columns: 1fr; }
  .dash-card + .dash-card { display: none; }
  .areas { grid-template-columns: 1fr; }
  .area-text span { white-space: normal; }
}
.final .proof { font-size: 15px; color: var(--muted); max-width: 46ch; margin: -18px auto 36px; }
