/*
 * Passmark website (issue #31): the app's evening-sea look. The same still scene as the app (white cliffs, a
 * lighthouse and a ferry at sunset, /scene.svg) behind every page, dark glass under all text, the app's colour tokens
 * and Plus Jakarta Sans. One look, whatever the device is set to. Nothing moves: no animation, no transitions.
 * Text never sits straight on the scene: on wide screens the bright sunset is behind the middle of the page, so
 * every text block is on glass (tests/look.test.ts checks 4.5:1 over the brightest part of the scene).
 */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2-variations"), url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2-variations"), url("/fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The app's tokens (src/styles.css), same names and values. */
:root {
  --background: #061331;
  --surface: #121b30;
  --surface-translucent: rgba(6, 16, 34, 0.62);
  --glass: rgba(14, 22, 40, 0.76);
  --glass-strong: rgba(14, 22, 40, 0.84);
  --ink: #f1efec;
  --ink-strong: #ffffff;
  --ink-muted: #c3cbd6;
  --ink-soft: #b9c3d0;
  --ink-faint: #a9b4c3;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --primary: #4cc9ee;
  --on-primary: #062033;
  --accent: #ff6f7e;
  --accent-strong: #ff6f7e;
  --on-accent: #2a0a10;
  --accent-text: #ff8f9b;
  --accent-soft: rgba(255, 111, 126, 0.16);
  --accent-soft-ink: #ffb3bb;
  --accent-border: rgba(255, 111, 126, 0.45);
  --ocean: #4cc9ee;
  --ocean-text: #7fdcf7;
  --ocean-border: rgba(76, 201, 238, 0.32);
  --ocean-soft: rgba(76, 201, 238, 0.14);
  --success: #2fd39a;
  --on-success: #062a1d;
  --success-soft: rgba(47, 211, 154, 0.14);
  --success-ink: #3fe8b0;
  --bad-soft: rgba(255, 111, 126, 0.18);
  --bad-ink: #ffb3bb;
  --good-tint: rgba(63, 232, 176, 0.12);
  --bad-tint: rgba(255, 111, 126, 0.12);
  --warning: #f5b54a;
  --warning-ink: #f8c77a;
  --neutral-soft: rgba(255, 255, 255, 0.08);
  --tile-a: #1d3a6e;
  --tile-b: #0a1736;
  --radius-card: 20px;
  --shadow-card: 0 24px 50px -28px rgba(0, 0, 0, 0.7);
  --shadow-hero: 0 0 0 5px rgba(255, 111, 126, 0.1), 0 18px 40px -22px rgba(255, 111, 126, 0.55);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--background);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Clear, so the scene (z-index -1, behind the body) shows; the page colour is on html. */
  background: transparent;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

/*
 * The evening sea, as in the app: fixed behind the page, anchored at the bottom so the cliffs, the lighthouse and
 * the horizon stay in view at any size, under the app's scrim. Decorative, never in the way of a tap.
 */
.sea {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--background) url("/scene.svg") 50% 100% / cover no-repeat;
}
.sea::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 19, 49, 0.55) 0%,
    rgba(6, 19, 49, 0.3) 40%,
    rgba(6, 19, 49, 0.5) 60%,
    rgba(6, 19, 49, 0.7) 72%,
    rgba(6, 19, 49, 0.7) 88%,
    rgba(6, 19, 49, 0.45) 100%
  );
}

a {
  color: var(--ocean-text);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--ocean);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
p {
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 20;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
}
.skip:focus {
  top: 12px;
}

/* Glass header, like the app's top bar (a little darker: it carries the links). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink-strong);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--tile-a) 0%, var(--tile-b) 100%);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.top-nav {
  display: flex;
  gap: 4px;
}
.top-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.top-nav a:hover {
  color: var(--ink);
  background: var(--neutral-soft);
}
.top-nav a[aria-current="page"] {
  color: var(--ink-strong);
  background: var(--neutral-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

main {
  flex: 1 0 auto;
  padding-top: 24px;
  padding-bottom: 40px;
}

/* Dark glass cards, like the app's (a touch darker, for long reading over the sunset). */
.card {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.card-hero {
  background: var(--glass-strong);
  border: 1px solid var(--accent-border);
  border-radius: 22px;
  box-shadow: var(--shadow-hero);
}
/* A soft block inside a card (answer rows, features, help topics). */
.tile {
  background: var(--neutral-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* Home */
.hero {
  display: grid;
  gap: 16px;
  align-items: stretch;
}
.hero-text {
  padding: 22px 20px;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.hero h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 52px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink-strong);
}
.accent {
  color: var(--accent-text);
}
.lead {
  font-size: 18px;
  color: var(--ink-muted);
  margin: 16px 0 0;
  max-width: 36rem;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--neutral-soft);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 10px 1px var(--accent);
}

.demo {
  margin: 0;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.demo-caption {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.chip {
  margin: 0;
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ocean-border);
  background: var(--ocean-soft);
  color: var(--ocean-text);
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 10px;
}
.chip svg {
  width: 14px;
  height: 14px;
}
.demo-q {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}
.options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--neutral-soft);
  font-size: 15px;
  font-weight: 500;
}
.option > span:nth-child(2) {
  flex: 1 1 auto;
  min-width: 0;
}
.option.right {
  border: 2px solid var(--success);
  background: var(--good-tint);
}
.option.wrong {
  border: 2px solid var(--accent);
  background: var(--bad-tint);
}
.badge {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.right .badge {
  background: var(--success);
  color: var(--on-success);
}
.wrong .badge {
  background: var(--accent);
  color: var(--on-accent);
}
.badge.letter {
  color: var(--ink);
  border: 1.5px solid var(--ink-faint);
  font-size: 13px;
  font-weight: 800;
}
.option-note {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.right .option-note {
  color: var(--success-ink);
}
.wrong .option-note {
  color: var(--bad-ink);
}
.why {
  border-radius: 16px;
  background: var(--neutral-soft);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-muted);
}
.why p {
  margin: 0;
}
.why-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px !important;
}

.section {
  margin-top: 16px;
  padding: 20px 16px 16px;
}
.section > h2 {
  margin: 0 0 14px 4px;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  color: var(--ink-strong);
}
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.feature {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--neutral-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.feature h3 {
  margin: 2px 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-strong);
}
.feature p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}
.feature strong {
  color: var(--ink);
}
.feature-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ocean-soft);
  color: var(--ocean-text);
}
.feature-icon.green {
  background: var(--success-soft);
  color: var(--success-ink);
}
.feature-icon.coral {
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
}

.callout {
  margin-top: 16px;
  padding: 20px;
}
.callout h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-strong);
}
.callout p {
  margin: 0 0 8px;
  color: var(--ink-muted);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}
.link-arrow:hover {
  text-decoration: underline;
}

/* Text pages: one glass sheet, a readable column centred on wide screens. */
.sheet {
  max-width: 46rem;
  margin: 0 auto;
  padding: 24px 18px 12px;
}
.prose h1 {
  margin: 0 0 6px;
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink-strong);
}
.prose h2 {
  margin: 32px 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-strong);
}
.prose p,
.prose li {
  color: var(--ink-muted);
}
.prose strong {
  color: var(--ink);
}
.prose ul {
  padding-left: 20px;
}
.prose .lead {
  font-size: 17px;
}
.meta {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--ink-faint);
}
.summary,
.qa,
.empty {
  padding: 16px 16px 4px;
  margin: 16px 0;
}
.summary h2,
.qa h2,
.empty h2 {
  margin: 0 0 8px;
  font-size: 18px;
}
.ticks {
  list-style: none;
  padding: 0 !important;
  margin: 0 0 12px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  margin: 8px 0;
  color: var(--ink);
  font-weight: 600;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--success-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233fe8b0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.contact {
  border-color: var(--accent-border);
}
.small {
  font-size: 14px;
  color: var(--ink-faint);
}
.mono {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
}

/* What's changed (issue #7): same rows as the app's "What's changed". */
.changes-page .month h2 {
  margin: 28px 4px 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.changes {
  list-style: none;
  margin: 0;
  padding: 0 16px !important;
}
.change {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  margin: 0 !important;
}
.change + .change {
  border-top: 1px solid var(--line);
}
.change-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.change-icon.fixed {
  background: var(--success-soft);
  color: var(--success-ink);
}
.change-icon.updated {
  background: var(--ocean-soft);
  color: var(--ocean-text);
}
.change-icon.added {
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
}
.change-icon.removed {
  background: var(--neutral-soft);
  color: var(--ink-muted);
}
.change-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.change-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.change-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}
.example {
  color: var(--ink-faint);
  white-space: nowrap;
}
.version {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
}
.changes-page > .small {
  margin-top: 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Glass footer with the not-affiliated line. */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  font-size: 14px;
}
.disclaimer {
  margin: 0 0 12px;
  color: var(--ink-muted);
  max-width: 44rem;
}
.disclaimer strong {
  color: var(--ink);
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 0 -10px;
}
.foot-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.foot-nav a:hover {
  text-decoration: underline;
}
.site-footer .small {
  margin: 8px 0 0;
}

/* Small phones: three header links and the name still fit on one line. */
@media (max-width: 419px) {
  .bar {
    gap: 8px;
  }
  .top-nav {
    gap: 0;
  }
  .top-nav a {
    padding: 0 8px;
    font-size: 14px;
  }
}

@media (min-width: 720px) {
  main {
    padding-top: 40px;
    padding-bottom: 56px;
  }
  .hero-text {
    padding: 32px 30px;
  }
  .section {
    padding: 24px 20px 20px;
  }
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sheet {
    padding: 36px 40px 20px;
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 20px;
  }
  .hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* A feature list inside a text page (the trip tracker page, issue #69): full width, no bullets' indent. */
.prose .features {
  margin: 18px 0 14px;
  padding: 0;
}
.prose .features li {
  margin: 0;
}
