/* Base element styles & resets */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
}

img {
  max-width: 100%;
  display: block;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 var(--space-3);
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.15;
}

p {
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

button,
input,
select {
  font-family: var(--font-body);
  font-size: 1rem;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Lucide icon font sizing */
[class^="icon-"] {
  font-size: 1.15em;
  line-height: 1;
}

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