/*---------------------------------------
  BASE — Reset, Typography, Globals
  Inspired by Barista Cafe aesthetic
-----------------------------------------*/

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--white-color);
    font-family: var(--body-font-family);
    color: var(--p-color);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
}

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

h1 {
    font-size: var(--h1-font-size);
    color: var(--white-color);
}

h2 {
    font-size: var(--h2-font-size);
}

h3 {
    font-size: var(--h3-font-size);
}

h4 {
    font-size: var(--h4-font-size);
}

h5 {
    font-size: var(--h5-font-size);
}

h6 {
    font-size: var(--h6-font-size);
}

p {
    color: var(--p-color);
    font-size: var(--p-font-size);
    font-weight: var(--font-weight-light);
    line-height: 1.7;
}

ul {
    list-style: none;
}

a,
button {
    touch-action: manipulation;
    transition: var(--transition-base);
}

a {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
}

b,
strong {
    font-weight: var(--font-weight-bold);
}

blockquote {
    border: none;
    padding: 0;
    margin: 0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--dark-soft);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--border-radius-large);
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---- Selection ---- */
::selection {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* ---- Skip Navigation Link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--primary-color);
  color: var(--white-color);
  padding: 10px 20px;
  border-radius: var(--border-radius-small);
  z-index: 10000;
  font-weight: var(--font-weight-bold);
  font-size: var(--btn-font-size);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* ---- Screen Reader Only (AI SEO + Accessibility) ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---- Focus Visible (WCAG 2.1 AA) ---- */
:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}