/* provisorisch.ai — shared stylesheet
   No external assets: system fonts only */

:root {
  color-scheme: light;

  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-body: Georgia, "Times New Roman", "Noto Serif", serif;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;

  --paper: #faf8f4;
  --ink: #22261f;
  --ink-soft: #55594f;
  --tape: #f5c84c;
  --line: #e2ddd2;          /* 1.28:1 – dividers only, decorative */
  --line-strong: #8b8578;   /* 3.46:1 – borders of interactive elements */
  --accent-deep: #3f5c46;   /* 6.99:1 on paper */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* Screen-reader-only text (e.g. the "opens in a new tab" hint) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Fallback focus ring. The rules further down are more specific; this
   one makes sure nothing that can be reached by keyboard is ever left
   without a visible marker. */
:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

/* ---------- Language nav ---------- */
.lang-switch {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* The border is the only thing marking these as controls: the labels
   carry no underline and sit in the same colour as other muted text.
   At 1.28:1 the old --line was below the 3:1 that WCAG 1.4.11 asks of
   a component boundary, so --line-strong is used here. */
.lang-switch a {
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-switch a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.lang-switch a[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.lang-switch a:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

/* ---------- Tape title ---------- */
header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.tape {
  display: inline-block;
  position: relative;
  background: var(--tape);
  padding: 0.9rem 2.2rem 1rem;
  transform: rotate(-1.6deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
}

/* torn tape edges */
.tape::before,
.tape::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  background: var(--tape);
}
.tape::before {
  left: -11px;
  clip-path: polygon(100% 0, 0 8%, 55% 18%, 10% 32%, 60% 45%, 5% 60%, 50% 72%, 15% 86%, 100% 100%);
}
.tape::after {
  right: -11px;
  clip-path: polygon(0 0, 100% 10%, 40% 22%, 92% 36%, 35% 50%, 95% 64%, 45% 78%, 88% 90%, 0 100%);
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.5vw, 2.1rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #2a2410;
}

.subtitle {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Illustration ---------- */
.illustration {
  margin: 0 0 3.25rem;
}

.illustration img {
  display: block;
  width: 100%;
  height: auto;
}

.illustration figcaption {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: balance;
}

/* ---------- Letter body ---------- */
.letter p {
  margin-bottom: 1.4rem;
}

.letter p.pivot {
  font-style: italic;
  color: var(--accent-deep);
}

.letter .highlight {
  font-weight: 600;
}

/* Inline links: underlined in the ink colour, never browser blue */
.letter a,
.people a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  /* Was 0.45, which rendered at 2.08:1 against the paper. The underline
     is what tells these apart from the body text — the link colour on
     its own only reaches 2.07:1 against the ink. 0.7 keeps the soft
     look and clears 3:1. */
  text-decoration-color: rgba(63, 92, 70, 0.7);
  text-underline-offset: 0.18em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.letter a:hover,
.people a:hover {
  text-decoration-color: var(--accent-deep);
}

.letter a:focus-visible,
.people a:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.domain {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(245, 200, 76, 0.28);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  white-space: nowrap;
}

.signoff {
  margin-top: 2.6rem;
}

.signature {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-top: 0.3rem;
}

/* ---------- People note ---------- */
.people {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--line);
}

.people h2 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}

.people dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.people dd {
  margin: 0.2rem 0 1.4rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.people dd:last-child {
  margin-bottom: 0;
}

/* ---------- Divider & footer ---------- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 3.5rem 0 2rem;
  color: var(--ink-soft);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--line);
}
.divider span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}

footer {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  body { font-size: 1.05rem; }
  .page { padding-top: 2rem; }
  .lang-switch { margin-bottom: 3rem; }
  .illustration { margin-bottom: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .lang-switch { display: none; }
  body { background: #fff; font-size: 11pt; }
  .page { max-width: none; padding: 0; }
  .letter a::after,
  .people a::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
}
