/* ============================================================
   Linkmore Memory — landing pages stylesheet
   Shared by / (index.html) and /bilingual/index.html
   Mobile-first · single column · system fonts only
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --ink:        #1f2937;  /* primary text — 13.5:1 on paper */
  --ink-soft:   #374151;  /* secondary text — 9.4:1 */
  --muted:      #4b5563;  /* small/badge text — 7.2:1 on paper */
  --paper:      #f7f7f5;
  --card:       #ffffff;
  --line:       #e2e2dc;
  --line-soft:  #eceae4;
  --accent:      #4f46e5; /* indigo — 6.3:1 on white, 6.1:1 on paper */
  --accent-ink:  #4338ca; /* hover state — 7.6:1 on white */
  --accent-soft: #eef0fe;
  --accent-2:    #0f766e; /* secondary teal tint — 5.4:1 on white */

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Noto Sans CJK SC", Roboto, Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino,
                  "Book Antiqua", "Songti SC", Georgia, serif;

  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(31, 41, 55, .06), 0 1px 3px rgba(31, 41, 55, .08);
  --shadow-md: 0 4px 14px rgba(31, 41, 55, .10);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* Quiet layered backdrop: two faint tint fields over paper */
  background-image:
    radial-gradient(58rem 26rem at 88% -6%,  rgba(79, 70, 229, .065), transparent 62%),
    radial-gradient(46rem 24rem at -12% 34%, rgba(15, 118, 110, .05), transparent 60%);
  background-attachment: fixed;
}

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

::selection { background: var(--accent-soft); color: var(--ink); }

/* Visible focus for keyboard users */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: 22px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 20;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  border-top: 4px solid var(--accent);
  border-image: linear-gradient(90deg, var(--accent), var(--accent-2)) 1;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(6px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  min-height: 48px;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.badge-beta {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* On the narrowest phones (320px) the nowrap badge forces the
   "Linkmore Memory" wordmark onto two lines. Drop the badge there —
   "Private beta" is already stated in the hero .eyebrow line. */
@media (max-width: 360px) {
  .badge-beta { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 44px 40px; }

.eyebrow {
  margin: 0 0 14px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow .sep { color: var(--line); margin-inline: .4em; }

.hero-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1.35rem + 3.2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-sub {
  margin: 0 0 30px;
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.1875rem);
  color: var(--ink-soft);
  max-width: 60ch;
}

/* Chinese display text — let CJK faces lead */
[lang="zh-Hans"] { font-family: var(--font-body); }
.zh-headline {
  margin: -6px 0 20px;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.5rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

/* ---------- Waitlist card ---------- */
.waitlist {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 22px 22px;
  overflow: hidden;
}
/* Two-tone signature rule */
.waitlist::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.waitlist-title {
  margin: 4px 0 14px;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.3;
}
.waitlist-title .zh-cta {
  display: block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 2px;
}

.waitlist iframe {
  display: block;
  min-height: 200px;
  border: 0;
}

.waitlist-fallback-note {
  margin: 12px 0 0;
  font-size: .9375rem;
  color: var(--muted);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

a:not(.btn):not(.brand) {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: rgba(79, 70, 229, .35);
  text-underline-offset: 3px;
  transition: text-decoration-color .16s ease, color .16s ease;
}
a:not(.btn):not(.brand):hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* ---------- Trust badge row ---------- */
.trust-row {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
}
.trust-row li {
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.trust-row li + li::before {
  content: "·";
  margin-inline: 12px;
  color: var(--line);
  font-weight: 700;
}

/* ---------- Survey side-CTA ---------- */
.hero-survey {
  margin: 18px 0 0;
  font-size: .9375rem;
  color: var(--muted);
}
.hero-survey a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;   /* CTA tap-target floor — every other control already meets it */
  padding-block: 6px;
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section {
  padding-block: 40px;
  border-top: 1px solid var(--line-soft);
}

.section-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.25rem + 1.3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.section-kicker {
  margin: 0 0 26px;
  font-size: .9375rem;
  color: var(--muted);
  max-width: 58ch;
}

/* ---------- "Sound familiar?" problem cards ---------- */
.problems {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: problem;
}
.problem {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px 78px;
  counter-increment: problem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.problem::before {
  content: counter(problem);
  position: absolute;
  left: 18px;
  top: 14px;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(79, 70, 229, .28);
}
.problem:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 70, 229, .35);
}
.problem h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
}
.problem p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.problem sup { color: var(--accent-ink); font-weight: 700; }

.footnote {
  margin: 18px 2px 0;
  font-size: .8125rem;
  color: var(--muted);
}

/* ---------- "How it works" steps ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  counter-increment: step;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(15, 118, 110, .4);
}
.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
}
.step h3 {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
}
.step p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* ---------- "Can't rug you" trust section ---------- */
.trust-band {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
}
.trust-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.trust-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-soft);
}
.trust-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.trust-list strong { color: var(--ink); }

/* ---------- Pricing teaser ---------- */
.pricing-band {
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, .22);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.pricing-line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + .7vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink);
}

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); margin-top: 6px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 14px 4px;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color .16s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--accent-ink); }
.faq-list details p {
  margin: 0 0 16px;
  padding-right: 32px;
  color: var(--ink-soft);
}

/* ---------- Pull quote (positioning line, bilingual page) ---------- */
.pull-quote {
  margin: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
}
.pull-quote .en {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
}
.pull-quote .zh {
  display: block;
  margin-top: 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* Bilingual bullet pairs */
.points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.points li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.points li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 70, 229, .35);
}
.points .en { display: block; color: var(--ink); }
.points .en strong { font-weight: 700; }
.points .zh { display: block; margin-top: 6px; color: var(--muted); font-size: .9375rem; }

.zh-sub {
  margin: -14px 0 30px;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 20px;
  padding-block: 30px 40px;
  font-size: .9375rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
}
.footer-nav .dot { margin-inline: 10px; color: var(--line); }
.footer-made, .footer-copy { margin: 0; }
.footer-copy { font-size: .875rem; }

@media (min-width: 560px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
  }
}

/* ---------- Scroll reveals (JS adds .is-in; off without JS) ----------
   The hidden initial state is scoped to html.js (added synchronously by
   each page's head script): if landing.css loads but landing.js fails,
   content stays fully visible instead of a blank page. */
html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

/* No-JS / reduced motion: everything visible, nothing moves */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
html:not(.js) .reveal { opacity: 1; transform: none; }
