/* ==========================================================================
   AtomLocal WWW — Global Styles
   Clean modern SaaS design. Primary #1a56db. Inter font stack.
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #1a56db;
  --color-primary-dark: #1444b0;
  --color-primary-light: #e1effe;
  --color-secondary: #0f172a;
  --color-accent: #10b981;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e2e8f0;
  --container: 1200px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --transition: 150ms ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-secondary);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

.text-muted {
  color: var(--color-text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

.btn-accent:hover {
  background: #059669;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.125rem;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-secondary);
  letter-spacing: -0.025em;
}

.nav-logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-cta {
  margin-left: 0.5rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-secondary);
  margin: 5px 0;
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-bg) 100%);
}

.hero h1 {
  max-width: 800px;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 620px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 560px;
  margin-inline: auto;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.card .card-link {
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  padding: 3rem 0;
  background: var(--color-secondary);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item .stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.stat-item .stat-label {
  font-size: 0.875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Directory Showcase ---------- */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.directory-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all var(--transition);
}

.directory-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.directory-card .dir-name {
  font-weight: 600;
  color: var(--color-secondary);
}

.directory-card .dir-domain {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ---------- Feature List ---------- */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1.0625rem;
}

.feature-list .check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  margin-top: 2px;
}

/* ---------- Two-Column Layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.two-col.reverse {
  direction: rtl;
}

.two-col.reverse > * {
  direction: ltr;
}

/* ---------- CTA Section ---------- */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 100%);
  color: #fff;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-section p {
  color: #cbd5e1;
  font-size: 1.125rem;
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.cta-section .btn-primary {
  background: #fff;
  color: var(--color-primary);
}

.cta-section .btn-primary:hover {
  background: #f1f5f9;
  color: var(--color-primary-dark);
}

/* ---------- Pricing / Tiers ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tier-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

.tier-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary);
  position: relative;
}

.tier-card .tier-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tier-card .tier-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.tier-card .tier-price span {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.tier-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tier-card ul li {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  padding-left: 1.5rem;
  position: relative;
}

.tier-card ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ---------- Code / API Preview ---------- */
.code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-block .keyword { color: #818cf8; }
.code-block .string  { color: #34d399; }
.code-block .comment { color: #475569; }
.code-block .number  { color: #f59e0b; }

/* ---------- Footer ---------- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* ---------- Legal Pages ---------- */
.legal {
  padding: 4rem 0;
}

.legal h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.legal .last-updated {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 2.5rem;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal p,
.legal ul {
  margin-bottom: 1rem;
  color: var(--color-text);
  line-height: 1.8;
}

.legal ul {
  padding-left: 1.5rem;
}

.legal ul li {
  margin-bottom: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .two-col.reverse {
    direction: ltr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .hero { padding: 3rem 0 2.5rem; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-md);
  }

  .directory-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tier-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
