:root {
  --blue: #2563eb;
  --blue2: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4f0;
  --bg: #f7faff;
  --card: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

main {
  flex: 1;
}

section, [id] {
  scroll-margin-top: 90px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Header / Navigation --- */
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 6%;
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.brand {
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  color: #0f172a;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
}

.brand span {
  display: inline-flex;
  align-items: center;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
}

.nav nav a:hover {
  color: var(--blue);
}

#auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--blue);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--blue2);
}

.btn.ghost {
  background: #fff;
  color: var(--blue);
  border-color: #bfd2ff;
}

.btn.ghost:hover {
  background: #eff6ff;
}

.btn.big {
  padding: 14px 24px;
  font-size: 15px;
}

/* --- Hero Section --- */
.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 50px 20px 36px;
  text-align: center;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--blue);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(30px, 4.5vw, 56px);
  line-height: 1.1;
  margin: 0 auto 18px;
  max-width: 800px;
  letter-spacing: -.03em;
  color: #0f172a;
}

.hero p {
  font-size: 17px;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 24px;
  line-height: 1.55;
}

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

.mini {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 13px;
  margin-top: 18px;
}

/* --- Grid & Cards --- */
.grid {
  max-width: 1100px;
  margin: 0 auto 50px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.grid article, .plans article, .cards article, .panel, .auth-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.03);
}

.grid p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

footer {
  text-align: center;
  padding: 24px 20px;
  color: #64748b;
  border-top: 1px solid var(--line);
  font-size: 13px;
  background: #fff;
  margin-top: auto;
}

.center {
  min-height: calc(100vh - 100px);
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-shell {
  width: min(460px, 100%);
  text-align: center;
}

.auth-shell .brand {
  justify-content: center;
  margin-bottom: 24px;
}

.auth-shell h1 {
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.tiny {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 22px;
}

.hidden {
  display: none !important;
}

.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 12px;
  border-radius: 10px;
  margin: 18px 0;
}

.dashboard, .pricing, .support {
  max-width: 1050px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 20px 50px;
  min-height: calc(100vh - 200px);
}

.dashboard h1, .pricing h1, .support h1 {
  font-size: 34px;
  letter-spacing: -.03em;
  margin-top: 6px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.cards span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.cards strong {
  font-size: 22px;
}

.panel {
  margin-top: 16px;
}

.panel p, .panel li {
  color: var(--muted);
  line-height: 1.6;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.plans h2 {
  font-size: 24px;
}

.price {
  font-size: 38px;
  font-weight: 800;
  margin: 10px 0;
}

.price span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.plans ul {
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.featured {
  border: 2px solid #93b4ff !important;
  position: relative;
}

.tag {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--blue);
  font-weight: 800;
  font-size: 12px;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 100px;
  }
  section, main, .support-section {
    scroll-margin-top: 100px;
  }
  .nav {
    padding: 10px 16px;
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
  }
  .nav nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 14px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
  }
  .nav nav a {
    font-size: 13px;
    font-weight: 600;
  }
  #auth {
    gap: 6px;
  }
  #auth .btn {
    padding: 8px 12px;
    font-size: 12px;
  }

  .hero {
    padding: 30px 16px 20px;
  }
  .hero h1 {
    font-size: 26px;
    line-height: 1.18;
    margin-bottom: 14px;
  }
  .hero p {
    font-size: 14.5px;
    margin-bottom: 20px;
  }
  .actions {
    flex-direction: column;
    width: 100%;
  }
  .actions .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
  }
  .mini {
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    margin-top: 14px;
  }

  .grid {
    grid-template-columns: 1fr;
    margin-bottom: 30px;
    padding: 0 16px;
    gap: 12px;
  }
  .cards, .plans {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard, .pricing, .support {
    padding: 24px 16px 36px;
    min-height: calc(100vh - 160px);
  }
  .support-section {
    margin: 30px 16px;
    padding: 24px 16px;
  }
  .dashboard h1, .pricing h1, .support h1 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 16px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .auth-shell {
    padding: 18px 14px;
  }
}
