/*
 * tarshal.com — the holding site.
 *
 * Not the app's stylesheet: this is static, served from its own project, and
 * importing the product's tokens would tie a marketing deploy to a product
 * deploy. The palette is copied from src/lib/tokens.ts so the two look like
 * the same company, and there is little enough of it that drift is not a real
 * risk.
 */

:root {
  --paper: #f7f7f5;
  --ink: #131417;
  --secondary: #3f434a;
  --muted: #565b64;
  --faint: #8b9097;
  --hairline: rgba(19, 20, 23, 0.11);
  --gutter: 40px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  /* Melange Grotesk is licensed for the app, not for a static site that would
     have to serve the file publicly, so a neutral grotesk stands in until the
     real marketing site is designed. */
  font-family: 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Full-bleed chrome: the header and footer run the width of the window, held
   off the edges by the gutter rather than by a centred column. */
header,
footer {
  width: 100%;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

header {
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  height: 21px;
  width: auto;
  display: block;
  color: var(--ink);
}

.signin {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 13px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  transition: color 0.14s ease, border-color 0.14s ease;
}

.signin:hover {
  color: var(--ink);
  border-color: rgba(19, 20, 23, 0.28);
}

main {
  flex: 1;
  width: 100%;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  display: flex;
  flex-direction: column;
}

/* ── The landing centrepiece ────────────────────────────────────────────── */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding: 56px 0;
}

/*
 * The mark, and the fault in it.
 *
 * At rest it is simply the logo, large. `is-glitching` is added by a script at
 * uneven intervals — a CSS loop would tick like a metronome, and a fault that
 * arrives on the beat reads as decoration rather than as something failing.
 *
 * The displacement is small and the drop-outs are brief: it should register at
 * the edge of attention, as a screen losing signal does, not demand it. Two
 * offset copies behind it give the colour separation of a bad feed, drawn with
 * drop-shadow so no extra markup is needed.
 */
.stage .mark {
  width: clamp(112px, 19vw, 272px);
  height: auto;
  color: var(--ink);
  display: block;
}

.stage .mark.is-glitching {
  animation: signal-loss 0.42s steps(1, end) infinite;
}

@keyframes signal-loss {
  0%   { opacity: 1;    transform: none; filter: none; }
  12%  { opacity: 0.28; transform: translate3d(-7px, 1px, 0); }
  22%  { opacity: 1;    transform: translate3d(5px, -2px, 0) skewX(-7deg);
         filter: drop-shadow(4px 0 rgba(0, 122, 255, 0.55)) drop-shadow(-4px 0 rgba(255, 46, 46, 0.45)); }
  34%  { opacity: 0.6;  transform: translate3d(-3px, 0, 0); filter: none; }
  46%  { opacity: 1;    transform: none; }
  58%  { opacity: 0.12; transform: translate3d(6px, 2px, 0) scaleY(0.97); }
  68%  { opacity: 1;    transform: translate3d(-4px, 0, 0);
         filter: drop-shadow(-3px 0 rgba(0, 122, 255, 0.4)); }
  80%  { opacity: 0.75; transform: none; filter: none; }
  100% { opacity: 1;    transform: none; filter: none; }
}

/* ── Prose (privacy, terms) ─────────────────────────────────────────────── */
.prose {
  max-width: 44rem;
  /* Not full width: a legal document at 1600px is a line nobody can track
     back to the start of. The chrome is full-bleed; the reading is not. */
  margin: 0;
  padding: 64px 0 96px;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 16px;
  text-wrap: balance;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 34px 0 10px;
}

.prose p {
  margin: 0 0 14px;
  color: var(--secondary);
  font-size: 15px;
}

.prose ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--secondary);
  font-size: 15px;
}

.prose li {
  margin-bottom: 6px;
}

a {
  color: var(--ink);
}

.updated {
  font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 32px;
}

.card {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 18px 20px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--secondary);
}

.card strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}

.card a {
  color: var(--secondary);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--hairline);
  padding-top: 13px;
  padding-bottom: 15px;
  font-size: 11.5px;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

footer nav {
  display: flex;
  gap: 18px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--ink);
}

@media (max-width: 620px) {
  :root {
    --gutter: 22px;
  }
  h1 {
    font-size: 27px;
  }
}

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