/**
 * Element Security — base.css
 * Modern CSS reset + structural primitives.
 * normalize.css has been removed; all essentials are included here.
 * Visual design lives in modern-design.css.
 */

/* ============================================================
   MODERN CSS RESET
   Based on Andy Bell's reset + Josh Comeau's additions
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ol, ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Remove animations for people who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Remove background-attachment:fixed on touch devices (parallax fix) */
@media (hover: none) and (pointer: coarse) {
  * {
    background-attachment: scroll !important;
  }
}

/* ============================================================
   STRUCTURAL PRIMITIVES
   Replaces Webflow w-* layout classes
   ============================================================ */

/* Container — replaces w-container */
.es-container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  width: 100%;
}

.es-container--narrow {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  width: 100%;
}

/* Inline block — replaces w-inline-block */
.es-inline {
  display: inline-block;
  max-width: 100%;
}

/* Hidden — replaces w-hidden */
.es-hidden {
  display: none !important;
}

/* Embed block — replaces w-embed */
.es-embed {
  display: block;
}

/* Flex row — replaces w-row */
.es-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* ============================================================
   FORM STRUCTURAL BASE
   Visual styles come from modern-design.css
   ============================================================ */

.es-form {
  display: block;
}

.es-form-done {
  display: none;
  padding: 20px;
  text-align: center;
}

.es-form-fail {
  display: none;
  padding: 12px;
}

.es-label {
  display: inline-block;
  margin-bottom: 6px;
}

.es-input {
  display: block;
  width: 100%;
}

.es-select {
  display: block;
  width: 100%;
  cursor: pointer;
}

textarea.es-input {
  resize: vertical;
}

.es-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.es-checkbox-input {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-accent, #3b82f6);
}

/* ============================================================
   NAVIGATION STRUCTURAL BASE
   Visual styles come from modern-design.css (.es-nav)
   ============================================================ */

/* Legacy nav classes — structural only, visual overridden by .es-nav */
.w-nav {
  position: relative;
}

.w-nav-brand,
.w-nav-link {
  display: inline-block;
}

.w-nav-button {
  display: none;
  cursor: pointer;
}
