/* ==========================================================================
   Fieldura — marketing landing page
   Tokens mirror repstrack_api/docs/design/design-system.md so this page reads
   as the same product as the admin app, not a different brand bolted on.
   ========================================================================== */

:root {
  /* brand */
  --brand-primary: #1E6FD9;
  --brand-primary-700: #1857AB;
  --brand-primary-100: #E7F0FC;
  --brand-accent: #0EA5A4;

  /* surfaces */
  --surface-0: #FFFFFF;
  --surface-50: #F7F8FA;
  --surface-100: #EEF1F5;
  --surface-200: #E2E7EE;
  --surface-700: #3A4250;
  --surface-900: #1A1F27;

  /* proof signals (used sparingly, to echo the real product UI) */
  --proof-geo-ok: #1A8754;
  --proof-geo-out: #D9822B;
  --proof-mock: #C5303B;
  --proof-mock-weak: #C97A12;
  --proof-late: #7A5AF8;

  /* status */
  --status-success: #1A8754;
  --status-success-bg: #E6F4EC;
  --status-warn: #D9822B;
  --status-warn-bg: #FDF1E3;
  --status-danger: #C5303B;
  --status-danger-bg: #FBE9EA;
  --status-info: #1E6FD9;
  --status-info-bg: #E7F0FC;

  /* spacing (4px base) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  /* radius */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-full: 999px;

  /* elevation */
  --elev-1: 0 1px 2px rgba(20,30,50,.06);
  --elev-2: 0 4px 12px rgba(20,30,50,.10);
  --elev-3: 0 12px 32px rgba(20,30,50,.16);

  /* type */
  --font-sans: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* page-specific */
  --header-h: 72px;
  --container-w: 1180px;
  --motion-base: 220ms cubic-bezier(.2,.7,.2,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

body {
  font-family: var(--font-sans);
  color: var(--surface-900);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

section { position: relative; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; color: var(--surface-900); }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.3; }
p { color: var(--surface-700); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-primary-700);
  background: var(--brand-primary-100);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
}

.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-7);
  text-align: center;
}
.section-head p { margin-top: var(--space-4); font-size: 17px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--motion-base), box-shadow var(--motion-base), background var(--motion-base), color var(--motion-base);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--elev-2);
}
.btn-primary:hover { background: var(--brand-primary-700); box-shadow: var(--elev-3); }
.btn-ghost {
  background: transparent;
  color: var(--surface-900);
  border-color: var(--surface-200);
}
.btn-ghost:hover { background: var(--surface-100); }
.btn-light {
  background: #fff;
  color: var(--brand-primary-700);
}
.btn-light:hover { box-shadow: var(--elev-2); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--motion-base), box-shadow var(--motion-base), background var(--motion-base);
}
.site-header.is-scrolled {
  background: rgba(255,255,255,.92);
  border-bottom-color: var(--surface-200);
  box-shadow: var(--elev-1);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 17px;
  color: var(--surface-900);
}
.brand img { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--surface-700);
  transition: color var(--motion-base);
}
.nav-links a:hover { color: var(--brand-primary); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--surface-900);
}

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--surface-0);
  z-index: 99;
  padding: var(--space-6) var(--space-5);
  display: none;
  flex-direction: column;
  gap: var(--space-5);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a { font-size: 18px; font-weight: 600; }
.mobile-nav .btn { width: 100%; }

/* ---------- hero ---------- */
.hero {
  padding: calc(var(--header-h) + var(--space-8)) 0 var(--space-8);
  overflow: hidden;
  background: var(--surface-50);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 720px;
  background:
    radial-gradient(480px 320px at 12% 18%, rgba(30,111,217,.16), transparent 70%),
    radial-gradient(420px 360px at 88% 8%, rgba(14,165,164,.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--space-8);
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  margin: var(--space-5) 0 var(--space-5);
}
.hero-copy h1 .accent { color: var(--brand-primary); }
.hero-copy p {
  font-size: 18px;
  max-width: 520px;
  margin-bottom: var(--space-6);
}
.hero-ctas { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.hero-fineprint {
  margin-top: var(--space-5);
  font-size: 13px;
  color: var(--surface-700);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* hero mockup — built entirely from CSS/SVG, no images required */
.hero-visual { position: relative; height: 460px; }
.mock-card {
  position: absolute;
  background: var(--surface-0);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-3);
  border: 1px solid var(--surface-200);
  padding: var(--space-5);
}
.mock-map {
  width: 380px;
  height: 280px;
  left: 0; top: 30px;
  background: linear-gradient(135deg, #eef5ff, #e8f9f6);
  overflow: hidden;
}
.mock-map .grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30,111,217,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,111,217,.07) 1px, transparent 1px);
  background-size: 28px 28px;
}
.mock-pin {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(30,111,217,.18);
}
.mock-pin.alt { background: var(--brand-accent); box-shadow: 0 0 0 4px rgba(14,165,164,.18); }
.mock-pin::after {
  content: "";
  position: absolute; inset: -10px;
  border: 2px solid currentColor;
  border-radius: var(--radius-full);
  opacity: .35;
}
.mock-heat {
  position: absolute;
  width: 120px; height: 120px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(213,60,40,.45), rgba(213,60,40,0) 70%);
  filter: blur(2px);
}
.mock-proof {
  width: 250px;
  right: 0; bottom: 0;
  z-index: 2;
}
.mock-proof .row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.mock-proof .avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--brand-primary-100); color: var(--brand-primary-700);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.mock-proof .name { font-weight: 600; font-size: 14px; }
.mock-proof .sub { font-size: 12px; color: var(--surface-700); }
.proof-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 5px 10px; border-radius: var(--radius-sm);
  margin: 2px 4px 2px 0;
}
.proof-tag svg { width: 13px; height: 13px; }
.proof-tag.ok { background: var(--status-success-bg); color: var(--status-success); }
.proof-tag.warn { background: var(--status-warn-bg); color: var(--status-warn); }
.proof-tag.info { background: var(--status-info-bg); color: var(--status-info); }
.mock-coverage {
  width: 168px;
  left: 40px; bottom: -28px;
  z-index: 3;
  text-align: center;
}
.mock-coverage .ring {
  width: 64px; height: 64px; margin: 0 auto var(--space-2);
  border-radius: 50%;
  background: conic-gradient(var(--brand-accent) 0 78%, var(--surface-100) 78% 100%);
  display: flex; align-items: center; justify-content: center;
}
.mock-coverage .ring span {
  width: 46px; height: 46px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--surface-900);
}
.mock-coverage .label { font-size: 12px; color: var(--surface-700); font-weight: 600; }

.float-anim { animation: floaty 6s ease-in-out infinite; }
.float-anim.delay { animation-delay: 1.2s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- trust strip ---------- */
.trust-strip {
  background: var(--surface-0);
  border-bottom: 1px solid var(--surface-200);
  padding: var(--space-6) 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  font-weight: 600;
  color: var(--surface-700);
}
.trust-item svg { width: 22px; height: 22px; color: var(--brand-primary); flex-shrink: 0; }

/* ---------- problem ---------- */
.problem { padding: var(--space-8) 0; background: var(--surface-0); }
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}
.problem-list { display: flex; flex-direction: column; gap: var(--space-4); }
.problem-list li {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface-50);
  border: 1px solid var(--surface-200);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--surface-900);
}
.problem-list svg { width: 20px; height: 20px; color: var(--status-danger); flex-shrink: 0; margin-top: 2px; }
.problem-answer { padding-top: var(--space-3); }
.problem-answer p { font-size: 17px; margin-bottom: var(--space-5); }
.problem-answer .btn { margin-top: var(--space-2); }

/* ---------- features ---------- */
.features { padding: var(--space-8) 0; background: var(--surface-50); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.feature-card {
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: transform var(--motion-base), box-shadow var(--motion-base), border-color var(--motion-base);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--elev-2);
  border-color: var(--brand-primary-100);
}
.feature-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--brand-primary-100);
  color: var(--brand-primary-700);
  margin-bottom: var(--space-4);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin-bottom: var(--space-2); }
.feature-card p { font-size: 14.5px; }

/* ---------- why subscribe ---------- */
.why { padding: var(--space-8) 0; background: var(--surface-0); }
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}
.why-list { display: flex; flex-direction: column; gap: var(--space-5); }
.why-item { display: flex; gap: var(--space-4); }
.why-item .num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.why-item h3 { font-size: 17px; margin-bottom: var(--space-1); }
.why-item p { font-size: 14.5px; }

.why-panel {
  background: linear-gradient(160deg, var(--surface-900), #232b3a);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  color: #fff;
  box-shadow: var(--elev-3);
}
.why-panel .panel-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #9fb6e0; margin-bottom: var(--space-4); }
.why-panel .signal-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) 0;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 14px;
}
.why-panel .signal-row:first-of-type { border-top: none; }
.why-panel .signal-label { display: flex; align-items: center; gap: var(--space-3); color: #e7ecf5; }
.why-panel .signal-label svg { width: 18px; height: 18px; }

/* ---------- how it works ---------- */
.how { padding: var(--space-8) 0; background: var(--surface-50); }
.how-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  position: relative;
}
.how-step {
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
}
.how-step .step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--brand-primary-100);
  color: var(--brand-primary-700);
  font-weight: 700; font-size: 13px;
  margin-bottom: var(--space-4);
}
.how-step h3 { font-size: 16px; margin-bottom: var(--space-2); }
.how-step p { font-size: 14px; }

/* ---------- faq ---------- */
.faq { padding: var(--space-8) 0; background: var(--surface-0); }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item {
  border: 1px solid var(--surface-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-0);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--surface-900);
  cursor: pointer;
}
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--surface-700); transition: transform var(--motion-base); }
.faq-item.is-open .faq-q svg { transform: rotate(180deg); color: var(--brand-primary); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--motion-base);
}
.faq-a-inner { padding: 0 var(--space-5) var(--space-5); font-size: 14.5px; color: var(--surface-700); }

/* ---------- final CTA ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-primary), #1450a0);
  border-radius: var(--radius-lg);
  margin: 0 auto;
  max-width: var(--container-w);
  padding: var(--space-8);
  text-align: center;
  color: #fff;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,.88); max-width: 520px; margin: var(--space-4) auto var(--space-6); font-size: 17px; }

/* ---------- contact ---------- */
.contact { padding: var(--space-8) 0; background: var(--surface-50); }
.contact-wrap {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: var(--space-7);
  background: var(--surface-0);
  border: 1px solid var(--surface-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
  overflow: hidden;
}
.contact-info { padding: var(--space-7); background: var(--surface-900); color: #fff; }
.contact-info h2 { color: #fff; font-size: 26px; margin-bottom: var(--space-4); }
.contact-info p { color: #c4cede; margin-bottom: var(--space-5); }
.contact-points { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-point { display: flex; gap: var(--space-3); align-items: flex-start; font-size: 14.5px; color: #dbe2ee; }
.contact-point svg { width: 18px; height: 18px; color: var(--brand-accent); flex-shrink: 0; margin-top: 2px; }
.contact-form { padding: var(--space-7); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: var(--space-2); color: var(--surface-900); }
.field input, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--surface-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--surface-900);
  transition: border-color var(--motion-base), box-shadow var(--motion-base);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-100);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-error { font-size: 12.5px; color: var(--status-danger); margin-top: var(--space-1); min-height: 16px; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-status {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
}
.form-status.is-success { display: block; background: var(--status-success-bg); color: var(--status-success); }
.form-status.is-error { display: block; background: var(--status-danger-bg); color: var(--status-danger); }

/* ---------- footer ---------- */
.site-footer { background: var(--surface-900); color: #c4cede; padding: var(--space-7) 0 var(--space-6); }
.footer-top { display: flex; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-6); }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); font-weight: 700; color: #fff; font-size: 16px; }
.footer-brand img { width: 26px; height: 26px; }
.footer-tagline { font-size: 13.5px; margin-top: var(--space-2); color: #8d9ab0; max-width: 280px; }
.footer-links { display: flex; gap: var(--space-7); flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #8d9ab0; margin-bottom: var(--space-3); }
.footer-col a { display: block; font-size: 14px; color: #dbe2ee; margin-bottom: var(--space-2); transition: color var(--motion-base); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 13px;
  color: #8d9ab0;
}

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { height: 380px; margin-top: var(--space-6); }
  .problem-grid, .why-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .header-actions .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-copy p { max-width: 100%; }
  .cta-banner { padding: var(--space-6) var(--space-5); }
  .contact-form, .contact-info { padding: var(--space-6); }
  .mock-coverage { left: 8px; }
  .mock-map { width: 100%; max-width: 380px; }
}
