/*
 * Shared styles for the Bikn public site.
 *
 * Scope note: CLAUDE.md's "light background only, never dark mode" rule is a
 * product decision about the crisis app — older, low-vision, and panicked
 * users read dark-on-light better mid-incident. This site is marketing/legal
 * reading, not the crisis flow, and product direction (2026-08-25) is a
 * deliberate dark-tech identity here: a single committed midnight-blue palette,
 * not a light default with a dark media-query fallback. It stays a considered
 * choice rather than an inversion-for-its-own-sake — every token below is
 * picked, not auto-flipped, and the app's own primary blue hue is kept
 * recognizable, just brightened for contrast against the dark ground.
 */

:root {
  --bg: #0a0e1c;
  --bg-subtle: #060811;
  --surface: #121a2e;
  --surface-strong: #17213a;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f6f8ff;
  --text-muted: #9fb0ce;
  --accent: #3d8bff;
  --accent-bright: #7ab4ff;
  --accent-hover: #7ab4ff;
  --mint: #3ddc97;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);

  --measure: 68ch;
  --pad-x: clamp(1.25rem, 5vw, 2rem);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Keyboard users get a visible focus ring everywhere, not just on links. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

a:hover {
  color: var(--accent-hover);
}

/* Skip link — visually hidden until focused. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  z-index: 10;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

.skip-link:focus {
  left: var(--pad-x);
  top: 0.75rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.site-header__inner,
.site-footer__inner,
.page {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand svg {
  display: block;
  flex: none;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent);
}

/* Marks the page you're already on, for orientation. */
.site-nav a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Page body ---------- */

.page {
  padding-block: clamp(2.5rem, 8vw, 4rem) clamp(3rem, 9vw, 5rem);
}

h1 {
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
  font-weight: 650;
}

.effective-date {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0.75rem 0 0;
}

.lede {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin: 1.25rem 0 0;
}

p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.page > p:first-of-type,
h2 + p {
  margin-top: 0;
}

/* Sits under the h1 as a rule, not a heavy divider. */
.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0 0;
}

/* ---------- Policy tables, lists and address blocks ---------- */

/*
 * The Privacy Policy carries three two-column tables (what is processed,
 * who receives it, how long it is kept). Real <table> markup with row
 * headers so a screen reader announces the label with each cell; on a
 * narrow screen the two columns stack rather than shrink.
 */
.policy-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.policy-table th,
.policy-table td {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.policy-table thead th {
  border-top: 0;
  padding-top: 0;
  color: var(--text);
  font-weight: 650;
}

.policy-table tbody th {
  color: var(--text);
  font-weight: 600;
  padding-right: 1.25rem;
  width: 42%;
}

.policy-table td {
  color: var(--text-muted);
}

@media (max-width: 40rem) {
  .policy-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .policy-table tr,
  .policy-table th,
  .policy-table td {
    display: block;
  }
  /* Same specificity as the desktop rule above, so the 42% column width
     actually yields here instead of wrapping labels into a narrow strip. */
  .policy-table tbody th {
    width: auto;
    padding-bottom: 0.25rem;
    padding-right: 0;
  }
  .policy-table td {
    border-top: 0;
    padding-top: 0;
  }
}

.policy-list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

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

.policy-list strong,
p strong {
  color: var(--text);
  font-weight: 600;
}

.policy-address {
  font-style: normal;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

/* ---------- Landing page cards ---------- */

.card-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1875rem;
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.card__cue {
  display: inline-block;
  margin-top: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ---------- Contact Information block ---------- */

/*
 * Mirrors the contactCard styles in app/privacy.tsx: a soft rounded surface
 * that sets the registered contact details apart from the policy prose,
 * without a divider or a hard rule. Reuses the same --surface/--border tokens
 * as .card so it inherits light and dark themes for free.
 */
.contact-card {
  margin-top: 1rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.contact-card p {
  margin: 0;
}

.contact-card__company {
  font-weight: 700;
  color: var(--text);
}

.contact-card__label {
  margin-top: 1rem !important;
  font-size: 0.875rem;
  font-weight: 700;
}

/* ---------- Pending-value marker ---------- */

/*
 * Deliberately loud. This marks a legal value that is not yet confirmed —
 * see public-site/README.md. A fabricated address would be worse than a
 * visible gap, and a quiet one would ship unnoticed.
 */
.pending {
  background: #3b2f0b;
  color: #fde68a;
  border: 1px dashed #a16207;
  border-radius: 6px;
  padding: 0.0625rem 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  gap: 1.25rem;
}

.site-footer a {
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}
