/* Tapslate website: shared styles. Light and dark follow the system setting. */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f8;
  --card: #ffffff;
  --ink: #111318;
  --muted: #5b6170;
  --line: #e3e5ea;
  --accent: #0a6cff;
  --accent-ink: #ffffff;
  --radius: 18px;
  --max: 1040px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f13;
    --bg-soft: #151820;
    --card: #1a1d26;
    --ink: #f2f3f6;
    --muted: #a3a9b7;
    --line: #2a2e3a;
    --accent: #3d8bff;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header + footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 18px; }
.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; padding: 14px 22px; border-radius: 14px; }
.button.secondary { background: var(--bg-soft); color: var(--ink); }
.note { font-size: 14px; color: var(--muted); }

/* Phone mock: original and translated layers cross-fade */
.phone { position: relative; width: min(300px, 80vw); aspect-ratio: 9 / 19.5; margin: 0 auto; border-radius: 44px; background: #0b0c0f; padding: 12px; box-shadow: 0 0 0 1px var(--line), 0 30px 60px rgba(0, 0, 0, 0.18); }
.screen { position: relative; height: 100%; border-radius: 34px; overflow: hidden; background: #f2f2f7; color: #111; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
/* Each layer is opaque, so the two languages never show through each other. */
.layer { position: absolute; inset: 0; padding: 46px 16px 16px; background: #f2f2f7; z-index: 0; }
.layer.translated { z-index: 1; }
/* English wipes in top to bottom, holds, then wipes away the same way. */
.layer.translated { clip-path: inset(0 0 100% 0); animation: reveal 8s ease-in-out infinite; }
@keyframes reveal {
  0%, 30% { clip-path: inset(0 0 100% 0); }
  42%, 82% { clip-path: inset(0 0 0 0); }
  94%, 100% { clip-path: inset(100% 0 0 0); }
}
@media (prefers-reduced-motion: reduce) { .layer.translated { animation: none; clip-path: none; } }
.m-lang { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px; background: #3b7ff0; color: #fff; z-index: 2; }
.m-bar { background: #0a5bd8; color: #fff; margin: -46px -16px 14px; padding: 46px 16px 12px; font-weight: 700; font-size: 18px; }
.m-card { background: #fff; border-radius: 12px; padding: 2px 12px; margin-bottom: 14px; }
.m-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e5e5ea; font-size: 13px; }
.m-row:last-child { border-bottom: 0; }
.m-row span:last-child { color: #8e8e93; }
.m-h { font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.m-p { font-size: 12.5px; line-height: 1.45; margin: 0 0 12px; }
.m-gap { margin-top: 18px; }
.m-btn { background: #0a5bd8; color: #fff; text-align: center; border-radius: 12px; padding: 11px; font-size: 14px; font-weight: 600; }
.badge { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.55); color: #fff; z-index: 2; }

/* Sections */
section { padding: 56px 0; }
section.soft { background: var(--bg-soft); }
h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 14px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.section-lead { color: var(--muted); font-size: 18px; margin: 0 0 32px; max-width: 40em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.step-n { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px; margin-bottom: 12px; }

/* Parcel-text comparison */
.compare { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; align-items: start; }
.sms-card { background: var(--bg-soft); }
.sms-from { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
/* .card .sms beats ".card p" (muted grey), which made the bubble text unreadable */
.card .sms { margin: 0; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: #e9e9eb; color: #111; font-size: 16px; line-height: 1.45; }
.card .sms.translated { margin-top: 14px; background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 6px 18px; }
.one-step { margin: 8px 0 0; font-weight: 600; color: var(--ink); }
.steps-list { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
.steps-list li { margin: 4px 0; }
.card.highlight { border-color: var(--accent); }
.card.highlight .steps-list { color: var(--ink); font-weight: 600; }

/* Articles (privacy, support, comparison) */
.article { padding: 48px 0 0; }
.article .wrap { max-width: 760px; }
.article h1 { font-size: clamp(32px, 5vw, 46px); }
.article h2 { font-size: 24px; margin-top: 40px; }
.article p, .article li { color: var(--ink); }
.article .meta { color: var(--muted); font-size: 15px; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 14px; color: var(--muted); font-weight: 600; }
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 0; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid, .compare { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .nav .hide-sm { display: none; }
  table { font-size: 15px; }
}
