/*
 * Base — CSS reset, box-sizing, html/body defaults, global element resets.
 * No component-level rules here.
 * Depends on: variables.css
 *
 * @package Vinelec
 */

/* =================================================================
   RESET
   ================================================================= */

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

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

body {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  background: var(--clr-bg);
  color: var(--clr-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Prevent scroll when mobile menu is open */
body.nav-open {
  overflow: hidden;
}

/* =================================================================
   GLOBAL ELEMENT DEFAULTS
   ================================================================= */

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

/* =================================================================
   SKIP TO CONTENT (accessibility)
   ================================================================= */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--clr-primary);
  color: var(--clr-white);
  padding: 12px 20px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* =================================================================
   WORDPRESS CORE CLASSES
   ================================================================= */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--clr-bg-alt);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--clr-white);
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* WordPress alignment classes */
.alignleft  { float: left;  margin-right: var(--space-md); }
.alignright { float: right; margin-left: var(--space-md);  }
.aligncenter { display: block; margin-inline: auto; }

/* WordPress admin bar offset */
.admin-bar .site-header,
.admin-bar .offcanvas {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header,
  .admin-bar .offcanvas {
    top: 46px;
  }
}
