/**
 * GeoLocker - Professional shared stylesheet
 * Served from R2 at /css/base.css
 */

:root {
  --color-text: #1f2937;
  --color-text-secondary: #4b5563;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-accent: #4f46e5;
  --color-accent-dark: #4338ca;
  --color-footer: #0f172a;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --container: 1200px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

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

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

h1, h2, h3, h4 {
  color: var(--color-text);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: 2.25rem; margin: 0 0 var(--space-4); }
h2 { font-size: 1.5rem; margin: 0 0 var(--space-4); }
h3 { font-size: 1.25rem; margin: 0 0 var(--space-3); }
h4 { font-size: 1rem; margin: 0 0 var(--space-2); }

p { margin: 0 0 var(--space-4); }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-accent);
  color: white;
}
.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  text-decoration: none;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.section {
  background: var(--color-surface);
  margin: var(--space-8) 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-8) var(--space-6);
}

.nav-breadcrumb {
  background: var(--color-surface);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.nav-breadcrumb a {
  color: var(--color-accent);
  font-weight: 500;
}

.footer {
  background: var(--color-footer);
  color: #e2e8f0;
  text-align: center;
  padding: var(--space-8) 0;
  margin-top: var(--space-10);
}
.footer a {
  color: #cbd5e1;
  margin: 0 var(--space-4);
  font-size: 0.9rem;
}
.footer a:hover { color: white; }
.footer-nav { margin-bottom: var(--space-4); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.feature-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);

/* Ensure text is visible on dark header bars used in some pages */
header h1,
header h2,
header h3,
.use-case-header h2,
.use-case-header h1,
.use-case-header h3 {
  color: white !important;
}
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border);
}
.feature-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.feature-card .icon { color: var(--color-accent); margin-bottom: var(--space-4); display: block; }
.feature-card h3 { margin-bottom: var(--space-3); }
.feature-card p { color: var(--color-text-secondary); font-size: 0.95rem; margin: 0; }

.tier {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: var(--space-6) 0;
  position: relative;
}
.tier-free { border-color: #16a34a; background: #f0fdf4; }
.tier-premium { border-color: #4f46e5; background: #f0f4ff; }
.tier-ultimate { border-color: #7c3aed; background: #f5f3ff; }

.tier-badge {
  position: absolute;
  top: -12px;
  left: var(--space-6);
  background: white;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid var(--color-border);
}

ul.feature-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0;
}
ul.feature-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
ul.feature-list li:last-child { border-bottom: none; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.spec-item {
  background: var(--color-bg);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
}

.content-section { margin: var(--space-8) 0; }

.warning-box {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-6) 0;
  color: #713f12;
}

.comparison-table {
  overflow-x: auto;
  margin: var(--space-6) 0;
}
.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.comparison-table th, .comparison-table td {
  padding: var(--space-3) var(--space-2);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.comparison-table .check,
.comparison-table .cross {
  font-size: 1rem;
  display: inline-block;
  min-width: 1em;
}
.comparison-table th { background: var(--color-bg); font-weight: 600; }

.comparison-table table {
  table-layout: fixed;
}

.comparison-table th:not(:first-child),
.comparison-table td:not(:first-child) {
  text-align: center;
}

.comparison-table th:first-child {
  width: 32%;
}

.comparison-table th:not(:first-child),
.comparison-table td:not(:first-child) {
  width: 22.666%;
}

.check {
  color: #28a745 !important;
  font-weight: bold;
}

.cross {
  color: #dc3545 !important;
  font-weight: bold;
}

.hero {
  padding: var(--space-12) 0;
  color: white;
  text-align: center;
}
.hero h1 {
  font-size: 2.75rem;
  margin-bottom: var(--space-3);
  color: white;
}
.hero .subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: var(--space-6);
}

.icon-large {
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-4); }
  .hero h1 { font-size: 2rem; }
  .section, .card { padding: var(--space-5); }
  .feature-grid { gap: var(--space-4); }
}

/* Focus styles */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Additional polish for headers with map backgrounds */
header {
  color: white;
  position: relative;
}

header .hero {
  padding: 3rem 0;
}

header .hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

header .hero .subtitle {
  font-size: 1.25rem;
  opacity: 0.95;
}

.hero .description {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  opacity: 0.9;
  font-size: 1.05rem;
}

/* Stronger cards and sections */
.card {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
}

.section {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Tier styling */
.tier {
  border-width: 2px;
}

.tier-free { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); }
.tier-premium { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }
.tier-ultimate { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); }

/* Screenshot images */
img[alt*="GeoLocker"], img[alt*="vault"], img[alt*="Creating"] {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Better feature cards */
.feature-card {
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.feature-card:hover {
  border-color: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Restore some original flair for CTAs */
.cta-section {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: white;
}

.cta-section h2 {
  color: white;
}

/* Make sure headers with background have good padding and overlay feel if needed */

/* More consistent feature page styles */
.feature-hero { text-align: center; margin-bottom: var(--space-8); }
.content-section { margin: var(--space-8) 0; }
.content-section h3 { margin-bottom: var(--space-3); }

.warning-box {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-6) 0;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.spec-item {
  background: var(--color-bg);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
}


/* Consistent header and content for all pages */
header {
  color: white;
}
header .hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}
header .hero p {
  opacity: 0.9;
  margin: 0;
}

.section {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.card {
  border: 1px solid var(--color-border);
}

