/* MyLogacy marketing site
   Palette is the app's `warmPremium` theme, copied verbatim from
   mylogacy-frontend/src/design-system/theme.ts so the site and the product match.
   Every text pair used below was checked against WCAG AA (4.5:1). */

/* ---------- Fonts (self-hosted, no network calls at runtime) ---------- */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: 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-weight: 400 800;
  font-display: swap;
  src: 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;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-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: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-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;
}

/* ---------- Tokens ---------- */

:root {
  --canvas: #fbf8f3;
  --surface: #ffffff;
  --primary: #2c63d4;
  --primary-contrast: #ffffff;
  --primary-deep: #1f4eb0;
  --accent: #f2b705;
  --accent-contrast: #2b2b2b;
  --ink: #2b2b2b;
  --ink-muted: #6b6760;
  --border: #e8e0d2;
  --ivory-100: #f4efe6;
  --mist-50: #f8f3ea;
  --cream-100: #fff6e6;

  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', 'Nimbus Roman', serif;

  --wrap: 68rem;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 18px;
  --shadow: 0 1px 2px rgba(43, 43, 43, 0.05), 0 12px 32px rgba(43, 43, 43, 0.06);
}

/* ---------- Base ---------- */

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

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 6.2vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 2.4vw, 1.3rem);
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
}

p {
  margin: 0 0 1rem;
  max-width: 62ch;
}

a {
  color: var(--primary-deep);
  text-underline-offset: 0.18em;
  text-decoration-thickness: from-font;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 10px 0;
  z-index: 20;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  color: var(--primary-contrast);
}

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

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

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
}

.brand img {
  width: 34px;
  height: auto;
  display: block;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--primary-deep);
  border-bottom-color: var(--accent);
}

@media (max-width: 34rem) {
  .site-nav {
    margin-left: 0;
    width: 100%;
  }
}

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

section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

.section-tint {
  background: var(--ivory-100);
}

.section-warm {
  background: var(--mist-50);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.85rem;
}

.lede {
  font-size: clamp(1.08rem, 2.4vw, 1.28rem);
  color: var(--ink-muted);
  max-width: 46ch;
}

.section-intro {
  max-width: 52ch;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

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

.hero {
  padding-block: clamp(3rem, 9vw, 6rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: auto -10% 40% auto;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44, 99, 212, 0.09), rgba(44, 99, 212, 0) 68%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 58rem) {
  .hero .wrap {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero h1 .accent-rule {
  display: block;
  width: 3.5rem;
  height: 5px;
  border-radius: 3px;
  background: var(--accent);
  margin-bottom: 1.4rem;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
}

.btn-primary:hover {
  background: var(--primary-deep);
  color: var(--primary-contrast);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

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

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

/* ---------- Circle preview card (hero) ---------- */

.circle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  box-shadow: var(--shadow);
}

.circle-card h2 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
}

.circle-card h2:not(:first-child) {
  margin-top: 1.6rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chips li {
  border: 1px solid var(--border);
  background: var(--mist-50);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.chips.chips-event li {
  background: var(--cream-100);
  border-color: #f0e0bc;
}

.circle-card .note {
  margin: 1.5rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ---------- Numbered steps ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.steps > li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
}

.steps > li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.steps h3 {
  margin-bottom: 0.4rem;
}

.steps p:last-child {
  margin-bottom: 0;
}

/* ---------- Split feature block ---------- */

.split {
  display: grid;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 52rem) {
  .split {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .split.split-reverse > *:first-child {
    order: 2;
  }
}

.figure-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
}

.figure-plate svg {
  width: 100%;
  max-width: 20rem;
  height: auto;
}

/* ---------- Plain lists ---------- */

.plain-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  max-width: 62ch;
}

.plain-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.7rem;
}

.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.plain-list strong {
  font-weight: 700;
}

/* ---------- Closing band ---------- */

.closing {
  background: var(--ink);
  color: var(--canvas);
}

.closing h2 {
  color: var(--canvas);
}

.closing p {
  color: #ded8ce;
}

.closing .btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.closing .btn-primary:hover {
  background: #ffd45a;
  color: var(--accent-contrast);
}

/* ---------- Documents (privacy, terms, contact) ---------- */

.doc {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.doc-header {
  max-width: 62ch;
  margin-bottom: 2rem;
}

.doc h2 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.doc h3 {
  margin-top: 1.75rem;
}

.doc ul {
  max-width: 62ch;
  padding-left: 1.2rem;
}

.doc li {
  margin-bottom: 0.5rem;
}

.doc dl {
  max-width: 62ch;
  margin: 0 0 1rem;
}

.doc dt {
  font-weight: 700;
  margin-top: 1rem;
}

.doc dd {
  margin: 0.15rem 0 0;
}

.notice {
  background: var(--cream-100);
  border: 1px solid #f0e0bc;
  border-left: 6px solid var(--accent);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  max-width: 62ch;
  margin-bottom: 2rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.todo {
  display: inline-block;
  background: var(--cream-100);
  border: 1px dashed #b98a12;
  border-radius: 6px;
  padding: 0.05em 0.45em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.87em;
  font-weight: 600;
  color: #6b4a00;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-width: 62ch;
}

.toc h2 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 0.75rem;
  border-top: 0;
  padding-top: 0;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 34rem) {
  .toc ol {
    columns: 1;
  }
}

.toc li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

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

.site-footer {
  background: var(--ink);
  color: #ded8ce;
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  font-size: 0.97rem;
}

.site-footer .wrap {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.site-footer h2 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #b9b2a6;
  margin: 0 0 0.75rem;
}

.site-footer a {
  color: var(--canvas);
}

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

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.45rem;
}

.site-footer p {
  margin-bottom: 0.6rem;
}

.footer-brand img {
  width: 40px;
  margin-bottom: 0.75rem;
}

.footer-legal {
  border-top: 1px solid #454545;
  margin-top: 2rem;
  padding-top: 1.5rem;
  color: #b9b2a6;
}

.footer-legal p {
  max-width: none;
  margin-bottom: 0.35rem;
}
