/* ==========================================================================
   Legacy Wallet — Landing Page
   Design tokens taken from the Legacy Wallet Landing design canvas.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg:            #05090F;
  --bg-alt:        #070C14;
  --surface:       #0A111B;
  --surface-deep:  #080E17;

  /* Gold */
  --gold:          #D8B45E;
  --gold-light:    #F0DCA4;
  --gold-dim:      #C9A458;
  --gold-text:     #E5C87F;

  /* Cyan */
  --cyan:          #4FE3E8;
  --cyan-light:    #9CE9EC;
  --cyan-mid:      #7FD9DD;

  /* Type */
  --cream:         #F4EBDA;
  --cream-dim:     #F0E6D2;
  --text:          #E6EBF2;
  --text-strong:   #C3CDD9;
  --text-muted:    #A9B6C5;
  --text-soft:     #9DAAB9;
  --text-dim:      #93A2B5;
  --text-dimmer:   #7E8C9D;
  --text-faint:    #5F6E80;
  --warn:          #B98A8A;

  /* Lines */
  --line:          rgba(216, 180, 94, .14);
  --line-mid:      rgba(216, 180, 94, .18);
  --line-strong:   rgba(216, 180, 94, .30);
  --line-soft:     rgba(255, 255, 255, .06);

  /* Layout */
  --wrap:          1240px;
  --gutter:        28px;
  --section-y:     clamp(56px, 7vw, 110px);

  --font-display:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:     'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset ---------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* Keep anchored sections clear of the sticky header. */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover { color: var(--gold-light); }

::selection { background: var(--gold); color: var(--bg); }

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

/* --- Layout primitives ---------------------------------------------------- */

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

.section {
  border-bottom: 1px solid var(--line);
}
.section--alt { background: var(--bg-alt); }

.section__inner {
  padding-block: var(--section-y);
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
}

/* Auto-fit card grids. The min() keeps a single column on narrow screens. */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.grid--wide  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--mid   { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid--tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.grid--cols {
  gap: clamp(24px, 3vw, 44px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* --- Typography ----------------------------------------------------------- */

.eyebrow {
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.h1, .h2, .h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  color: var(--cream-dim);
  text-wrap: pretty;
}

.h1 {
  font-size: clamp(38px, 5.6vw, 76px);
  line-height: 1.06;
  color: var(--cream);
}

.h2 {
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1.12;
}
.h2--sm { font-size: clamp(30px, 3.4vw, 46px); }

.h3 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.2;
}

.lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-soft);
  max-width: 680px;
  text-wrap: pretty;
}
.lead--lg {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-muted);
  max-width: 620px;
}

.body { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-strong); }
.body--dim { color: var(--text-dim); font-size: 15px; line-height: 1.6; }

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

.btn {
  display: inline-block;
  padding: 15px 26px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .03em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.btn--primary { background: var(--gold); color: var(--bg); }
.btn--primary:hover { background: var(--gold-light); color: var(--bg); }

.btn--ghost {
  border: 1px solid rgba(216, 180, 94, .4);
  color: var(--cream-dim);
  font-weight: 400;
}
.btn--ghost:hover { border-color: var(--gold); color: var(--cream-dim); }

.btn--sm {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .04em;
  border: 1px solid var(--gold);
  color: var(--cream-dim);
}
.btn--sm:hover { background: var(--gold); color: var(--bg); }

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 9, 15, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header__bar {
  padding-block: 16px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream-dim);
  flex-shrink: 0;
}
.brand:hover { color: var(--cream); }

/* Rotated square with a solid gold core — the Legacy Wallet mark. */
.brand__mark {
  width: 26px;
  height: 26px;
  border: 1px solid var(--gold);
  display: block;
  transform: rotate(45deg);
  position: relative;
  flex-shrink: 0;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--gold);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  flex-wrap: wrap;
  font-size: 14px;
}
.nav a { color: var(--text-dim); }
.nav a:hover { color: var(--cream-dim); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--text-faint);
  white-space: nowrap;
}
.lang__sep { color: var(--text-faint); }
.lang__btn {
  font: inherit;
  letter-spacing: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--text-dim);
  transition: color .2s ease;
}
.lang__btn:hover { color: var(--cream-dim); }
/* The active language is a label, not an offer — dim it and take the pointer away. */
.lang__btn.is-active {
  color: var(--text-faint);
  cursor: default;
}

/* Hamburger — only rendered on small screens. */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 0;
  background: none;
  border: 1px solid var(--line-mid);
  color: var(--cream-dim);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { border-color: var(--gold); }
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 17px;
  height: 1px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after  { top: 5px; }

[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-5px) rotate(-45deg); }

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

.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

/* Warm glow behind the hero artwork. */
.hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 88% 45%, rgba(216, 180, 94, .10) 0%, rgba(5, 9, 15, 0) 55%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  width: 100%;
  padding-block: clamp(64px, 9vw, 120px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero__art {
  display: flex;
  justify-content: center;
}

/* screen blending drops the artwork's black ground onto the page background;
   the radial mask feathers its square edge. */
.hero__art img {
  width: 100%;
  max-width: 430px;
  height: auto;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(68% 68% at 50% 50%, #000 48%, transparent 100%);
          mask-image: radial-gradient(68% 68% at 50% 50%, #000 48%, transparent 100%);
}

.status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.status__dot {
  width: 7px;
  height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  flex-shrink: 0;
}
.status__text {
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--text-dimmer);
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line-mid);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card--pad-lg { padding: 34px 30px; gap: 14px; }
.card--pad-sm { padding: 26px 22px; gap: 10px; }
.card--step   { padding: 28px 24px; gap: 14px; }
.card--plain  { padding: 26px; gap: 10px; }

.card--gold {
  background: rgba(216, 180, 94, .08);
  border-color: rgba(216, 180, 94, .4);
}

.card--sec {
  background: var(--surface-deep);
  border-color: rgba(79, 227, 232, .2);
}

.card__label {
  margin: 0;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-dim);
}
.card__label--lg { font-size: 13px; letter-spacing: .16em; color: var(--gold-text); }
.card__label--cyan { font-size: 13px; letter-spacing: .16em; color: var(--cyan-mid); }

.card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--cream-dim);
}
.card__title--sm { font-size: 15px; font-weight: 600; }
.card__title--gold { color: var(--gold-text); }
.card__title--cyan { color: var(--cyan-light); font-weight: 600; }

.card__num {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--gold);
}

/* --- Rules (labelled left-border blocks) ---------------------------------- */

.rule {
  border-left: 1px solid var(--line-strong);
  padding-left: 18px;
}
.rule--cyan { border-left-color: var(--cyan); padding-left: 20px; }
.rule--gold { border-left-color: var(--gold); padding-left: 20px; }

.rule__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--gold-text);
}
.rule__title--cyan { color: var(--cyan-light); }

/* --- Panels (the two architecture layers) --------------------------------- */

.panel {
  border: 1px solid rgba(216, 180, 94, .3);
  background: rgba(216, 180, 94, .04);
  padding: 26px;
}
.panel--cyan {
  border-color: rgba(79, 227, 232, .28);
  background: rgba(79, 227, 232, .04);
}
.panel__label {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.panel__label--cyan { color: var(--cyan-mid); }

/* --- Pull-quote / conclusion banner --------------------------------------- */

.banner {
  border: 1px solid rgba(216, 180, 94, .35);
  padding: 26px 30px;
  background: linear-gradient(90deg, rgba(216, 180, 94, .08), rgba(216, 180, 94, 0));
}
.banner p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--cream-dim);
}

.serif-note {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  color: var(--cream-dim);
}

.gold-lead { color: var(--gold); letter-spacing: .02em; }

/* --- Comparison table ----------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  /* Give the scroll area a visible edge on touch devices. */
  -webkit-overflow-scrolling: touch;
}

.compare {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 15px;
}

.compare th,
.compare td {
  text-align: left;
  padding: 18px 20px;
}

.compare thead th {
  border-bottom: 1px solid rgba(216, 180, 94, .24);
  font-weight: 500;
  color: var(--text-strong);
}

/* Only the top-left cell is the small-caps table label. */
.compare thead th:first-child {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dimmer);
}

/* Row labels read as ordinary body text, not as headings. */
.compare tbody th {
  font-weight: 400;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-soft);
}

.compare td { border-bottom: 1px solid var(--line-soft); color: var(--text-dim); }
.compare tbody tr:last-child th,
.compare tbody tr:last-child td { border-bottom: 0; }

.compare .is-bad  { color: var(--warn); }
.compare .is-good { color: var(--cyan-mid); }

/* The Legacy Wallet column stays highlighted top to bottom. */
.compare .col-lw {
  color: var(--cream-dim);
  background: rgba(216, 180, 94, .07);
}
.compare th.col-lw {
  border-bottom-color: var(--gold);
  font-weight: 600;
  color: var(--cream-dim);
}

/* --- Figures -------------------------------------------------------------- */

.figure {
  margin: 0;
  border: 1px solid var(--line-mid);
  padding: 8px;
  background: var(--surface-deep);
}
.figure img { width: 100%; height: auto; }

/* The illustrations carry burnt-in German labels that turn unreadable on a
   phone, so tapping one opens it full-size in the lightbox. */
.figure__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.figure__hint {
  margin: 8px 2px 2px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--text-faint);
}

/* --- Lightbox ------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 6, 11, .94);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.lightbox[open],
.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  object-fit: contain;
  border: 1px solid var(--line-mid);
}

/* On phones the figure is scaled up and pans horizontally instead of being
   squeezed to an illegible strip. */
@media (max-width: 700px) {
  .lightbox { padding: 12px; overflow: auto; }
  .lightbox__img { max-width: none; width: 900px; max-height: none; }
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--line-mid);
  color: var(--cream-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { border-color: var(--gold); color: var(--gold); }

/* --- Split blocks (text + figure) ----------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
}

.split__copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* --- Lists ---------------------------------------------------------------- */

.dashlist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.dashlist li {
  display: flex;
  gap: 14px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-strong);
}
.dashlist li::before {
  content: "—";
  color: var(--gold);
  flex-shrink: 0;
}

/* --- Feature trio (dead-man switch) --------------------------------------- */

.trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.trio > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
}
.trio__label {
  margin: 0;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.audience {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
}
.audience__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--cream-dim);
}

/* --- Closing CTA ---------------------------------------------------------- */

.cta { position: relative; border-bottom: 1px solid var(--line); }

.cta__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 120% at 12% 50%, rgba(216, 180, 94, .12) 0%, rgba(5, 9, 15, 0) 60%);
  pointer-events: none;
}
/* Hairline that enters from the left and fades out before the text column. */
.cta__line {
  position: absolute;
  left: 0;
  width: calc(50% - (var(--wrap) / 2) + var(--gutter));
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 180, 94, .55), rgba(216, 180, 94, 0) 100%);
  pointer-events: none;
}
/* Below the wrap width there is no free margin left to draw it in. */
@media (max-width: 1240px) {
  .cta__line { display: none; }
}

.cta__inner {
  position: relative;
  padding-block: clamp(72px, 9vw, 130px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}
.cta__title {
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: 1.08;
  color: var(--cream);
  max-width: 900px;
}
.cta__note { font-size: 15px; color: var(--text-dimmer); }

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

.footer__inner {
  padding-block: 34px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-faint);
}
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a { color: var(--text-dimmer); }
.footer__links a:hover { color: var(--cream-dim); }

/* --- Scroll reveal -------------------------------------------------------- */

/* Only hide when JS is present to un-hide it — without JS the page renders
   complete, which also keeps the content crawlable. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
  :root { --gutter: 20px; }

  .nav-toggle { display: flex; }

  .header__bar { gap: 16px; flex-wrap: wrap; }

  /* Collapsed menu drops below the bar and takes the full width. */
  .nav,
  .header__actions {
    display: none;
    width: 100%;
    margin-left: 0;
  }

  .header.is-open .nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 8px;
    border-top: 1px solid var(--line);
  }
  .header.is-open .nav a {
    padding: 14px 2px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
  }

  .header.is-open .header__actions {
    display: flex;
    justify-content: space-between;
    padding-block: 16px 4px;
  }
}

@media (max-width: 560px) {
  .banner { padding: 22px 20px; }
  .card { padding: 24px 20px; }
}

/* Users who ask for less motion get the page fully painted, no transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .header, .nav-toggle, .lightbox, .hero__glow, .cta__glow { display: none !important; }
  body { background: #fff; color: #000; }
}
