@import url("theme.css");
@import url("components.css");

/* ==========================================================================
   StoreVela — Base
   Reset, layout, navbar. Loaded on every page.
   Colours, fonts, radii, shadows and motion: ../theme.css.
   Buttons, form fields, cards, chips, badges: ../components.css.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  position: relative;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--gradient-page-glow);
}

::selection { background: var(--color-selection); color: var(--color-text); }

body > * { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.12;
  letter-spacing: var(--heading-tracking);
}

:focus-visible {
  outline: 2px solid var(--color-kicker);
  outline-offset: 3px;
  border-radius: var(--radius-focus);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--space-section) 0; position: relative; }
.section + .section { border-top: 1px solid var(--color-line); }
.section-alt {
  background-color: var(--color-bg-alt);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ---------------------------------- */
/* 4. Navbar                          */
/* ---------------------------------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: clamp(10px, 2.5vw, 20px) 0;
  transition: all var(--transition-med);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background-color: var(--color-navbar-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 10px 12px 10px 20px;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-slow), box-shadow var(--transition-slow);
}

.navbar.scrolled .navbar-inner {
  box-shadow: var(--shadow-header);
  background-color: var(--color-navbar-bg-scrolled);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-logo);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-logo);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-primary);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

/* Brand logo image in place of the old "SH" lettermark */
img.nav-logo-mark {
  background: none;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-nav);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-links a:hover { color: var(--color-text); background-color: var(--color-hover-fill); }
.nav-links a.active {
  color: var(--color-text);
  background: var(--gradient-text) left calc(100% - 2px) / 100% 2px no-repeat;
}

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

.auth-toggle-theme { position: absolute; top: 32px; right: 40px; z-index: 10; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ---------------------------------- */
/* 13. Back to Top                    */
/* ---------------------------------- */

/* ---------------------------------- */
/* 14. Scroll Reveal                  */
/* ---------------------------------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > * { animation: none; }

/* ---------------------------------- */
/* 17. Utilities                      */
/* ---------------------------------- */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    padding: 12px;
  }
  :root { --space-section: var(--space-section-mobile); }
}

/* Phones: keep the header on one line. Register Business is right below in the
   hero, so the header keeps a compact Sign In plus the menu button. */
@media (max-width: 600px) {
  .nav-actions { gap: 8px; }
  .nav-actions .btn-primary { display: none; }
  .nav-actions .btn { min-height: 38px; padding: 0 14px; font-size: 13.5px; }
  .navbar-inner { padding: 8px 8px 8px 14px; }
}

/* Reduced motion: every animation and transition off, content shown at once */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
