/* ==========================================================================
   Toner Shop - Base Styles (Reset, Typography, Utilities, Accessibility)
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--fs-body-mobile);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (min-width: 768px) {
  body {
    font-size: var(--fs-body);
  }
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  margin: 0 0 var(--space-4) 0;
}

h1 {
  font-size: var(--fs-h1-mobile);
  line-height: var(--lh-h1);
}

h2 {
  font-size: var(--fs-h2-mobile);
  line-height: var(--lh-h2);
}

h3 {
  font-size: var(--fs-h3-mobile);
  line-height: var(--lh-h3);
}

@media (min-width: 768px) {
  h1 { font-size: var(--fs-h1); }
  h2 { font-size: var(--fs-h2); }
  h3 { font-size: var(--fs-h3); }
}

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

ul, ol {
  margin: 0 0 var(--space-4) 0;
  padding-inline-start: var(--space-5);
}

button {
  font-family: inherit;
}

/* --- Focus visibility (accessibility requirement, section 21) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Skip to content link --- */
.skip-link {
  position: absolute;
  top: -100px;
  right: var(--space-4);
  left: auto;
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: var(--fw-semibold);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: var(--space-3);
}

/* --- Layout container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-6);
  }
}

/* --- Sections --- */
.section {
  padding: var(--section-padding-mobile) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--section-padding) 0;
  }
}

.section--alt {
  background: var(--color-tint-blue);
}

/* --- Visually hidden (screen-reader only) --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Push page content below the fixed mobile quick-contact bar --- */
body {
  padding-bottom: var(--mobile-bar-height);
}

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