/* The tutorial "Create slides with interactive 3D": components over the docs theme of lhtml-site
   (the same as the documentation of lhtml-site, where they come from). */

/* the home page */
.hero { padding: 8px 0 4px; }
.hero-kicker {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent-text); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px;
}
.page-home article h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -.02em; margin: .45em 0 .35em; }
.hero-lead { font-size: 18.5px; color: var(--text-soft); max-width: 40em; margin: 0 0 1.2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.6em; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none !important;
  border: 1px solid var(--border-strong); color: var(--text); background: var(--bg-elev);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { filter: brightness(1.05); }

/* three boxes side by side: the steps of the principle */
.outputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1.2em 0 1.6em; }
.output { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--bg-soft); }
.output-name { font-weight: 700; margin-bottom: 2px; }
.output p { margin: 0; font-size: 14.5px; color: var(--text-soft); }

/* links to the pages, as cards */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 1em 0 1.6em; }
.card {
  display: block; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  color: inherit !important; text-decoration: none !important; background: var(--bg-elev);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.card-step { font-size: 12px; font-weight: 700; color: var(--accent-text); letter-spacing: .05em; text-transform: uppercase; }
.card-title { font-weight: 700; font-size: 16.5px; margin: 2px 0 3px; }
.card p { margin: 0; font-size: 14.5px; color: var(--text-soft); }
@media (max-width: 720px) { .outputs, .cards { grid-template-columns: 1fr; } }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 1.2em 0 1.6em; }
.shots .figure { margin: 0; }
.shots.one { grid-template-columns: 1fr; max-width: 680px; }
.shots img { border: 1px solid var(--border); border-radius: 8px; display: block; width: 100%; }
.shots figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } }

/* a screenshot that opens the live page */
a.demo { position: relative; display: block; }
a.demo::after {
  content: attr(data-label) ' ↗'; position: absolute; top: 8px; right: 8px;
  font: 600 12px/1.6 inherit; color: #fff; background: var(--accent);
  border-radius: 5px; padding: 0 7px; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
a.demo:hover img { border-color: var(--accent); }

/* a live demo in the page itself, with the buttons that drive it */
.live { margin: 1.2em 0 1.6em; }
.live iframe { display: block; width: 100%; aspect-ratio: 16 / 8; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.live-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; }
.live-controls button {
  font: inherit; font-size: 14.5px; padding: 5px 14px; cursor: pointer; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg-elev); color: var(--text);
}
.live-controls button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.live-controls .value { font-weight: 700; color: var(--accent-text); }
.live-note { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

/* a box in a page: <div class="callout"><div class="callout-title">...</div> markdown </div>; .warn for a trap */
.callout {
  margin: 1.2em 0; padding: 10px 16px 2px; border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft);
}
.callout.warn { border-left-color: #d97706; background: color-mix(in srgb, #d97706 8%, var(--bg)); }
.callout-title { font-weight: 700; margin-top: 4px; }
.callout > :last-child { margin-bottom: 10px; }

/* the top of a page: what it needs, how long, what you get */
.needs {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 1.4em; padding: 8px 14px;
  font-size: 14.5px; color: var(--text-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.needs strong { color: var(--text); }

/* tables */
article.doc th { background: var(--bg-soft); font-weight: 650; color: var(--text-soft); }
article.doc tbody tr:nth-child(even) td { background: var(--bg-soft); }

/* the link to the other language, in the top bar (site.js) */
.lang-switch { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-decoration: none !important; width: auto; padding: 0 8px; }

/* a whole presentation, live in the page (16:9) */
.live.talk iframe { aspect-ratio: 16 / 9; }
.talk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0.8em 0 1.2em; }

/* the block at the top of an example page: download, open the slide in each tool */
.get { border: 1px solid var(--border, #e5e7eb); border-left: 4px solid var(--accent, #2563eb); border-radius: 8px; padding: 12px 18px 6px; margin: 1em 0 1.4em; }
.get-title { font-weight: 700; font-size: 1.05em; margin-bottom: 4px; }
.get p { margin: 0.3em 0 0.6em; }
.get-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0.4em 0 0.8em; }
.get .needs { border: 0; padding: 0; margin: 0 0 6px; background: none; }

/* two demos side by side (example 9) */
.live.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live.pair iframe.demo { aspect-ratio: 4 / 3; height: auto; }
.live-controls input[type=range] { width: 200px; vertical-align: middle; }
