/* ============================================
   BITBYTE CREATIONS — Base / Reset / Typography
   Dense Mobile-First Layout
   ============================================ */

/* ---- Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Remove default focus outlines for mouse users while maintaining accessibility */
:focus { outline: none; }
::-moz-focus-inner { border: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--gray-700);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: 90px; /* Space for mobile sticky footer */
}

@media (min-width: 968px) {
  body { padding-bottom: 0; }
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4); /* Increased from space-3 for better mobile breathing room */
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* ---- Typography (mobile-first, dense) ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
}

h1 {
  font-size: var(--text-3xl); /* Increased from 2xl */
  letter-spacing: -0.04em;
}

h2 {
  font-size: var(--text-2xl); /* Increased from xl */
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

h4 { font-size: var(--text-base); }
h5 { font-size: var(--text-sm); font-weight: var(--font-semibold); }
h6 { font-size: var(--text-sm); font-weight: var(--font-medium); }

p {
  margin-bottom: var(--space-4);
  color: var(--gray-500);
}

.text-accent { color: var(--primary-light); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }

/* ---- Section Defaults (Dense) ---- */
.section {
  padding: var(--space-10) 0;
  position: relative;
}

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

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--white);
}

.section--dark p {
  color: var(--gray-300);
}

.section--gray {
  background: var(--gray-50);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  color: var(--secondary-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.section__label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

.section__label--vibrant {
  background: var(--gradient-vibrant);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section__label--vibrant::before {
  background: #0369a1; /* Match start of vibrant gradient */
}

.section__title {
  margin-bottom: var(--space-2);
}

.section__subtitle {
  font-size: var(--text-sm);
  max-width: 580px;
  margin-bottom: var(--space-3);
  line-height: var(--leading-relaxed);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-5);
}

.section__header .section__subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Minimal Scroll Animation ---- */
.fade-in {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Visibility Helpers ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hide-mobile { display: none; }
.show-mobile { display: block; }

/* ---- Breadcrumbs ---- */
.breadcrumbs {
  padding: var(--space-2) 0;
  font-size: var(--text-xs);
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

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

.breadcrumbs__separator {
  margin: 0 var(--space-1);
  color: var(--gray-300);
  opacity: 0.6;
}

.breadcrumbs__current {
  color: var(--gray-700);
  font-weight: var(--font-medium);
}

/* ---- Phone Mockup (CSS-only device frame) ---- */
.phone-mockup {
  position: relative;
  width: var(--phone-width);
  height: var(--phone-height);
  background: #111827;
  border-radius: var(--phone-radius);
  padding: var(--phone-bezel);
  box-shadow: var(--phone-shadow);
  margin: 0 auto;
  flex-shrink: 0;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: var(--phone-bezel);
  left: 50%;
  transform: translateX(-50%);
  width: var(--phone-notch-width);
  height: var(--phone-notch-height);
  background: #111827;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-mockup__screen {
  width: 100%;
  height: 100%;
  border-radius: calc(var(--phone-radius) - var(--phone-bezel));
  overflow: hidden;
  position: relative;
  background: var(--gray-100);
}

.phone-mockup__screen img,
.phone-mockup__screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ---- Responsive: Tablet ---- */
@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .container { padding: 0 var(--space-6); }

  .section { padding: var(--space-12) 0; }

  .section__subtitle {
    font-size: var(--text-lg);
    margin-bottom: var(--space-5);
  }

  .section__header { margin-bottom: var(--space-8); }

  .hide-mobile { display: block; }
  .show-mobile { display: none; }

  .phone-mockup {
    --phone-width: 260px;
    --phone-height: 530px;
  }
}

/* ---- Responsive: Desktop ---- */
@media (min-width: 1024px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-xl); }

  .section { padding: var(--space-16) 0; }

  .phone-mockup {
    --phone-width: 280px;
    --phone-height: 570px;
  }
}