/**
 * XSHIELD1 — Base Styles
 * ---------------------------------------------------------------------------
 * Font loading, a lean reset, and default element styling. Component /
 * template-specific CSS lives in its own files enqueued alongside this one —
 * base.css only sets the foundation every page inherits.
 */

/* ---------------------------------------------------------------------------
 * Font face: Inter (self-hosted, variable font)
 * ---------------------------------------------------------------------------
 * TEMPORARY CDN FALLBACK: assets/fonts/inter/ only ever contained a
 * README placeholder — the two real .woff2 files were never actually
 * added to the theme package, so every @font-face below was 404-ing and
 * the whole site was silently falling back to the browser's default
 * sans-serif. This is the actual cause of "Inter isn't used anywhere" —
 * it's not a CSS bug, the font files simply don't exist on disk yet.
 *
 * Each rule below tries the local (self-hosted) file FIRST, then a
 * Fontsource CDN copy as a fallback — browsers move on to the next src
 * when one 404s, so this renders in Inter right now and will
 * automatically prefer the faster self-hosted file the moment the two
 * real files are uploaded. No further CSS change needed at that point.
 *
 * TO REMOVE THE CDN DEPENDENCY: drop the two real files here, then
 * delete the extra jsDelivr url() line from each rule below:
 *   assets/fonts/inter/InterVariable.woff2
 *   assets/fonts/inter/InterVariable-Italic.woff2
 * Get both from https://rsms.me/inter/ ("Inter Variable" download) or
 * https://github.com/rsms/inter/releases.
 * ------------------------------------------------------------------------ */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/InterVariable.woff2') format('woff2-variations'),
       url('../fonts/inter/InterVariable.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@5.3.0/latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/InterVariable-Italic.woff2') format('woff2-variations'),
       url('../fonts/inter/InterVariable-Italic.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@5.3.0/latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--xs-font-sans);
  font-size: var(--xs-fs-base);
  font-weight: var(--xs-fw-regular);
  line-height: var(--xs-lh-normal);
  color: var(--xs-color-text);
  background-color: var(--xs-color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

figure {
  margin: 0;
}

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

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------------------------------------------------------------------------
 * Typography defaults
 * ------------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--xs-space-3);
  font-family: var(--xs-font-display);
  font-weight: var(--xs-fw-bold);
  line-height: var(--xs-lh-tight);
  letter-spacing: var(--xs-ls-tight);
  color: var(--xs-color-text);
}

h1 { font-size: var(--xs-fs-4xl); }
h2 { font-size: var(--xs-fs-3xl); }
h3 { font-size: var(--xs-fs-2xl); }
h4 { font-size: var(--xs-fs-xl); }
h5 { font-size: var(--xs-fs-lg); }
h6 { font-size: var(--xs-fs-md); }

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

a {
  color: var(--xs-color-link);
  text-decoration: none;
  transition: color var(--xs-duration-fast) var(--xs-ease-standard);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--xs-color-focus-ring);
  outline-offset: 2px;
}

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

small {
  font-size: var(--xs-fs-sm);
  color: var(--xs-color-text-muted);
}

/* ---------------------------------------------------------------------------
 * Layout primitives
 * ------------------------------------------------------------------------ */
.xs-container {
  width: 100%;
  max-width: var(--xs-container-max);
  margin-inline: auto;
  padding-inline: var(--xs-container-pad);
}

/* Generic fallback content wrapper (index.php) — same vertical rhythm as
   every other top-level page wrapper (.xs-page, .xs-archive, .xs-single,
   .xs-cart-page, .xs-checkout-page). */
.xs-content {
  padding-block: var(--xs-space-7) var(--xs-space-9);
}

.xs-screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.xs-screen-reader-text:focus {
  position: fixed;
  top: var(--xs-space-2);
  left: var(--xs-space-2);
  width: auto;
  height: auto;
  padding: var(--xs-space-2) var(--xs-space-3);
  background: var(--xs-color-bg);
  color: var(--xs-color-text);
  z-index: var(--xs-z-toast);
  clip: auto;
}

/* ---------------------------------------------------------------------------
 * Buttons (baseline — brand-specific variants live in component CSS)
 * ------------------------------------------------------------------------ */
.xs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--xs-space-2);
  padding: var(--xs-space-3) var(--xs-space-5);
  font-weight: var(--xs-fw-semibold);
  font-size: var(--xs-fs-sm);
  letter-spacing: var(--xs-ls-wide);
  text-transform: uppercase;
  border-radius: 0;
  transition: background-color var(--xs-duration-fast) var(--xs-ease-standard),
              color var(--xs-duration-fast) var(--xs-ease-standard),
              border-color var(--xs-duration-fast) var(--xs-ease-standard);
}

.xs-btn--primary {
  background-color: var(--xs-color-brand);
  border-color: var(--xs-color-brand);
  color: var(--xs-color-on-brand);
}

.xs-btn--primary:hover {
  background-color: var(--xs-color-brand-hover);
  border-color: var(--xs-color-brand-hover);
  color: var(--xs-color-on-brand);
}

.xs-btn--outline {
  background-color: transparent;
  border-color: currentColor;
  color: var(--xs-color-text);
}

.xs-btn--outline:hover {
  background-color: var(--xs-color-text);
  color: var(--xs-color-bg);
}

/* ---------------------------------------------------------------------------
 * Generic content typography (page.php, and anywhere else that renders
 * the_content() without its own dedicated stylesheet, e.g. blog.css)
 * ------------------------------------------------------------------------ */
.xs-page {
  padding-block: var(--xs-space-7) var(--xs-space-9);
}

.xs-page__article {
  max-width: 800px;
  margin-inline: auto;
}

.xs-page__header {
  margin-bottom: var(--xs-space-6);
}

.xs-page__title {
  margin: 0;
  font-size: var(--xs-fs-3xl);
  font-weight: var(--xs-fw-bold);
  letter-spacing: var(--xs-ls-tight);
}

.xs-page__thumbnail {
  margin-bottom: var(--xs-space-7);
  border-radius: var(--xs-radius-lg);
  overflow: hidden;
}

.xs-page__thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.xs-page__content {
  font-size: var(--xs-fs-md);
  line-height: var(--xs-lh-loose);
  color: var(--xs-color-text);
}

.xs-page__content > * + * {
  margin-top: var(--xs-space-5);
}

.xs-page__content h2 {
  font-size: var(--xs-fs-2xl);
  font-weight: var(--xs-fw-bold);
  margin-top: var(--xs-space-7);
}

.xs-page__content h3 {
  font-size: var(--xs-fs-xl);
  font-weight: var(--xs-fw-bold);
  margin-top: var(--xs-space-6);
}

.xs-page__content a {
  color: var(--xs-color-brand);
  text-decoration: underline;
}

.xs-page__content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--xs-radius-md);
}

.xs-page__content ul,
.xs-page__content ol {
  padding-left: var(--xs-space-6);
}

.xs-page__page-links {
  margin-top: var(--xs-space-6);
  font-size: var(--xs-fs-sm);
}

.xs-page__comments {
  max-width: 800px;
  margin: var(--xs-space-8) auto 0;
  padding-top: var(--xs-space-7);
  border-top: var(--xs-border-width) solid var(--xs-color-border);
}

/* ---------------------------------------------------------------------------
 * 404
 * ------------------------------------------------------------------------ */
.xs-404 {
  padding-block: var(--xs-space-9);
  display: flex;
  justify-content: center;
}

.xs-404__inner {
  max-width: 480px;
  text-align: center;
}

.xs-404__code {
  margin: 0 0 var(--xs-space-3);
  font-size: var(--xs-fs-5xl);
  font-weight: var(--xs-fw-black);
  color: var(--xs-color-brand);
  line-height: 1;
}

.xs-404__title {
  margin: 0 0 var(--xs-space-3);
  font-size: var(--xs-fs-2xl);
  font-weight: var(--xs-fw-bold);
}

.xs-404__message {
  margin: 0 0 var(--xs-space-6);
  color: var(--xs-color-text-muted);
}

.xs-404__actions {
  display: flex;
  gap: var(--xs-space-3);
  justify-content: center;
  margin-bottom: var(--xs-space-7);
}

.xs-404__search {
  max-width: 320px;
  margin-inline: auto;
}

.xs-404__search .search-form {
  display: flex;
  gap: var(--xs-space-2);
}

.xs-404__search .search-field {
  flex: 1;
  height: 44px;
  padding: 0 var(--xs-space-4);
  border: var(--xs-border-width) solid var(--xs-color-border);
  border-radius: var(--xs-radius-md);
  font-size: var(--xs-fs-sm);
  font-family: var(--xs-font-sans);
}

.xs-404__search .search-submit {
  height: 44px;
  padding: 0 var(--xs-space-5);
  background-color: var(--xs-color-brand);
  border: none;
  border-radius: var(--xs-radius-md);
  color: var(--xs-color-on-brand);
  font-weight: var(--xs-fw-semibold);
  cursor: pointer;
}

.xs-404__search .search-submit:hover {
  background-color: var(--xs-color-brand-hover);
}
