/* Mobile-first, site-wide helpers */

:root {
  --bp-md: 900px;
  --bp-sm: 680px;
  --bp-xs: 480px;
}

/* Never side-scroll on small screens */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* Make media responsive by default */
img,
svg,
video,
canvas,
audio,
iframe {
  max-width: 100%;
  height: auto;
}

/* Fluid type scale */
h1 {
  font-size: clamp(1.6rem, 2vw + 1rem, 3rem);
}

h2 {
  font-size: clamp(1.4rem, 1.6vw + 0.9rem, 2.4rem);
}

h3 {
  font-size: clamp(1.2rem, 1.2vw + 0.7rem, 1.6rem);
}

p,
li,
a,
label,
input,
button {
  font-size: clamp(.95rem, .6vw + .75rem, 1.05rem);
}

h1,
h2,
h3,
h4,
p,
a,
li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Generic container utility (opt-in if used) */
.container {
  width: min(100%, 1200px);
  margin-inline: auto;
  padding-inline: 16px;
}

/* Headers and nav (works for custom and HTML5UP pages) */
header {
  padding-inline: clamp(12px, 2.5vw, 24px);
}

header nav ul,
nav#nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding-left: 0;
}

header nav ul {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

header nav ul li,
nav#nav a {
  margin: 0 !important;
}

/* Heros and sections */
.hero {
  padding: clamp(48px, 7vw, 96px) 12px;
}

.section {
  padding: clamp(32px, 6vw, 56px) 16px;
}

/* Grids and cards */
.stories {
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2.5vw, 20px);
}

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

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

/* Footer stacks to one column on mobile */
.footer-wrap {
  grid-template-columns: 1fr !important;
  gap: 16px;
}

/* Forms and buttons */
input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  max-width: 100%;
}

button,
.button,
.cta-button,
.cta {
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

/* Tables (wrap in .table-responsive if needed) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* App store badges scale gracefully */
.store-badge {
  height: clamp(40px, 5vw + 28px, 56px);
}

.store-badges {
  gap: clamp(10px, 2.5vw, 16px);
}

/* Extra small tweaks */
@media (max-width: 680px) {
  header h1 {
    font-size: 18px;
  }
}

/* Classy compact mobile header (no color changes) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .brand-title,
.site-header h1,
.site-header .brand h1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hamburger */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: transparent;
  color: inherit;
}

.menu-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  margin: 3px 0;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Collapsible nav for mobile */
@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .site-header .nav-collapsible {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--mobile-nav-bg, rgba(12, 14, 24, .96));
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    backdrop-filter: blur(8px);
  }

  .site-header .nav-collapsible.open {
    display: block;
  }

  .site-header .nav-collapsible ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    margin: 0;
    gap: 6px;
  }

  .site-header .nav-collapsible a {
    display: block;
    padding: 12px 10px;
    border-radius: 12px;
    color: #fff !important;
    text-decoration: none;
  }

  /* Keep SLICK pill distinct */
  /* Keep SLICK pill distinct, match desktop gradient but full width */
  .site-header .nav-collapsible li.slick-tab a {
    background: var(--cta-gradient);
    color: var(--white) !important;
    border: none;
    text-align: center;
    margin-top: 8px;
    /* Add some separation */
    box-shadow: 0 4px 12px rgba(var(--brand-pink-rgb), 0.3);
  }
}

/* Desktop remains horizontal */
@media (min-width: 821px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .site-header .nav-collapsible ul {
    display: flex;
    gap: 16px;
  }
}