/* SturdyShift — marketing/legal site, styled to match the app's own UI
   (system font, white cards, semantic badge colors from theme.ts).
   No single brand accent is locked in yet — pending the app logo — so the
   only "primary" color is the app's actual current primary: black/white. */

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-alt: #f9f9f9;
  --surface-inverse: #000000;
  --on-inverse: #ffffff;

  --ink: #000000;
  --ink-body: #333333;
  --ink-soft: #666666;
  --ink-muted: #888888; /* decorative / large-scale / icon use only, not body text */

  --border: #e0e0e0;
  --border-light: #eeeeee;
  --border-med: #dddddd;

  --link: #1976d2;

  --badge-info-bg: #e3f2fd;
  --badge-info-ink: #1565c0;
  --badge-success-bg: #e8f5e9;
  --badge-success-ink: #1b7f3a;
  --badge-warn-bg: #fff9c4;
  --badge-warn-ink: #8a6d00;
  --badge-danger-bg: #fdecea;
  --badge-danger-ink: #c62828;
  --badge-neutral-bg: #f0f0f0;
  --badge-neutral-ink: #666666;
  --badge-neutral-border: #dddddd;

  --notice-bg: #eef4ff;
  --notice-border: #d9e4fb;
  --notice-accent: #2563eb;
  --notice-ink: #1a2b45;
  --notice-meta: #53627a;

  /* Stamp — kept exactly as designed, independent of the rest of the palette */
  --rust: #9c4221;

  --focus: #1976d2;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", Consolas, monospace;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --surface: #1e1e21;
    --surface-alt: #26262b;
    --surface-inverse: #3a3a42;
    --on-inverse: #ffffff;

    --ink: #f2f2f3;
    --ink-body: #e8e8ea;
    --ink-soft: #a8a8ad;
    --ink-muted: #8a8a90;

    --border: #34343a;
    --border-light: #2a2a2e;
    --border-med: #3a3a40;

    --link: #42a5f5;

    --badge-info-bg: #15293a;
    --badge-info-ink: #42a5f5;
    --badge-success-bg: #16301c;
    --badge-success-ink: #79d98b;
    --badge-warn-bg: #3a3410;
    --badge-warn-ink: #e0b740;
    --badge-danger-bg: #3a1c1c;
    --badge-danger-ink: #f26f65;
    --badge-neutral-bg: #26262b;
    --badge-neutral-ink: #a8a8ad;
    --badge-neutral-border: #3a3a40;

    --notice-bg: #16243a;
    --notice-border: #2a3a55;
    --notice-accent: #5a9cff;
    --notice-ink: #cdd8ec;
    --notice-meta: #b8c6dd;

    --rust: #e59371;

    --focus: #42a5f5;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

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

/* ---- header / footer chrome (matches the app's white nav/tab bar) ---- */

.band {
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
footer.band {
  border-bottom: none;
  border-top: 1px solid var(--border);
}

.band__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-sans);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span {
  color: var(--link);
}

.nav {
  display: flex;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--badge-neutral-bg);
}
.nav a:hover {
  color: var(--ink);
}
.nav a[aria-current="page"] {
  color: var(--on-inverse);
  background: var(--surface-inverse);
}

/* ---- main / card ---- */

main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 48px 20px 72px;
}

.ticket {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -16px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  animation: rise 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ticket__body {
  padding: 36px 32px 40px;
}
@media (max-width: 560px) {
  .ticket__body { padding: 28px 20px 32px; }
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--badge-info-ink);
  background: var(--badge-info-bg);
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 0 16px;
}

.page-title {
  font-family: var(--font-sans);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 18px 0 28px;
}

/* ---- stamp: unchanged by request — the one signature element to keep ---- */
.stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  border: 2px solid var(--rust);
  border-radius: 3px;
  padding: 5px 10px;
  transform: rotate(-3deg);
  display: inline-block;
  animation: stamp-hit 0.4s 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes stamp-hit {
  from { opacity: 0; transform: rotate(-3deg) scale(1.6); }
  to { opacity: 1; transform: rotate(-3deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ticket, .stamp { animation: none; }
}

.lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 28px;
}

.notice {
  font-size: 15px;
  border: 1px solid var(--notice-border);
  background: var(--notice-bg);
  padding: 14px 16px;
  margin: 0 0 32px;
  border-radius: 10px;
}
.notice p { margin: 0; color: var(--notice-ink); }
.notice p + p { margin-top: 8px; }
.notice__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--notice-accent);
  margin-bottom: 6px;
}

.links {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
}
.links a:hover {
  border-color: var(--link);
  color: var(--link);
}
.links a::after {
  content: "→";
  margin-left: auto;
  color: var(--ink-muted);
}
.links a:hover::after {
  color: var(--link);
}

/* ---- legal document content ---- */

.content h1 { display: none; } /* page-title above covers h1 */

.content h2 {
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 36px 0 4px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
.content > h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--link);
  margin: 20px 0 8px;
}
.content h3 strong { color: inherit; }

.content p {
  margin: 0 0 16px;
  max-width: 68ch;
}

.content ul {
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
  max-width: 68ch;
}
.content li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}
.content li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-muted);
}
.content li ul { margin-top: 10px; }

.content blockquote {
  margin: 0 0 24px;
  border: 1px solid var(--notice-border);
  background: var(--notice-bg);
  padding: 14px 16px;
  border-radius: 10px;
  max-width: 68ch;
}
.content blockquote p { margin: 0; font-size: 15px; color: var(--notice-ink); }

.content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 32px 0;
}

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

.content em {
  color: var(--ink-soft);
  font-size: 14px;
}

.content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--badge-neutral-bg);
  padding: 1px 5px;
  border-radius: 4px;
}

.content a {
  color: var(--link);
}

/* ---- footer ---- */

footer.band .band__inner {
  padding: 18px 24px;
  font-size: 13px;
  color: var(--ink-soft);
}
footer.band a {
  color: var(--link);
}
