/*
 * tezzvo.com — the studio stylesheet (STUDIO4). No build step; hand-authored.
 *
 * Direction: "today's sheet" (docs/site/DESIGN.md). A cool grey pad, white
 * sheets, near-black ink, and one red owned by the studio. Every token below
 * is DESIGN.md's table; every text pair is in its measured-contrast table.
 *
 * Why a new filename: vercel.json caches /assets/* for a day in the browser,
 * so new HTML must never meet a day-old copy of the old file. styles.css is
 * now only the compatibility layer for the pages other repos render (S2).
 *
 * Type comes from /assets/fonts/studio-fonts.css (STUDIO3), linked before
 * this file: it defines --font-display (Big Shoulders) and --font-body
 * (Atkinson Hyperlegible Next) with metric-matched fallbacks.
 */

:root {
  --pad: #e6e7e2;
  --sheet: #ffffff;
  --ink: #15171c;
  --ink-2: #464b52;
  --rule: #c9ccc4;
  --red: #c8102e;

  /* Product bindings. Topper10 binds in Day Desk indigo (white 6.0:1), not
     its in-app #5C6CF5 (4.27:1). */
  --p-topper10: #4453d8;
  --p-stet: #2e6e7e;
  --p-sat: #38657a;
  --p-crushsort: #3d4b5f;

  --maxw: 74rem;
  --measure: 66ch;
  --gutter: 16px;
  --header-h: 4.25rem;
  --small: 0.9375rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --pad: #0f1012;
    --sheet: #1b1d20;
    --ink: #edeee9;
    --ink-2: #a9aeb0;
    --rule: #3a3e42;
    --red: #ff5c5c;
    color-scheme: dark;
  }
}

/* ---- Base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* /#apps and every in-page anchor land below the sticky masthead. */
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--pad);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

* {
  scrollbar-color: var(--rule) transparent;
}

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--ink);
  text-decoration-thickness: 2px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
}

h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

img,
svg {
  max-width: 100%;
}

strong {
  font-weight: 700;
}

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 40rem) {
  :root {
    --gutter: clamp(1.5rem, 4vw, 2.5rem);
  }
}

/* ---- Skip link ---- */

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0.75rem;
  z-index: 30;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--sheet);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ---- Masthead ----
   The red top edge is the pad's binding, the one red the studio wears on
   every page. Solid ground, no blur: depth is never glass here. */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--pad);
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--rule);
}

.masthead__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
  min-height: calc(var(--header-h) - 5px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  min-height: 44px;
  align-self: stretch;
  padding-block: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

/* The wordmark is STUDIO2's option 1a, "Today square": Big Shoulders 900
   lettering, outlined, with one red square on the baseline after the O.
   It is inlined (site/assets/studio/tezzvo-wordmark.svg) so the letters
   take currentColor and the square takes --red in either scheme. The
   viewBox is exactly cap height, so `height` sets the cap. The real word
   stays in the DOM for search and for the link's accessible name. */

.brand__wordmark,
.foot__wordmark {
  display: block;
  height: 1.25rem;
  width: auto;
  aspect-ratio: 362.5 / 100;
  align-self: center;
}

.wordmark__today {
  fill: var(--red);
}

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

.brand__crumb {
  font-size: var(--small);
  color: var(--ink-2);
  align-self: center;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-end: -0.5rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.5rem;
  font-size: var(--small);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

@media (max-width: 47.99rem) {
  .brand__crumb {
    display: none;
  }
}

@media (max-width: 23.5rem) {
  .brand__wordmark {
    height: 1.125rem;
  }
  .nav a {
    padding-inline: 0.4rem;
  }
}

/* ---- Prose documents: privacy, terms, delete, join ----
   The policy is the sheet; the pad shows round it. On phones the sheet runs
   edge to edge so the measure is not squeezed by two margins. */

.doc {
  padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(3rem, 8vw, 5rem);
}

.doc__inner {
  max-width: 50rem;
  margin-inline: auto;
  padding: 2rem var(--gutter) 2.5rem;
  background: var(--sheet);
  border-block: 1px solid var(--rule);
}

@media (min-width: 52rem) {
  .doc__inner {
    padding: 3.5rem 4rem 4rem;
    border: 1px solid var(--rule);
    border-radius: 3px;
  }
}

.doc h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  margin-bottom: 1rem;
}

.doc h2 {
  font-size: clamp(1.6rem, 3.6vw, 2rem);
  font-weight: 700;
  line-height: 1.05;
  margin-top: 2em;
  margin-bottom: 0.6em;
}

.doc h3 {
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.doc ul,
.doc ol {
  max-width: var(--measure);
  padding-left: 1.25rem;
  margin: 0 0 1em;
}

.doc li {
  margin-bottom: 0.5rem;
}

.doc li::marker {
  color: var(--ink-2);
}

/* No monospace in the studio (DESIGN.md). Atkinson Hyperlegible tells
   0/O and 1/l/I apart by design, which is what an invite code needs. */
.doc code {
  font-family: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.doc__meta {
  max-width: none;
  font-size: var(--small);
  color: var(--ink-2);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.doc__meta strong {
  color: var(--ink);
}

.doc__table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-block: 1px solid var(--rule);
}

.doc table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--small);
  font-variant-numeric: tabular-nums;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.doc th {
  font-weight: 700;
  color: var(--ink);
}

.doc tr:last-child td {
  border-bottom: 0;
}

/* A note that must be read first. Ruled above and below like a line on the
   sheet: no box inside the sheet's box. */
.callout {
  margin: 0 0 2rem;
  padding: 1.1rem 0;
  border-block: 2px solid var(--ink);
  max-width: var(--measure);
}

.callout > :last-child {
  margin-bottom: 0;
}

/* ---- Buttons ---- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.btn:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.btn--primary {
  background: var(--ink);
  color: var(--sheet);
}

.btn--ghost {
  border-color: var(--ink-2);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn:disabled {
  cursor: not-allowed;
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-2);
  text-decoration: none;
}

.btn__glyph {
  width: 16px;
  height: 16px;
  flex: none;
}

.btn-row .note {
  font-size: var(--small);
  color: var(--ink-2);
}

/* ---- Product page sections (Topper10) ---- */

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

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

.spec {
  display: grid;
}

.spec__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem 2.5rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--rule);
}

.spec__row:last-child {
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 48rem) {
  .spec__row {
    grid-template-columns: 13rem 1fr;
  }
}

.spec__term {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
}

.spec__def {
  margin: 0;
}

/* One column, then three; never auto-fit (a lone third capture would
   stretch to the container). The cap holds the width the PNG is rastered
   for (scripts/site/web-screenshots.mjs). */
.shots {
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .shots {
    grid-template-columns: repeat(3, 1fr);
  }
}

.shot {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
}

.shot__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 2135;
  border-radius: 10px;
  /* The captures are dark: their own Night Desk floor, not the pad. */
  background: #0a0e1a;
}

.shot figcaption {
  margin-top: 0.85rem;
  font-size: var(--small);
  color: var(--ink-2);
  line-height: 1.5;
  text-wrap: pretty;
}

.faq {
  border-top: 1px solid var(--rule);
  max-width: 52rem;
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 44px;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.faq__sign {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: no-preference) {
  .faq__sign {
    transition: transform 0.15s ease;
  }
}

.faq details[open] .faq__sign {
  transform: rotate(45deg);
}

.faq details > div {
  padding-bottom: 1.25rem;
}

.faq details p:last-child {
  margin-bottom: 0;
}

/* ---- Footer ---- */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 3rem 2.5rem;
  font-size: var(--small);
  color: var(--ink-2);
}

.foot__grid {
  display: grid;
  gap: 2rem 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 52rem) {
  .foot__grid {
    grid-template-columns: 1.3fr 1fr 1.4fr 1.4fr;
  }
}

.foot__studio,
.foot__contact {
  grid-column: 1 / -1;
}

@media (min-width: 52rem) {
  .foot__studio,
  .foot__contact {
    grid-column: auto;
  }
}

.foot__word {
  display: block;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.foot__studio p {
  margin: 0;
}

.foot__head {
  font-family: var(--font-body);
  font-size: var(--small);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.25rem;
}

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

.foot li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration-color: transparent;
}

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

.foot__contact .foot__head {
  margin-bottom: 0.6rem;
}

.foot__contact li + li {
  margin-top: 0.5rem;
}

.foot__contact li a {
  color: var(--ink);
  text-decoration-color: color-mix(in srgb, var(--ink) 45%, transparent);
  overflow-wrap: anywhere;
}

.foot__label {
  display: block;
  line-height: 1.4;
}

.foot__base {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.foot__base p {
  margin: 0;
}

/* ---- /policies (STUDIO6) ----
   One sheet per app, bound along the top in that app's own colour (the only
   place a product colour appears outside its own page). Each document is one
   full-width row that names the document and shows the address it lives at,
   because the address is what a store reviewer is checking. Rows, not cards:
   a fourth app is one more sheet. */

.policies {
  padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 5rem);
}

.policies__inner {
  max-width: 50rem;
}

.policies h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  margin-bottom: 1rem;
}

.policies__lede {
  color: var(--ink-2);
  margin-bottom: clamp(2rem, 5vw, 3rem);
  max-width: 34rem;
}

.pol-sheet {
  --binding: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--binding);
  border-radius: 3px;
  margin-bottom: 1.25rem;
}

.pol-sheet--topper10 {
  --binding: var(--p-topper10);
}

.pol-sheet--stet {
  --binding: var(--p-stet);
}

.pol-sheet--sat {
  --binding: var(--p-sat);
}

.pol-sheet--crushsort {
  --binding: var(--p-crushsort);
}

/* On phones the sheets run edge to edge, as the policy sheets do, so the
   long addresses are not squeezed by two margins. */
@media (max-width: 39.99rem) {
  .pol-sheet {
    margin-inline: calc(var(--gutter) * -1);
    border-inline: 0;
    border-radius: 0;
  }
}

.pol-sheet__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding: 1.25rem var(--gutter) 1rem;
  border-bottom: 1px solid var(--rule);
}

.pol-sheet__head h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1;
}

.pol-sheet__kind {
  margin: 0;
  font-size: var(--small);
  color: var(--ink-2);
}

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

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

.pol-doc {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name go"
    "path go";
  align-items: center;
  column-gap: 1rem;
  min-height: 4rem;
  padding: 0.85rem var(--gutter);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.pol-doc:hover {
  background: color-mix(in srgb, var(--ink) 4%, var(--sheet));
}

.pol-doc:focus-visible {
  outline-offset: -3px;
}

.pol-doc__name {
  grid-area: name;
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s ease;
}

.pol-doc:hover .pol-doc__name {
  text-decoration-color: var(--ink);
}

.pol-doc__path {
  grid-area: path;
  font-size: var(--small);
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.pol-doc__go {
  grid-area: go;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 48rem) {
  .pol-sheet__head,
  .pol-doc {
    padding-inline: 2rem;
  }
  .pol-doc {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
    grid-template-areas: "name path go";
  }
}

.policies__contact {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.policies__contact h2 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.policies__contact p {
  margin: 0;
}

/* ---- 404 (STUDIO6) ----
   The page that is not there is the sheet that has been torn off: all that
   is left is the stub under the binding, its lower edge perforated where it
   tore. A mask, not an image, so it takes the sheet colour in both schemes. */

.lost {
  padding-block: clamp(2.5rem, 8vw, 5rem) clamp(4rem, 12vw, 8rem);
}

.lost__inner {
  max-width: 50rem;
}

/* The red top edge is the pad's binding (DESIGN.md: red is for the binding);
   the holes are the perforation the sheet tore along. */
.lost__stub {
  --hole: 5px;
  --pitch: 16px;
  max-width: 36rem;
  height: 3.75rem;
  margin-bottom: clamp(2.5rem, 7vw, 4rem);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 8px solid var(--red);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--hole)) no-repeat,
    radial-gradient(
      circle at 50% 100%,
      transparent var(--hole),
      #000 calc(var(--hole) + 0.5px)
    )
    bottom / var(--pitch) calc(var(--hole) * 2) repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - var(--hole)) no-repeat,
    radial-gradient(
      circle at 50% 100%,
      transparent var(--hole),
      #000 calc(var(--hole) + 0.5px)
    )
    bottom / var(--pitch) calc(var(--hole) * 2) repeat-x;
}

.lost h1 {
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  margin-bottom: 1.25rem;
}

.lost p {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--ink-2);
  max-width: 34rem;
}

.lost p a {
  color: var(--ink);
}
