/*
 * tezzvo.com — the homepage's own rules (STUDIO5): today's sheet, the Apps
 * rows and How we work. Linked only by site/index.html, after
 * /assets/tezzvo-2026-10.css, whose tokens and shell it builds on. Kept apart
 * so each stylesheet stays inside the 24 KB budget (report §9.1) and so a
 * change here never touches the file every other page caches. index.html
 * links it with a ?v= query; bump it whenever this file changes.
 */

/* Below this width the masthead's nav wraps under the wordmark (93 px tall
   at 360 px), so anchors need more clearance than --header-h gives. */
@media (max-width: 30rem) {
  html {
    scroll-padding-top: 6.6rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-hero {
  padding-block: clamp(2.5rem, 8vw, 5.5rem) clamp(3rem, 8vw, 5.5rem);
}

.home-hero__grid {
  display: grid;
  gap: clamp(2.5rem, 7vw, 4rem);
  align-items: center;
}

@media (min-width: 60rem) {
  .home-hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 4rem;
  }
}

.home-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  max-width: 15ch;
}

.home-hero__lede {
  margin-top: 1.25rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34rem;
}

.home-hero .btn-row {
  margin-top: 2rem;
}

/* The other languages of this page (STUDIO7), under the button. */
.langs {
  margin-top: 1rem;
  font-size: var(--small);
  color: var(--ink-2);
}

.langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.3rem;
  font-weight: 600;
}

/* ---- The pad ----
   Every sheet sits in one grid cell, so the stack is as tall as its tallest
   sheet and a tear never changes the page height. The sheets underneath
   show only as flat edges, 6 px apart: the one depth the studio uses. */

.pad {
  --num: clamp(7rem, 24vw, 15rem);
  --edge: 6px;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  padding-bottom: calc(var(--edge) * 3);
}

.pad__stack {
  display: grid;
}

.sheet {
  --binding: #c8102e;
  --d: 0;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 3px;
  transform: translateY(calc(var(--d) * var(--edge)));
  z-index: calc(10 - var(--d));
  transform-origin: 50% 0;
}

.sheet[data-depth="1"] {
  --d: 1;
}
.sheet[data-depth="2"] {
  --d: 2;
}
.sheet[data-depth="3"] {
  --d: 3;
}
.sheet[data-depth="4"] {
  --d: 4;
}

/* White caps on each binding: #C8102E 5.9:1, Topper10 6.0:1, Stet 5.8:1,
   SAT 6.3:1 (DESIGN.md). The red binding stays #C8102E in dark too, where
   --red lightens for the numeral. */
.sheet[data-sheet="topper10"] {
  --binding: var(--p-topper10);
}
.sheet[data-sheet="stet"] {
  --binding: var(--p-stet);
}
.sheet[data-sheet="sat"] {
  --binding: var(--p-sat);
}
.sheet[data-sheet="crush-sort"] {
  --binding: var(--p-crushsort, #3d4b5f);
}

.sheet__binding {
  position: relative;
  display: flex;
  justify-content: flex-end;
  min-height: 2.75rem;
  margin: -1px -1px 0;
  padding-inline: 0.5rem;
  background: var(--binding);
  border-radius: 3px 3px 0 0;
}

.sheet__tear {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: var(--small);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.sheet__tear[hidden] {
  display: none;
}

/* The whole binding strip is the button's hit area. */
.sheet__tear::after {
  content: "";
  position: absolute;
  inset: 0;
}

.sheet__tear:hover span {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.sheet__tear:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: -5px;
}

.sheet__glyph {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.sheet__face {
  flex: 1;
  padding: 1.25rem 1.5rem 1.5rem;
}

/* The date. Without script the numeral is the word "Today" (a static page
   can never show a wrong date); the box is sized for the numeral either way,
   so the swap does not move anything below it. */
.date {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-height: calc(var(--num) * 0.8);
  margin: 0;
  max-width: none;
}

.date__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--num);
  line-height: 0.8;
  color: var(--red);
}

span.date__num {
  font-size: clamp(4.5rem, 17vw, 7.5rem);
}

.date__cap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  padding-bottom: 0.15rem;
}

.date__cap[hidden] {
  display: none;
}

.date__cap span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2rem);
  line-height: 1;
  color: var(--ink);
}

.date__cap span:last-child {
  margin-top: 0.35rem;
  font-size: var(--small);
  color: var(--ink-2);
}

/* The perforation, where the sheet tears. */
.sheet__perf {
  margin: 1.25rem -1.5rem 0.5rem;
  border-top: 1px dashed var(--rule);
}

.today {
  list-style: none;
  margin: 0;
  padding: 0;
}

.today li + li {
  border-top: 1px solid var(--rule);
}

.today a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.6rem;
  min-height: 44px;
  padding-block: 0.6rem;
  color: var(--ink-2);
  text-decoration-color: transparent;
}

.today a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.today__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.1;
  color: var(--ink);
}

.sheet__name {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 7vw, 3rem);
  line-height: 0.95;
  text-wrap: balance;
}

.sheet__kind {
  font-size: var(--small);
  color: var(--ink-2);
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--rule);
}

.sheet__links {
  margin: 0;
}

.sheet__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

/* The tear: about 450 ms, the sheet pivots up from its binding with a slight
   rotation and fades, while the stack beneath slides up an edge in 320 ms.
   Reduced motion swaps instantly (the script skips the animation too). */
@media (prefers-reduced-motion: no-preference) {
  .pad.is-live .sheet {
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .pad .sheet.is-reset {
    transition: none;
  }

  .sheet.is-torn {
    z-index: 20;
    animation: sheet-tear 450ms cubic-bezier(0.55, 0, 0.75, 0.35) forwards;
  }
}

@keyframes sheet-tear {
  0% {
    transform: none;
    opacity: 1;
  }
  30% {
    transform: perspective(1200px) rotateX(-14deg) rotate(-1deg);
    opacity: 1;
  }
  100% {
    transform: perspective(1200px) translate(-3%, -42%) rotateX(-38deg)
      rotate(-6deg);
    opacity: 0;
  }
}

/* ---- Sections ---- */

.home-section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
  border-top: 1px solid var(--rule);
}

.home-section__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.75rem;
}

/* ---- Apps: rows, not cards ----
   Icon, name and kind, one sentence, a facts label, links. A fourth app is
   one more row. */

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.app {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: center;
  padding-block: 1.75rem 2rem;
  border-bottom: 1px solid var(--rule);
}

.app__icon {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
}

.app__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  line-height: 1;
}

.app__name a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration-color: transparent;
}

.app__name a:hover {
  text-decoration-color: var(--ink);
}

.app__kind {
  margin: 0.35rem 0 0;
  font-size: var(--small);
  color: var(--ink-2);
}

.app__body {
  grid-column: 1 / -1;
}

.app__what {
  margin-bottom: 1.25rem;
}

.app__facts {
  display: grid;
  margin: 0;
  max-width: 44rem;
  font-size: var(--small);
  border-top: 1px solid var(--rule);
}

.app__facts > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--rule);
}

.app__facts dt {
  color: var(--ink-2);
}

.app__facts dd {
  margin: 0;
  color: var(--ink);
}

.app__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 1.25rem 0 0;
}

.app__links a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (min-width: 48rem) {
  .app {
    grid-template-columns: 4.5rem 15rem minmax(0, 1fr);
    align-items: start;
    gap: 0 2rem;
    padding-block: 2.25rem 2.5rem;
  }

  .app__icon {
    width: 4.5rem;
    height: 4.5rem;
  }

  .app__head {
    padding-top: 0.2rem;
  }

  .app__body {
    grid-column: auto;
  }
}

.apps__note {
  margin-top: 1.25rem;
  font-size: var(--small);
  color: var(--ink-2);
}

/* ---- How we work ---- */

.principles {
  display: grid;
  gap: 2rem;
  margin: 0;
}

@media (min-width: 52rem) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

.principle {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.principle dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.principle dd {
  margin: 0;
  color: var(--ink-2);
}
