:root {
  --paper: #faf8f5;
  --card: #ffffff;
  --ink: #1c1b1f;
  --muted: #6b6b76;
  --line: #ece8e1;
  --coral: #ff6b4a;
  --violet: #7c5cfc;
  --mint: #17b890;
  --gradient: linear-gradient(135deg, var(--coral), var(--violet));
  --shadow-soft: 0 8px 30px rgba(28, 27, 31, 0.06);
  --shadow-lift: 0 16px 40px rgba(28, 27, 31, 0.12);

  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* --- Ambient background blobs --- */

.ambient-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

.blob-a {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -100px;
  background: radial-gradient(circle, var(--coral), transparent 70%);
  animation: float-a 18s ease-in-out infinite;
}

.blob-b {
  width: 460px;
  height: 460px;
  top: 10%;
  right: -160px;
  background: radial-gradient(circle, var(--violet), transparent 70%);
  animation: float-b 22s ease-in-out infinite;
}

.blob-c {
  width: 320px;
  height: 320px;
  bottom: -100px;
  left: 30%;
  background: radial-gradient(circle, var(--mint), transparent 70%);
  opacity: 0.25;
  animation: float-a 26s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, 40px) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.05); }
}

/* --- Nav --- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  padding: 16px 20px;
}

.nav-inner {
  width: 100%;
  max-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(250, 248, 245, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(28, 27, 31, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 24px; height: 24px; display: block; }

.brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--ink); }

.nav-cta {
  display: inline-flex;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--gradient);
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 24px rgba(124, 92, 252, 0.28);
}
.nav-cta:active { transform: translateY(0) scale(0.98); }

/* --- Hero --- */

main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.hero {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding-top: 56px;
  animation: rise 0.6s ease both;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--violet);
  margin: 0 0 14px;
}

.hero-title {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.hero-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 40px;
}

/* --- Upload card --- */

.upload-stage {
  animation: rise 0.6s ease 0.1s both;
}

.upload-card {
  display: block;
  cursor: pointer;
  border-radius: 24px;
  padding: 3px;
  background: var(--line);
  transition: background 0.25s ease, transform 0.2s ease;
}

.upload-card:hover {
  transform: translateY(-2px);
}

.upload-card.dragover {
  background: var(--gradient);
  animation: pulse-border 1.4s ease-in-out infinite;
}

.upload-card-inner {
  background: var(--card);
  border-radius: 21px;
  padding: 56px 24px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s ease;
}

.upload-card:hover .upload-card-inner {
  box-shadow: var(--shadow-lift);
}

@keyframes pulse-border {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--violet);
}
.upload-icon svg { width: 100%; height: 100%; }

.upload-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 6px;
}

.upload-sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* --- Landing: more sections --- */

.landing-more {
  padding-top: 88px;
  display: flex;
  flex-direction: column;
  gap: 100px;
}

.section-block {
  scroll-margin-top: 90px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--violet);
  margin: 0 0 12px;
  text-align: center;
}

.section-title {
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0 auto 14px;
  max-width: 640px;
}

.section-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 44px;
}

/* How it works */

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 760px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

.step-card {
  background: var(--card);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.step-icon {
  width: 40px;
  height: 40px;
  margin: 14px 0 16px;
  color: var(--violet);
}
.step-icon svg { width: 100%; height: 100%; }

.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
}

.step-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Comparison */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .compare-grid { grid-template-columns: 1fr 1fr; }
}

.compare-card {
  border-radius: 22px;
  padding: 26px 26px 28px;
}

.compare-them {
  background: var(--card);
  border: 1px solid var(--line);
}

.compare-us {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lift);
}

.compare-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: 0 0 18px;
  color: var(--muted);
}

.compare-us .compare-label { color: rgba(255,255,255,0.6); }

.compare-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-card li {
  font-size: 14px;
  line-height: 1.55;
  padding-left: 24px;
  position: relative;
}

.compare-them li::before {
  content: "\2715";
  position: absolute;
  left: 0;
  top: 0;
  color: #c9c4ba;
  font-size: 12px;
}

.compare-us li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

/* Use cases */

.usecase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 760px) {
  .usecase-grid { grid-template-columns: repeat(4, 1fr); }
}

.usecase-card {
  background: var(--card);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.usecase-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.usecase-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  color: var(--coral);
}
.usecase-icon svg { width: 100%; height: 100%; }

.usecase-card h3 {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 6px;
}

.usecase-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* Privacy */

.privacy-card {
  background: linear-gradient(160deg, #fff 0%, #fdf3ef 100%);
  border-radius: 26px;
  padding: 44px 32px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  max-width: 640px;
  margin: 0 auto;
}

.privacy-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 18px;
  color: var(--mint);
}
.privacy-icon svg { width: 100%; height: 100%; }

.privacy-copy {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  max-width: 480px;
  margin: 0 auto 26px;
}

.privacy-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.privacy-point {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
}

/* --- Workspace (post-upload) --- */

.workspace {
  padding-top: 40px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 860px) {
  .workspace-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.image-pane {
  animation: rise 0.5s ease both;
}

.image-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: #000;
  aspect-ratio: 4 / 3;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 22px;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.45) 100%);
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  top: 0;
  background: linear-gradient(90deg, transparent, #ffffff, var(--violet), transparent);
  box-shadow: 0 0 16px 2px rgba(255, 255, 255, 0.8);
  animation: scan-sweep 2.2s ease-in-out infinite;
}

@keyframes scan-sweep {
  0% { top: 4%; opacity: 0; }
  10% { opacity: 1; }
  50% { top: 92%; opacity: 1; }
  60% { opacity: 1; }
  100% { top: 4%; opacity: 0; }
}

.scan-caption {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
  background: rgba(28, 27, 31, 0.55);
  backdrop-filter: blur(6px);
  padding: 7px 16px;
  border-radius: 999px;
  margin: 0;
  transition: opacity 0.25s ease;
}

.reset-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 2px;
  transition: color 0.15s ease;
}
.reset-link:hover { color: var(--ink); }

/* --- Result pane --- */

.result-pane {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-card, .map-card, .no-match-card, .error-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 28px;
  animation: rise 0.5s ease both;
}

.result-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result-eyebrow-row .result-eyebrow { margin: 0; }

.source-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.source-gps {
  background: rgba(23, 184, 144, 0.12);
  color: var(--mint);
}

.source-visual {
  background: rgba(124, 92, 252, 0.12);
  color: var(--violet);
}

.result-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--mint);
  margin: 0 0 10px;
}

.result-eyebrow.no-match { color: var(--muted); }

.result-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  line-height: 1.15;
}

.result-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}

.result-overview {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 18px;
}

.result-highlights {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-highlights li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
}

.result-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  background: var(--gradient);
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px rgba(124, 92, 252, 0.3);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--violet);
}

.map-card {
  padding: 0;
  overflow: hidden;
  animation-delay: 0.12s;
}

.map-embed {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

.no-match-card {
  text-align: left;
}
.no-match-card .btn-secondary { margin-top: 6px; }

/* --- Error --- */

.error-section { padding-top: 40px; }
.error-card { text-align: center; border: 1px solid #ffd9cf; }
.error-card p { font-size: 15px; color: var(--ink); margin: 0 0 18px; }

/* --- Footer --- */

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 20px 48px;
}
.footer p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  opacity: 0.8;
}

/* --- Shared animation --- */

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Focus states --- */

a:focus-visible,
button:focus-visible,
.upload-card:focus-within {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

/* --- Trust bar --- */

.trust-bar {
  text-align: center;
  padding-bottom: 8px;
}

.trust-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin: 0 0 20px;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.trust-badge svg {
  width: 16px;
  height: 16px;
  color: var(--violet);
  flex-shrink: 0;
}

/* --- Blog post grid / cards (used on homepage preview + blog index) --- */

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 720px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  display: block;
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.post-card-date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 10px;
}

.post-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
}

.post-card-excerpt {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 16px;
}

.post-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--violet);
}

.section-cta {
  text-align: center;
  margin-top: 28px;
}

.blog-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* --- Footer --- */

.footer {
  position: relative;
  z-index: 1;
  padding: 56px 20px 28px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-brand-name {
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 320px;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 6px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
}
.footer-links a:hover { color: var(--violet); }

.footer-bottom {
  max-width: 1080px;
  margin: 20px auto 0;
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  opacity: 0.8;
  margin: 0;
}

/* --- Blog pages (index + post) --- */

.page-main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.blog-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.page-title {
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

.post-back {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 20px;
}
.post-back:hover { color: var(--ink); }

.post-article {
  max-width: 720px;
  margin: 0 auto;
}

.post-article-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 10px;
}

.post-article .page-title { margin-bottom: 32px; }

.post-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}

.post-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}

.post-content p { margin: 0 0 18px; }

.post-content ul, .post-content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.post-content li { margin-bottom: 8px; }

.post-content a {
  color: var(--violet);
  text-decoration: underline;
  text-decoration-color: rgba(124, 92, 252, 0.35);
}

.post-content strong { font-weight: 700; }

.post-cta {
  margin-top: 48px;
  padding: 28px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.post-cta p {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
}

/* --- Responsive --- */

@media (max-width: 600px) {
  .upload-card-inner { padding: 40px 20px; }
  .result-card, .no-match-card, .error-card { padding: 22px; }
  .hero { padding-top: 36px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .trust-badges { gap: 8px; }
  .trust-badge { padding: 8px 12px; font-size: 12px; }
}
