/* Layout and components shared by the public pages (home, shop, info, contact, legal).
   Colors, radii and fonts come from theme.css so everything matches the dashboard. */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* ── Background decoration ── */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(rgba(147, 168, 198, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 168, 198, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 88%);
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-a {
  top: -140px;
  left: -80px;
  background: var(--blue);
}

.orb-b {
  bottom: -180px;
  right: -100px;
  background: var(--teal);
  animation-duration: 17s;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(34px, -28px); }
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 20;
}

.scroll-progress-bar {
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--accent-gradient);
}

/* ── Header ── */
.top-nav {
  width: min(1120px, 92vw);
  margin: 16px auto 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.brand-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-gradient);
  color: #06101e;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.site-links {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.site-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.875rem;
}

.site-links a:hover,
.site-links a[aria-current="page"] {
  color: var(--text);
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-chip {
  font-size: 0.75rem;
  color: var(--text2);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg3);
}

/* ── Buttons (same look as the dashboard .btn) ── */
.btn,
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn-primary,
.primary-btn {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #06101e;
  box-shadow: 0 12px 24px rgba(70, 166, 255, 0.22);
}

.btn-primary:hover,
.primary-btn:hover {
  background: linear-gradient(135deg, #59b0ff, #72e7c0);
}

.btn-secondary,
.ghost-btn {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(147, 168, 198, 0.24);
  color: var(--text);
}

.btn-secondary:hover,
.ghost-btn:hover {
  background: var(--bg4);
}

.btn:disabled,
.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Page shell and typography ── */
main,
.page-shell {
  width: min(1120px, 92vw);
  margin: 28px auto 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--card-bg), var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-md);
  padding: clamp(18px, 4vw, 32px);
}

/* Hero panels use the tinted look of the dashboard page header. */
.hero.panel {
  background: var(--header-tint), var(--bg2);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.lead {
  margin-top: 12px;
  max-width: 68ch;
  color: var(--text2);
  font-size: 1rem;
}

.section-head h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
}

.section-copy {
  margin-top: 8px;
  max-width: 66ch;
  color: var(--text2);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

.hidden {
  display: none !important;
}

/* ── Content cards (info, contact and shop pages) ── */
.page-card {
  background: var(--header-tint), var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-md);
  padding: clamp(20px, 4vw, 34px);
}

.page-card h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.12;
}

.page-card .lead {
  max-width: 72ch;
}

.info-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.copy-card {
  background: var(--card-bg), var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.page-card .copy-card {
  background: var(--bg);
}

.copy-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.copy-card p {
  color: var(--text2);
}

@media (max-width: 760px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .top-nav,
  main,
  .page-shell {
    width: 94vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
