/* MarkPlan Pro marketing site — colours match the app (src/index.css) plus the
   JimTech brand ink + volt orange. */
:root {
  --bg: #f1f5fb;
  --bg-elev: #ffffff;
  --border: #dde5f0;
  --text: #0f1b2d;
  --text-dim: #5a6a80;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e8f0fe;
  --ink: #0c1019;
  --ink-2: #1a2232;
  --volt: #ff5a1f;
  --radius: 16px;
  --shadow-md: 0 4px 14px rgba(15, 40, 90, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 40, 90, 0.18);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 17px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg-elev);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Space Grotesk', Inter, system-ui, sans-serif; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.dim { color: var(--text-dim); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, transform 0.1s, border-color 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--volt); color: #fff; }
.btn-blue { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
@media (hover: hover) {
  .btn-primary:hover { background: #e94a12; }
  .btn-blue:hover { background: var(--accent-strong); }
  .btn-ghost:hover { background: rgba(127, 140, 160, 0.12); }
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(12, 16, 25, 0.92); backdrop-filter: saturate(1.4) blur(10px); color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand b { color: var(--volt); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #c9d3e3; text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: #fff; }
.site-header .btn { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
/* Language switch: pushed right, unless the nav is already doing that. */
.lang { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: #c9d3e3; text-decoration: none; font-size: 0.95rem; }
.lang:hover { color: #fff; }
.nav + .lang { margin-left: 0; }
@media (max-width: 860px) {
  .nav { display: none; }
  .nav + .lang { margin-left: auto; }
  .site-header .wrap { gap: 14px; }
}

/* Chinese pages: CJK font fallback, no negative tracking, roomier lines. */
html[lang^='zh'] body { font-family: Inter, 'Noto Sans HK', 'PingFang HK', 'Microsoft JhengHei', sans-serif; line-height: 1.75; }
html[lang^='zh'] h1, html[lang^='zh'] h2, html[lang^='zh'] h3 { font-family: 'Space Grotesk', 'Noto Sans HK', 'PingFang HK', 'Microsoft JhengHei', sans-serif; letter-spacing: 0; line-height: 1.3; }
html[lang^='zh'] .eyebrow { letter-spacing: 0.08em; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 80% -10%, #1d3a7a 0%, transparent 60%), linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; padding: 72px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.hero h1 b { color: var(--volt); font-weight: inherit; }
.hero .lead { font-size: 1.2rem; color: #c9d3e3; max-width: 640px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 12px; }
.hero .fine { font-size: 0.9rem; color: #8d9ab0; }
.device {
  margin: 8px auto -1px; max-width: 1000px; background: #1b1f27; padding: 14px 14px 0; border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 80px rgba(37, 99, 235, 0.25);
}
.device img { border-radius: 14px 14px 0 0; }

/* Sections */
section { padding: 88px 0; scroll-margin-top: 64px; }
section.alt { background: var(--bg); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: step; }
.step { padding: 24px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.step p { color: var(--text-dim); margin: 0; font-size: 0.97rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-elev); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feature .ico svg { width: 22px; height: 22px; }
.feature p, .feature li { color: var(--text-dim); font-size: 0.97rem; }
.feature ul { margin: 0; padding-left: 1.1em; }
.feature p:last-child { margin: 0; }

.layer-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--bg); font-size: 0.85rem; color: var(--text); }
.chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Screenshots */
.shots { display: grid; gap: 56px; }
.shot { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: center; }
.shot:nth-child(even) { grid-template-columns: 1fr 1.5fr; }
.shot:nth-child(even) figure { order: 2; }
.shot figure { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); background: #fff; }
.shot h3 { font-size: 1.5rem; }
.shot p { color: var(--text-dim); }
@media (max-width: 860px) {
  .shot, .shot:nth-child(even) { grid-template-columns: 1fr; gap: 20px; }
  .shot:nth-child(even) figure { order: 0; }
}

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-elev); }
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
.plan .tag { position: absolute; top: -13px; left: 24px; background: var(--accent); color: #fff; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { margin-bottom: 4px; }
.plan .who { color: var(--text-dim); font-size: 0.93rem; min-height: 2.9em; }
.price { font-family: 'Space Grotesk', sans-serif; font-size: 2.2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: 0.95rem; font-weight: 500; color: var(--text-dim); letter-spacing: 0; }
.yearly { font-size: 0.92rem; color: var(--text-dim); margin: 2px 0 18px; font-variant-numeric: tabular-nums; }
.yearly b { color: #15803d; font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 28px; position: relative; font-size: 0.96rem; }
.plan li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.plan .btn { width: 100%; }
.price-note { text-align: center; color: var(--text-dim); font-size: 0.9rem; margin-top: 24px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 16px; font-size: 1.5rem; color: var(--accent); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-dim); padding-right: 40px; }

/* Trial form */
.trial { background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; }
.trial-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.trial .dim { color: #a9b5c8; }
.trial ul { padding-left: 1.1em; color: #c9d3e3; }
.form { background: var(--bg-elev); color: var(--text); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.9rem; font-weight: 600; }
.field label span { color: var(--text-dim); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; /* 16px stops iOS zooming into the field */
  min-height: 48px; padding: 10px 14px; border: 1px solid #c3d1e4; border-radius: 10px; background: #fff; color: var(--text);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--text-dim); margin-bottom: 20px; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
.form .btn { width: 100%; }
.hidden { display: none; }
@media (max-width: 860px) { .trial-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; gap: 0; } .form { padding: 20px; } }

/* Footer */
.site-footer { background: var(--ink); color: #8d9ab0; padding: 48px 0; font-size: 0.9rem; }
.site-footer .wrap { display: grid; gap: 18px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #c9d3e3; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.disclaimer { max-width: 760px; font-size: 0.82rem; }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 20px 88px; }
.legal h1 { font-size: 2.4rem; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal li { margin-bottom: 0.4em; }
.legal .updated { color: var(--text-dim); }
