/* ==========================================================================
   AGRINICHE UNITED CO. — FIELD LEDGER DESIGN SYSTEM
   Base Styles & Modern Reset
   File: assets/css/base.css
   Depends on: assets/css/variables.css
   ========================================================================== */


/* --------------------------------------------------------------------
   1. MODERN CSS RESET
   -------------------------------------------------------------------- */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
}

html,
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
}


/* --------------------------------------------------------------------
   2. UNIVERSAL BOX SIZING
   -------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}


/* --------------------------------------------------------------------
   3. HTML DEFAULTS
   -------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@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;
  }
}


/* --------------------------------------------------------------------
   4. BODY DEFAULTS
   -------------------------------------------------------------------- */

body {
  min-height: 100vh;
  background-color: var(--color-background);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  text-rendering: optimizeSpeed;
}


/* --------------------------------------------------------------------
   5. TYPOGRAPHY DEFAULTS
   -------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  text-wrap: balance;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p {
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

small {
  font-size: var(--font-size-sm);
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: 0.95em;
}

strong, b {
  font-weight: var(--font-weight-semibold);
}


/* --------------------------------------------------------------------
   6. IMAGES & MEDIA
   -------------------------------------------------------------------- */

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;
  background-repeat: no-repeat;
  background-size: cover;
}


/* --------------------------------------------------------------------
   7. LINKS
   -------------------------------------------------------------------- */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}

a:hover,
a:focus-visible {
  color: var(--color-primary-dark);
}

a:not([class]) {
  text-decoration-skip-ink: auto;
}


/* --------------------------------------------------------------------
   8. LISTS
   -------------------------------------------------------------------- */

ul,
ol {
  list-style: none;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}


/* --------------------------------------------------------------------
   9. BUTTONS RESET
   -------------------------------------------------------------------- */

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}


/* --------------------------------------------------------------------
   10. INPUTS & FORM ELEMENTS
   -------------------------------------------------------------------- */

input,
textarea,
select {
  font-family: inherit;
  font-size: var(--font-size-md);
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  appearance: none;
  -webkit-appearance: none;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-50);
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-secondary);
  opacity: 0.7;
}

label {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

fieldset {
  border: none;
}


/* --------------------------------------------------------------------
   11. SELECTION COLORS
   -------------------------------------------------------------------- */

::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}


/* --------------------------------------------------------------------
   12. SCROLL BEHAVIOR
   -------------------------------------------------------------------- */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) var(--color-surface-alt);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface-alt);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-surface-alt);
}

:target {
  scroll-margin-top: var(--space-11);
}


/* --------------------------------------------------------------------
   13. SMOOTH FONT RENDERING
   -------------------------------------------------------------------- */

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: always;
}


/* --------------------------------------------------------------------
   14. UTILITY CLASSES
   -------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-inverse { color: var(--color-text-inverse); }

.bg-surface { background-color: var(--color-surface); }
.bg-background { background-color: var(--color-background); }

.no-scroll {
  overflow: hidden;
}

.sr-only-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}