/* The day pages on learn.docuria.app. Builds on the store site's style.css (tokens, header, buttons, footer) and app.css (.wrap, .shot, .feat, .facts). */

:root { --gut: clamp(1rem, 4vw, 3rem); }
html { scroll-padding-top: 4.5rem; }
body.learn { overflow-x: clip; }
.learn main { display: block; }
.learn a:not(.btn):not(.wordmark):not(.next):not(.days a) { text-underline-offset: 0.2em; text-decoration-color: var(--rule); }
.learn a:not(.btn):hover { text-decoration-color: currentColor; }

/* Skip link */
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 20; padding: 0.6rem 1rem; background: var(--ink); color: var(--bg); border-radius: 0.4rem; }
.skip:focus { top: 0.6rem; }

/* Header: the wordmark and the switch stay on one line at phone width */
.learn .top { gap: 0.8rem; padding: 0.7rem var(--gut); }
.learn .top .controls { gap: 0.5rem; }
.learn .top .btn.small { display: inline-flex; white-space: nowrap; }

/* Hero */
.learn-hero { padding: 2rem 0 1.5rem; max-width: 46rem; margin-inline: 0; }
.days { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0 0 2rem; padding: 0; }
.days a {
  display: inline-flex; align-items: center; height: 2.2rem; padding: 0 0.85rem;
  border: 1px solid var(--rule); border-radius: 1.1rem;
  font-size: 0.85rem; color: var(--muted); text-decoration: none;
}
.days a:hover { background: var(--rule); color: var(--ink); }
.days a[aria-current='page'] { background: var(--ink); color: var(--bg); border-color: transparent; }
.kicker { font-size: 0.9rem; font-weight: 500; color: var(--ink); margin: 0 0 0.6rem; }
.learn-hero h1 {
  font-size: clamp(2.3rem, 8vw, 4.6rem); line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 1.2rem; text-wrap: balance;
}
.learn-hero .lead { max-width: 38rem; }
.replaces { font-size: 0.95rem; color: var(--muted); max-width: 38rem; padding-left: 0.9rem; border-left: 2px solid var(--rule); }
.learn-hero .cta { margin: 1.6rem 0 0.8rem; }
.learn-hero .fine { margin: 0; }

/* Feature sections */
.learn .feat { padding: 2.4rem 0; gap: 1.6rem; align-items: start; }
.learn .feat h2 { font-size: clamp(1.8rem, 5.2vw, 2.7rem); }
.learn .feat .lead { margin-bottom: 0.4rem; }
.learn .facts li { font-size: 0.97rem; }
.learn .facts li strong { color: var(--ink); font-weight: 500; }
.learn .caution { margin: 1rem 0 0; font-size: 0.9rem; color: var(--faint); padding-left: 0.9rem; border-left: 2px solid var(--rule); }
@media (min-width: 821px) {
  .learn .feat { padding: 3.2rem 0; gap: clamp(2rem, 4vw, 4rem); }
  .learn .feat .clip { position: sticky; top: 5rem; }
}

kbd {
  display: inline-block; padding: 0 0.35em; min-width: 1.6em; text-align: center;
  font: 500 0.88em/1.5 var(--sans); color: var(--ink);
  border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 0.3rem;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  white-space: nowrap;
}

/* A table of numbers, kept small */
.spec { width: 100%; max-width: 30rem; border-collapse: collapse; margin: 0.8rem 0 0.4rem; font-size: 0.93rem; }
.spec caption { text-align: left; color: var(--muted); padding-bottom: 0.4rem; }
.spec th, .spec td { text-align: left; padding: 0.45rem 0; border-top: 1px solid var(--rule); font-weight: 400; color: var(--muted); }
.spec td { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Clip slots: the still is always there; a clip replaces it only when the file exists (learn.js) */
.clip { margin: 0; }
.clip-frame { position: relative; }
.clip video {
  display: none; width: 100%; height: auto; aspect-ratio: 2160 / 1453; object-fit: contain;
  border-radius: 0.6rem; background: color-mix(in srgb, var(--ink) 6%, var(--bg));
  box-shadow: 0 1px 0 var(--rule), 0 24px 40px rgba(20, 24, 32, 0.2);
}
.clip.has-video video { display: block; }
.clip.has-video .clip-frame > img { display: none !important; }
.clip-toggle {
  position: absolute; right: 0.6rem; bottom: 0.6rem; display: none;
  height: 2.2rem; padding: 0 0.9rem; border: 1px solid var(--rule); border-radius: 1.1rem;
  background: var(--panel); color: var(--ink); font: 500 0.85rem/1 var(--sans); cursor: pointer;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.clip.has-video.autoplaying .clip-toggle { display: inline-flex; align-items: center; }
.clip figcaption { margin-top: 0.8rem; }

/* Try it yourself */
.try, .recap, .closing { padding: 2.6rem 0; border-top: 1px solid var(--rule); }
.try h2, .recap h2, .closing h2 { font-size: clamp(1.8rem, 5.2vw, 2.7rem); margin-bottom: 1rem; }
.try-steps { counter-reset: s; list-style: none; margin: 1.2rem 0 0; padding: 0; max-width: 44rem; }
.try-steps li {
  counter-increment: s; position: relative; padding: 0.85rem 0 0.85rem 3rem;
  border-top: 1px solid var(--rule); color: var(--ink); line-height: 1.5;
}
.try-steps li:last-child { border-bottom: 1px solid var(--rule); }
.try-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0.75rem; width: 2rem; height: 2rem;
  display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%;
  font-size: 0.9rem; color: var(--muted); font-variant-numeric: tabular-nums;
}

/* Quick summary */
.recap .box { max-width: 44rem; padding: 1.2rem 1.3rem 0.6rem; border: 1px solid var(--rule); border-radius: 0.9rem; background: var(--panel); }
.recap .facts { margin-top: 0.2rem; }
.recap .facts li:first-child { border-top: 0; }

/* Next day */
.next {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 44rem; margin: 0 0 3rem; padding: 1.2rem 1.3rem;
  border: 1px solid var(--rule); border-radius: 0.9rem; text-decoration: none; color: var(--ink);
  transition: background-color 0.2s;
}
.next:hover { background: var(--rule); }
.next small { display: block; color: var(--faint); font-size: 0.85rem; margin-bottom: 0.2rem; }
.next strong { font: 400 clamp(1.3rem, 4.4vw, 1.8rem)/1.15 var(--serif); letter-spacing: -0.01em; }
.next em { display: block; margin-top: 0.4rem; font-style: normal; font-size: 0.95rem; line-height: 1.4; color: var(--muted); }
.next svg { flex: none; width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Day 5: licence and price */
.price-box { max-width: 44rem; margin: 1.2rem 0; padding: 1.1rem 1.3rem; border: 1px solid var(--rule); border-radius: 0.9rem; background: var(--panel); }
.price-box[hidden] { display: none; }
.price-box .price-name { margin: 0 0 0.4rem; font-weight: 500; color: var(--ink); }
.price-box .amount { margin: 0; font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 1; }
.price-box .price-note { margin: 0.6rem 0 0; font-size: 0.93rem; }
.closing .cta { margin: 1.4rem 0 0.8rem; }

.learn .foot { padding: 3rem var(--gut) 3rem; margin-top: 1rem; }

@media (max-width: 560px) {
  .learn .top .btn.small { padding: 0 0.8rem; }
  .learn .top .wordmark { font-size: 1.2rem; }
  .days { gap: 0.3rem; }
  .days a { padding: 0 0.6rem; }
  .try-steps li { padding-left: 2.6rem; }
  .next { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .next, .days a, .btn { transition: none; }
}
