/* ============================================================
   Global Stylesheet · Tearus Web Docs
   Include on every page BEFORE component‑specific CSS
   ============================================================ */

/* ===== Google Font ===== */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap");

/* ===== CSS Reset & Box‑Model Fix ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* ===== Root Variables ===== */
:root {
  /* Color palette */
  --clr-bg: #0b0b0b;
  --clr-surface: #181818;
  --clr-text: #eaeaea;
  --clr-muted: #9a9a9a;
  --clr-accent: #1ec48d;
  --clr-danger: #e25d5d;

  /* Typography */
  --font-sans: "Montserrat", sans-serif;
  --fs-base: 16px;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.75rem;
  --fs-xxl: 2.5rem;

  /* Layout */
  --max-width: 1200px;
  --gutter: 1.25rem;
}

/* ===== Base Elements ===== */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.75;
  text-decoration: underline;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.6em;
}

h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl);  }
h3 { font-size: 1.5rem;        }
h4 { font-size: var(--fs-lg);  }
h5 { font-size: var(--fs-md);  }
h6 { font-size: var(--fs-sm);  }

p { margin-bottom: 1rem; }

/* ===== Layout Helpers ===== */
.container {
  width: min(90%, var(--max-width));
  margin-inline: auto;
}

.flex {
  display: flex;
  gap: var(--gutter);
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid {
  display: grid;
  gap: var(--gutter);
}

.hide {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #fff;
  background: var(--clr-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ===== Forms ===== */
input, textarea, select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--clr-muted);
  border-radius: 4px;
  background: var(--clr-surface);
  color: var(--clr-text);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
}

label { display: block; margin-bottom: 0.4rem; }

/* ===== Tables ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: var(--fs-sm);
}

th, td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--clr-muted);
}

th {
  background: var(--clr-surface);
  font-weight: 600;
}

/* ===== Utility Spacing ===== */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem;  }
.mt-3 { margin-top: 1rem;    }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem;  }
.mb-3 { margin-bottom: 1rem;    }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem;  }
.pt-3 { padding-top: 1rem;    }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem;  }
.pb-3 { padding-bottom: 1rem;    }

/* ===== Media Queries minor tweaks ===== */
@media (max-width: 600px) {
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: 1.5rem;      }
  .container { width: 92%; }
}
