/* ==========================================================================
   base.css — CSS Reset, Typography, and Global Styles
   Futuristic CNC Solutions
   ========================================================================== */

/* --------------------------------------------------------------------------
   Google Fonts Import
   Orbitron: 400 (regular), 700 (bold), 900 (black) — headings
   Inter: 300 (light), 400 (regular), 500 (medium), 600 (semibold) — body
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

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

/* --------------------------------------------------------------------------
   Root / HTML
   -------------------------------------------------------------------------- */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* --------------------------------------------------------------------------
   Body — Base Typography and Background
   -------------------------------------------------------------------------- */
body {
  background-color: var(--color-bg, #0A0A0A);
  font-family: var(--font-body, 'Inter', sans-serif);
  color: var(--color-text-primary, #FFFFFF);
  line-height: 1.6;
  font-size: var(--font-size-body, 1rem);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Headings — Orbitron font with design token sizes
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading, 'Orbitron', sans-serif);
  color: var(--color-text-primary, #FFFFFF);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1 {
  font-size: var(--font-size-hero, clamp(2.5rem, 6vw, 5rem));
  font-weight: 900;
  letter-spacing: 0.05em;
}

h2 {
  font-size: var(--font-size-h2, clamp(1.8rem, 4vw, 3rem));
  font-weight: 700;
}

h3 {
  font-size: var(--font-size-h3, clamp(1.2rem, 2.5vw, 1.8rem));
  font-weight: 700;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Paragraphs and Text
   -------------------------------------------------------------------------- */
p {
  font-size: var(--font-size-body, 1rem);
  color: var(--color-text-secondary, #C0C0C0);
  line-height: 1.6;
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-small, 0.875rem);
}

strong,
b {
  font-weight: 600;
}

em,
i {
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Links — inherit color, no underline by default
   -------------------------------------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast, 200ms ease);
}

a:hover {
  color: var(--color-accent, #00D4FF);
}

a:focus-visible {
  outline: 2px solid var(--color-accent, #00D4FF);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Lists
   -------------------------------------------------------------------------- */
ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Media — responsive by default
   -------------------------------------------------------------------------- */
img,
video,
svg,
canvas {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

/* --------------------------------------------------------------------------
   Form Elements — base normalization
   -------------------------------------------------------------------------- */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Horizontal Rule
   -------------------------------------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--color-accent-border, rgba(0, 212, 255, 0.2));
  margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   Selection Highlight — accent color
   -------------------------------------------------------------------------- */
::selection {
  background-color: var(--color-accent, #00D4FF);
  color: var(--color-bg, #0A0A0A);
}

::-moz-selection {
  background-color: var(--color-accent, #00D4FF);
  color: var(--color-bg, #0A0A0A);
}

/* --------------------------------------------------------------------------
   Scrollbar Styling (Webkit)
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg, #0A0A0A);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent-border, rgba(0, 212, 255, 0.2));
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent, #00D4FF);
}

/* --------------------------------------------------------------------------
   Focus Visible — global accessible focus ring
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent, #00D4FF);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Utility — visually hidden (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: 0;
}
