/* ==========================================================================
   Portfolio Dashboard — shared stylesheet for the landing site.

   Every page under website/ links this file. It used to be four near-identical
   copies of the same inline <style> block, which is how privacy.html quietly
   drifted onto a different palette. One file, one set of tokens.

   Colours are chosen to clear WCAG AA (4.5:1) for body text on every surface
   they are used against. If you add a colour, check the ratio before shipping.
   ========================================================================== */

:root {
  --bg: #0a0a0f;
  --bg-alt: #0d0d14;
  --surface: #12121a;
  --surface-2: #1a1a2a;
  --surface-code: #16202c;
  --border: #22222c;
  --border-strong: #33333f;

  --text: #e6e6ea;
  --text-body: #c2c2cd;   /* 11.8:1 on --surface */
  --text-muted: #9a9aa8;  /*  6.4:1 on --surface, 6.8:1 on --bg */

  --accent: #4fc3f7;      /*  9.9:1 on --bg */
  --accent-bg: #12283a;
  --warn: #ffb04d;

  --radius: 12px;
  --radius-sm: 8px;
  --measure: 800px;
  --wide: 1000px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
    'Liberation Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3,
h4 {
  color: var(--text);
  line-height: 1.25;
  text-wrap: balance;
}

strong {
  color: var(--text);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
  background: var(--surface-code);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-body);
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* --- Accessibility helpers ---------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #06121a;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px 24px;
  max-width: var(--wide);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: #fff;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--text);
}

.nav-links a[aria-current='page'] {
  text-decoration: none;
  cursor: default;
}

@media (max-width: 620px) {
  .site-nav {
    justify-content: center;
    padding: 12px 16px;
  }

  .nav-links {
    justify-content: center;
    gap: 6px 16px;
  }
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #06121a;
}

.btn--primary:hover {
  background: #6fd0fa;
}

.btn--secondary {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 72px 20px 48px;
  max-width: var(--measure);
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-body);
  margin-bottom: 28px;
}

.badge {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Sections ------------------------------------------------------------ */

.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 56px 20px;
}

.section--narrow {
  max-width: var(--measure);
}

.section--alt {
  max-width: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--alt > * {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  text-align: center;
}

.subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

/* --- Feature grid -------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  list-style: none;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.feature-icon {
  font-size: 1.5rem;
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

/* --- Pricing ------------------------------------------------------------- */

.plans {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 620px;
  margin: 0 auto;
  list-style: none;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 26px;
  flex: 1;
  min-width: 240px;
  text-align: center;
}

.plan-card--popular {
  border-color: var(--accent);
}

.plan-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.plan-card .price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.plan-card .period {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* Check marks are drawn as a background image so screen readers announce the
   plan feature and nothing else. ::before content would be read out. */
.tick-list {
  list-style: none;
  text-align: left;
}

.tick-list li {
  padding: 6px 0 6px 26px;
  color: var(--text-body);
  font-size: 0.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234fc3f7'%3E%3Cpath d='M7.6 14.2 3.9 10.5l1.4-1.4 2.3 2.3 6.7-6.7 1.4 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 0.55em;
  background-size: 16px 16px;
}

.price-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 24px;
}

/* --- Cards, steps, notes ------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 16px 0;
}

.card h3 {
  font-size: 1.15rem;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card > p:not(:last-child) {
  margin-bottom: 12px;
}

/* Numbered lists that keep their own counter, so nested content can't reset it. */
.steps {
  counter-reset: step;
  list-style: none;
}

.steps > li {
  counter-increment: step;
  padding: 8px 0 8px 36px;
  color: var(--text-body);
  font-size: 0.92rem;
  position: relative;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 24px;
  height: 24px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: 0.75rem;
  font-weight: 600;
}

.step-list {
  list-style: none;
}

.step {
  display: flex;
  gap: 16px;
  margin: 22px 0;
}

.step-num {
  min-width: 36px;
  height: 36px;
  background: var(--accent-bg);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step-body {
  flex: 1;
}

.step-body h3 {
  color: var(--text);
  margin-bottom: 4px;
  font-size: 1rem;
}

.step-body p {
  margin-bottom: 8px;
}

.note {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: var(--text-body);
}

.note--warning {
  border-left-color: var(--warn);
}

.note p + p {
  margin-top: 10px;
}

.note ul,
.note ol {
  margin: 8px 0 0 20px;
}

.bullets {
  margin: 8px 0 8px 20px;
  color: var(--text-body);
  font-size: 0.9rem;
}

.bullets li {
  padding: 3px 0;
}

/* --- Tables -------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin: 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: top;
}

th {
  color: var(--accent);
  font-weight: 600;
}

td {
  color: var(--text-body);
}

caption {
  caption-side: top;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding-bottom: 8px;
}

/* --- Guide pages --------------------------------------------------------- */

.guide {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.guide h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.guide > h2 {
  font-size: 1.4rem;
  margin-top: 40px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 8px;
}

.guide h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin-top: 24px;
  margin-bottom: 8px;
}

.guide p {
  margin-bottom: 12px;
}

.guide .lead {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.guide ul,
.guide ol {
  margin-bottom: 12px;
}

.pager {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

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

.site-footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

/* --- Error page ---------------------------------------------------------- */

.error-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 96px 20px;
  text-align: center;
}

.error-page .code {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.error-page h1 {
  font-size: 1.6rem;
  margin: 12px 0 12px;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* --- Small screens ------------------------------------------------------- */

@media (max-width: 600px) {
  .hero {
    padding: 48px 20px 40px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .plans {
    flex-direction: column;
  }

  .section {
    padding: 44px 16px;
  }

  .guide {
    padding: 24px 16px 48px;
  }

  .step {
    gap: 12px;
  }
}
