/* Laylong coming-soon page
   Colors: ink green (trust), jade (calm page), sticker yellow (the price tag),
   markdown red (crossed-out price), leaf green (verified saving). */
:root {
  --ink: #0E3B2E;
  --ink-2: #16503F;
  --jade: #E8F0E9;
  --paper: #FBFDFB;
  --sticker: #FFD23F;
  --mark: #C8321F;
  --leaf: #17603A;
  --muted: #4A6358;
  --line: #C9D8CD;

  --font-display: "Bricolage Grotesque", "Kantumruy Pro", system-ui, sans-serif;
  --font-body: "Kantumruy Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 10px;
  --radius-lg: 28px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--jade);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
:lang(km) body, body:lang(km) { line-height: 1.75; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }

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

/* ---------- Top bar ---------- */
.topbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.lang-switch {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.4;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 48px) var(--gutter) clamp(48px, 8vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "copy  stage"
    "join  stage";
  column-gap: clamp(32px, 5vw, 72px);
  row-gap: 36px;
  align-items: start;
}
.hero-copy { grid-area: copy; max-width: 34rem; padding-top: clamp(8px, 3vw, 40px); }
.deal-stage { grid-area: stage; }
.join { grid-area: join; max-width: 34rem; }

.soon {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 22px;
}
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  white-space: pre-line;
}
:lang(km) .display {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  font-size: clamp(40px, 6vw, 76px);
}
.lede {
  margin-top: 22px;
  font-size: clamp(18px, 1.7vw, 21px);
  color: var(--muted);
  max-width: 30rem;
}

/* ---------- Deal stage (the signature price tag) ---------- */
.deal-stage {
  position: relative;
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: 72px clamp(20px, 4vw, 48px) 28px;
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.deal-stage::before { /* faint market-awning stripes at the top edge */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 14px;
  background: repeating-linear-gradient(90deg, var(--sticker) 0 28px, transparent 28px 56px);
  opacity: 0.9;
}
.string {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 2px;
  height: 60px;
  background: var(--sticker);
  transform: translateX(-50%);
  z-index: 1;
}
.tag {
  position: relative;
  margin: 0 auto;
  max-width: 380px;
  background: var(--sticker);
  color: var(--ink);
  padding: 44px 30px 30px;
  clip-path: polygon(16% 0, 84% 0, 100% 8%, 100% 100%, 0 100%, 0 8%);
  border-radius: 0 0 14px 14px;
  transform-origin: 50% 0;
  z-index: 2;
}
.hole {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--ink);
}
.tag-kicker { font-size: 14px; color: var(--ink-2); opacity: 0.85; }
.tag-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.tag-cond { font-size: 15px; color: var(--ink-2); }
.tag-prices { margin-top: 18px; border-top: 2px dashed rgba(14, 59, 46, 0.35); padding-top: 12px; }
.tag-prices .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; }
.tag-prices dt { font-size: 15px; }
.tag-prices dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.old { position: relative; display: inline-block; }
.strike {
  position: absolute;
  left: -4px;
  right: -4px;
  top: 52%;
  height: 3px;
  background: var(--mark);
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(1);
}
.now { margin-top: 14px; }
.now-label { font-size: 15px; font-weight: 600; }
.now-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(64px, 8vw, 88px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.save { margin-top: 6px; font-weight: 600; color: var(--leaf); font-size: 16px; }
.history { margin-top: 16px; }
.history-label { font-size: 14px; color: var(--ink-2); }
.history-steps {
  list-style: none;
  padding: 0;
  margin-top: 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.history-steps li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(14, 59, 46, 0.45);
}
.history-steps li + li::before { content: none; }
.history-steps li.drop { border-color: transparent; padding: 0; font-weight: 500; opacity: 0.6; }
.history-steps li.current { background: var(--ink); color: var(--sticker); border-color: var(--ink); }
.stamp {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 10px;
  border: 2.5px solid var(--leaf);
  border-radius: 8px;
  color: var(--leaf);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  transform: rotate(-4deg);
  background: rgba(255, 255, 255, 0.35);
}
.deal-foot {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  font-size: 15px;
  color: #C7DCCF;
}
.deal-foot span { max-width: 22rem; }
.next-deal {
  background: transparent;
  color: var(--paper);
  border: 1.5px solid rgba(251, 253, 251, 0.55);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
}
.next-deal:hover { border-color: var(--sticker); color: var(--sticker); }

/* One orchestrated moment: the tag swings in, the old price is struck,
   the price counts down, the verified stamp lands. */
.tag.play { animation: swing 1.1s cubic-bezier(.3, 1.4, .5, 1) both; }
.tag.play .strike { animation: strike 0.45s 0.35s ease-out both; }
.tag.play .stamp { animation: stamp 0.35s 1.35s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes swing {
  0% { transform: rotate(9deg); }
  45% { transform: rotate(-5deg); }
  75% { transform: rotate(2deg); }
  100% { transform: rotate(-1.5deg); }
}
@keyframes strike { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes stamp {
  from { opacity: 0; transform: rotate(-4deg) scale(1.8); }
  to { opacity: 1; transform: rotate(-4deg) scale(1); }
}
.tag:not(.play) { transform: rotate(-1.5deg); }

/* ---------- Waitlist form ---------- */
.roles { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.roles legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.roles label { position: relative; cursor: pointer; }
.roles input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.roles span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 15px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.roles input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.roles input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.field-label { display: block; font-weight: 600; margin-bottom: 8px; }
.field-row { display: flex; gap: 10px; }
.field-row input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font-size: 17px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--paper);
}
.field-row input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 59, 46, 0.18); }
.field-row input[aria-invalid="true"] { border-color: var(--mark); }
.cta {
  display: inline-block;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  padding: 14px 22px;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.cta:hover { background: var(--ink-2); }
.cta[disabled] { opacity: 0.6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.6em; margin-top: 12px; font-weight: 600; }
.form-msg.ok { color: var(--leaf); }
.form-msg.err { color: var(--mark); }
.fine { font-size: 14px; color: var(--muted); }

/* ---------- How it works ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
:lang(km) .section-title { font-family: var(--font-body); letter-spacing: 0; line-height: 1.45; }
.how { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(56px, 8vw, 96px); }
.steps {
  list-style: none;
  padding: 0;
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 18px; }
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sticker);
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 12px;
}
.steps h3 { font-size: 21px; font-weight: 700; line-height: 1.35; }
.steps p { margin-top: 6px; color: var(--muted); max-width: 22rem; }

/* ---------- Sellers / buyers ---------- */
.sides {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.side { padding: 0 clamp(20px, 4vw, 48px); }
.side:first-child { padding-left: 0; border-right: 1.5px solid var(--line); }
.side:last-child { padding-right: 0; }
.side ul { list-style: none; padding: 0; margin-top: 20px; display: grid; gap: 12px; }
.side li { padding-left: 30px; position: relative; font-size: 18px; }
.side li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 16px;
  height: 10px;
  border-left: 3px solid var(--leaf);
  border-bottom: 3px solid var(--leaf);
  transform: rotate(-45deg);
}

/* ---------- Closing band ---------- */
.closing {
  margin-top: 0;
  margin-bottom: clamp(40px, 6vw, 64px);
  padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 64px);
  background: var(--sticker);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.closing { margin-left: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); margin-right: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))); }
.display-sm { font-size: clamp(32px, 4.4vw, 56px); max-width: 16ch; }
:lang(km) .display-sm { font-size: clamp(28px, 3.6vw, 44px); max-width: 22ch; }
.cta-light { background: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 15px;
}
.footer-brand { font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.social a { margin-right: 16px; font-weight: 600; color: var(--ink); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "stage" "join";
    row-gap: 28px;
  }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sides { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .side, .side:first-child, .side:last-child { padding: 0; border: 0; }
}
@media (max-width: 480px) {
  .field-row { flex-direction: column; }
  .cta { width: 100%; text-align: center; }
  .closing .cta { width: auto; }
  .tag { padding: 40px 22px 24px; }
  .lang-switch button { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tag.play, .tag.play .strike, .tag.play .stamp { animation: none; }
}
