/* Hẹn Nhau, Dễ Hơn: shared look of the invite page and the main landing page.
   System fonts only, no remote assets, no images, no script. The invite (site/fallback.css) and landing
   (landing/landing.css) copies must stay identical: tests/landing.test.mjs compares them. */
:root {
  color-scheme: light dark;
  --bg: #f7f6f3;
  --art-bg: #f3f2ee;
  --grid: rgba(0, 0, 0, 0.04);
  --badge-bg: #ebe6ff;
  --badge-fg: #6b4bcc;
  --main: #2a2649;
  --desc: #706f7b;
  --primary: #7352d9;
  --primary-fg: #ffffff;
  --footer: #8a8993;
  --note: #ebe9e3;
  --ring: #ffffff;
  --av1: #e8f0fe;
  --av2: #fce8e6;
  --av3: #e6f4ea;
  --av4: #fef7e0;
  --glow: rgba(115, 82, 217, 0.25);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131119;
    --art-bg: #1b1824;
    --grid: rgba(255, 255, 255, 0.05);
    --badge-bg: #2b2447;
    --badge-fg: #c7b8ff;
    --main: #f2f0fa;
    --desc: #b0aebd;
    --footer: #8f8d9b;
    --note: #1f1c29;
    --ring: #2a2636;
    --av1: #25324d;
    --av2: #4a2b2b;
    --av3: #23402e;
    --av4: #4a4023;
    --glow: rgba(115, 82, 217, 0.35);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: var(--bg);
  color: var(--main);
  font: 100%/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

.layout { width: 100%; max-width: 25rem; display: flex; flex-direction: column; gap: 2rem; }
.content { padding: 0 0.5rem; }

/* Illustration: isometric grid, four people meeting at a pin */
.art {
  position: relative;
  aspect-ratio: 1;
  border-radius: 2rem;
  background: var(--art-bg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.art::before {
  content: "";
  position: absolute;
  width: 150%;
  height: 150%;
  top: -20%;
  left: -20%;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 30px 30px;
  transform: rotateX(60deg) rotateZ(45deg);
}
.art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.links path { fill: none; stroke: var(--badge-fg); stroke-width: 1.5; stroke-dasharray: 4; opacity: 0.4; }
.pin { fill: var(--primary); }
.pin-dot { fill: #ffffff; }
.pin-wrap { filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.25)); }
.avatar { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.12)); }
.avatar circle { stroke: var(--ring); stroke-width: 4; }
.avatar text { font-size: 34px; text-anchor: middle; dominant-baseline: central; }
.av1 circle { fill: var(--av1); }
.av2 circle { fill: var(--av2); }
.av3 circle { fill: var(--av3); }
.av4 circle { fill: var(--av4); }
@media (prefers-reduced-motion: no-preference) {
  .links path { animation: dash 20s linear infinite; }
}
@keyframes dash { to { stroke-dashoffset: -1000; } }
.art--sm { width: 100%; max-width: 11rem; margin-inline: auto; }

/* Text */
.badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
h1 { margin: 0 0 1rem; font-size: 2.125rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
.lead { margin: 0 0 0.5rem; color: var(--desc); font-size: 1rem; font-weight: 500; line-height: 1.6; }
.lead-en { margin: 0 0 1.5rem; color: var(--desc); font-size: 0.875rem; opacity: 0.85; }
.feature { display: flex; align-items: flex-start; gap: 0.75rem; margin: 0 0 2rem; color: var(--desc); font-size: 0.875rem; font-weight: 500; line-height: 1.4; }
.feature svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { margin: 0; }

.cta, .install {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 15px -3px var(--glow), 0 4px 6px -4px var(--glow);
}
.install:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .cta, .install { transition: transform 0.15s ease; }
  .cta:hover, .install:hover { transform: scale(1.02); }
}

.steps { list-style: none; counter-reset: step; margin: 0 0 1.5rem; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem 0.75rem 3.25rem;
  border-radius: 1rem;
  background: var(--art-bg);
  color: var(--desc);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.875rem;
  top: 0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5rem;
  text-align: center;
}
.note { margin: 0 0 1rem; padding: 0.75rem 1rem; border-radius: 1rem; background: var(--note); color: var(--desc); font-size: 0.875rem; line-height: 1.5; }
.footer { margin: 0; color: var(--footer); font-size: 0.8125rem; font-weight: 500; text-align: center; line-height: 1.5; }
.back { color: var(--badge-fg); font-weight: 600; }
.back:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; }

/* Desktop: illustration on the left, text on the right */
@media (min-width: 56rem) {
  body { padding: 2rem; }
  .layout { max-width: 64rem; flex-direction: row; align-items: center; gap: 5rem; }
  .layout--narrow { max-width: 30rem; flex-direction: column; align-items: stretch; gap: 1rem; }
  .art, .art--sm { flex: 1 1 0; max-width: 32rem; margin-inline: 0; }
  .content { flex: 1 1 0; padding: 0; max-width: 30rem; }
  h1 { font-size: 3rem; }
  .lead { font-size: 1.125rem; }
  .lead-en { font-size: 0.9375rem; }
  .cta, .install { max-width: 22rem; }
  .footer { text-align: left; }
}
@media (min-width: 40rem) and (max-width: 55.99rem) {
  body { padding: 2rem; }
  .layout { max-width: 28rem; }
}
