/* ===== GeoStamper — Design System ===== */
:root {
  --bg:           #080e1a;
  --surface:      #0d1525;
  --card:         #111c2e;
  --card-2:       #162035;
  --border:       rgba(255,255,255,0.07);
  --border-2:     rgba(14,165,233,0.2);
  --accent:       #0ea5e9;
  --accent-2:     #38bdf8;
  --accent-glow:  rgba(14,165,233,0.15);
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --radius:       12px;
  --radius-lg:    18px;
  --shadow:       0 4px 32px rgba(0,0,0,0.5);
  --font-mono:    "Courier New", "Consolas", monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }

/* ===== NAV ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,14,26,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.1rem; color: var(--text);
  text-decoration: none;
}
.nav-logo {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
}
.nav-name span { color: var(--accent); }
.nav-links {
  display: flex; align-items: center; gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 0.4rem 1rem; border-radius: 8px; font-weight: 600;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--accent-2) !important; color: #fff !important; }
.nav-mobile-btn {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text); font-size: 1.4rem;
}

/* ===== HERO ===== */
.hero {
  padding: 3rem 1.5rem 2rem;
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.hero-text { padding-top: 1rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-glow); border: 1px solid var(--border-2);
  color: var(--accent-2); font-size: 0.8rem; font-weight: 600;
  padding: 0.3rem 0.8rem; border-radius: 20px; margin-bottom: 1.2rem;
}
.hero h1 {
  font-size: 2.2rem; font-weight: 800; line-height: 1.2;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--accent); }
.hero-sub {
  color: var(--text-muted); font-size: 1.05rem; line-height: 1.7;
  margin-bottom: 1.5rem;
}
.hero-stats {
  display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.hero-stat { text-align: center; }
.hero-stat-val { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.hero-stat-lbl { font-size: 0.75rem; color: var(--text-muted); }
.hero-trust {
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.82rem; color: var(--text-dim);
}
.trust-item::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ===== TOOL CARD ===== */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.tool-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  background: none; border: none; cursor: pointer;
  padding: 0.85rem 1rem;
  color: var(--text-muted); font-size: 0.9rem; font-weight: 600;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-glow);
}
.tab-btn:hover:not(.active) { color: var(--text); background: var(--card-2); }

/* GPS Bar */
.gps-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0.55rem 1rem;
  font-size: 0.82rem; color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 36px;
}
.gps-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-dim);
}
.gps-bar.fetching .gps-dot { background: var(--warning); animation: pulse 1s infinite; }
.gps-bar.found .gps-dot { background: var(--success); }
.gps-bar.denied .gps-dot, .gps-bar.error .gps-dot { background: var(--danger); }
.gps-bar.found { color: var(--text); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Panels */
.panel { padding: 1rem; }
.panel.hidden { display: none; }

/* Camera panel */
.video-wrap {
  position: relative; background: #000;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3;
}
.cam-video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.cam-overlay {
  position: absolute; inset: 0; pointer-events: none;
}
.cam-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 33.33% 33.33%;
}
.cam-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 0.75rem;
}
.btn-capture {
  flex: 1; max-width: 260px;
  background: var(--accent);
  color: #fff; border: none; border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-capture:hover { background: var(--accent-2); }
.btn-capture:active { transform: scale(0.97); }
.btn-switch {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
  transition: all 0.2s;
}
.btn-switch:hover { color: var(--text); border-color: var(--accent); }

/* Upload panel */
.drop-zone {
  display: block; cursor: pointer;
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  transition: all 0.2s;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent); background: var(--accent-glow);
}
.drop-zone input[type="file"] { display: none; }
.drop-inner {
  padding: 2.5rem 1rem; text-align: center;
}
.drop-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.drop-inner p { color: var(--text-muted); margin-bottom: 0.25rem; }
.drop-inner strong { color: var(--accent); }
.drop-hint { font-size: 0.8rem; color: var(--text-dim) !important; }

/* Preview */
.preview-wrap { padding: 1rem; }
.preview-wrap.hidden { display: none; }
.canvas-container {
  border-radius: var(--radius); overflow: hidden; background: #000;
  margin-bottom: 1rem; max-height: 320px;
  display: flex; align-items: center; justify-content: center;
}
#stampCanvas {
  max-width: 100%; max-height: 320px;
  display: block; border-radius: var(--radius);
}

/* Controls */
.ctrl-row {
  display: flex; flex-direction: column; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.ctrl-label {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em;
}
.template-btns {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 6px;
}
.tmpl-btn {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 8px;
  padding: 0.45rem 0.5rem; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.tmpl-btn.active {
  background: var(--accent-glow); border-color: var(--accent); color: var(--accent);
}
.tmpl-btn:hover:not(.active) { color: var(--text); border-color: var(--border-2); }

.toggles-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.toggle-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--text-muted); cursor: pointer;
  padding: 0.35rem 0.5rem; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface);
  transition: all 0.15s;
}
.toggle-label input { display: none; }
.toggle-label .tog-dot {
  width: 32px; height: 18px; border-radius: 9px;
  background: var(--text-dim); position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.toggle-label .tog-dot::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; transition: transform 0.2s;
}
.toggle-label input:checked + .tog-dot { background: var(--accent); }
.toggle-label input:checked + .tog-dot::after { transform: translateX(14px); }
.toggle-label.checked { border-color: var(--border-2); color: var(--text); }

.fmt-settings {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.fmt-group {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.3rem 0.5rem;
}
.fmt-lbl {
  font-size: 0.73rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em;
}
.seg-ctrl {
  display: flex; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--border);
}
.seg-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 0.78rem; font-weight: 600; padding: 0.22rem 0.45rem;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn.active {
  background: var(--accent-glow); color: var(--accent);
}
.seg-btn:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.04); }

.custom-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px; padding: 0.55rem 0.75rem;
  font-size: 0.88rem; outline: none; transition: border-color 0.2s;
}
.custom-input:focus { border-color: var(--accent); }
.custom-input::placeholder { color: var(--text-dim); }

.action-btns {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 0.75rem;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #fff; border: none; border-radius: 10px;
  padding: 0.75rem 1.2rem; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s, transform 0.1s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary {
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 10px;
  padding: 0.75rem 1rem; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-secondary:hover { color: var(--text); border-color: var(--border-2); }

/* ===== SECTIONS COMMON ===== */
.section { padding: 4rem 1.5rem; }
.section-inner { max-width: 1140px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-tag {
  display: inline-block;
  background: var(--accent-glow); color: var(--accent-2);
  border: 1px solid var(--border-2);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.25rem 0.7rem; border-radius: 20px; margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.section-header h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.6rem; }
.section-header p { color: var(--text-muted); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* ===== FEATURES ===== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--border-2); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent-glow); border: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ===== USE CASES ===== */
.use-cases-bg { background: var(--surface); }
.use-cases-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.use-case-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.use-case-icon { font-size: 1.8rem; }
.use-case-card h3 { font-size: 0.95rem; font-weight: 700; }
.use-case-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
.use-case-link {
  font-size: 0.82rem; color: var(--accent); font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}

/* ===== HOW IT WORKS ===== */
.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.step { text-align: center; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0284c7);
  color: #fff; font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p { font-size: 0.88rem; color: var(--text-muted); }

/* ===== ADVANTAGES vs APPS ===== */
.compare-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.compare-table th, .compare-table td {
  padding: 0.75rem 1rem; border: 1px solid var(--border); text-align: left;
}
.compare-table thead th { background: var(--card-2); font-weight: 700; color: var(--text-muted); }
.compare-table thead th:first-child { color: var(--text); }
.compare-table thead th.us { color: var(--accent); }
.compare-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.compare-table .yes { color: var(--success); font-weight: 700; }
.compare-table .no  { color: var(--danger); }
.compare-table .us-col { background: var(--accent-glow) !important; }

/* ===== FAQ ===== */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; text-align: left;
  color: var(--text); font-size: 0.95rem; font-weight: 600;
}
.faq-q:hover { color: var(--accent); }
.faq-arrow { color: var(--text-dim); font-size: 1.1rem; transition: transform 0.2s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a {
  display: none; padding: 0 1.25rem 1rem;
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ===== NETWORK FOOTER ===== */
.network-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 2rem 1.5rem; text-align: center;
}
.network-title {
  font-size: 0.75rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem;
}
.network-links {
  display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center;
  max-width: 1140px; margin: 0 auto;
}
.network-link {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.45rem 0.9rem;
  color: var(--text-muted); font-size: 0.82rem; font-weight: 600;
  transition: all 0.2s;
}
.network-link:hover { border-color: var(--border-2); color: var(--text); }
.network-icon-img { width: 18px; height: 18px; border-radius: 4px; }
.network-text { white-space: nowrap; }

.footer {
  background: var(--bg); border-top: 1px solid var(--border);
  padding: 1.5rem;
}
.footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copy { font-size: 0.82rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: 0.82rem; color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--text-muted); }

/* ===== PAGE LAYOUTS (about, guides, etc.) ===== */
.page-hero {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.page-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.6rem; }
.page-hero p { color: var(--text-muted); max-width: 580px; margin: 0 auto; }
.page-content {
  max-width: 800px; margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.page-content h2 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--accent-2); }
.page-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.page-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.page-content li { color: var(--text-muted); line-height: 1.8; margin-bottom: 0.3rem; }
.page-content a { color: var(--accent); }
.page-content strong { color: var(--text); }

/* Guide pages */
.guide-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 3rem 1.5rem; }
.guide-hero-inner { max-width: 800px; margin: 0 auto; }
.guide-breadcrumb {
  font-size: 0.8rem; color: var(--text-dim); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 6px;
}
.guide-breadcrumb a { color: var(--text-dim); }
.guide-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
.guide-hero .guide-meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--text-dim);
}
.guide-content { max-width: 800px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.guide-content h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--accent-2); }
.guide-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.guide-content ul, .guide-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.guide-content li { color: var(--text-muted); line-height: 1.8; margin-bottom: 0.4rem; }
.guide-content strong { color: var(--text); }
.guide-content a { color: var(--accent); }

.cta-box {
  background: var(--accent-glow); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 1.5rem; text-align: center;
  margin: 2rem 0;
}
.cta-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.cta-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.btn-cta {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 0.65rem 1.5rem; border-radius: 8px; font-weight: 700;
  font-size: 0.95rem; transition: background 0.2s;
}
.btn-cta:hover { background: var(--accent-2); color: #fff; }

.info-box {
  background: var(--card); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.info-box p { margin-bottom: 0 !important; }

/* ===== CONTRIBUTE ===== */
.contribute-section {
  max-width: 680px; margin: 3rem auto 2rem; padding: 2.5rem 2rem;
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); text-align: center;
}
.contribute-section h2 { font-size: 1.4rem; margin-bottom: 0.75rem; color: var(--text); }
.contribute-section p { color: var(--text-muted); margin-bottom: 1.5rem; }
.btn-support {
  display: inline-block; padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; border-radius: 8px;
  text-decoration: none; font-size: 1rem;
  transition: opacity 0.2s;
}
.btn-support:hover { opacity: 0.88; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-text { padding-top: 0; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .use-cases-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .hero { padding-top: 2rem; }
  .hero h1 { font-size: 1.7rem; }
  .features-grid { grid-template-columns: 1fr; }
  .use-cases-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
  .toggles-grid { grid-template-columns: 1fr; }
  .action-btns { grid-template-columns: 1fr; }
  .compare-table { font-size: 0.78rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
