/* ============================================================
   COD-YQ Technologies — Base Styles
   Reset, root element, typography defaults, utility classes.
   ============================================================ */

/* ── Google Fonts Import ──────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

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

/* ── Root Element ─────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--lh-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography Defaults ──────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.2;
}

h1 { font-size: var(--size-hero-h1);    font-weight: var(--weight-hero); }
h2 { font-size: var(--size-section-h2); font-weight: var(--weight-h2); }
h3 { font-size: var(--size-card-h3);    font-weight: var(--weight-h3); }

p {
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-accent-orange); }

ul, ol { list-style: none; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background-color: rgba(247, 148, 29, 0.25);
  color: var(--color-text-primary);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-bg-card);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent-orange); }

/* ── Focus Ring ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent-orange);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Utility: Gradient Text ───────────────────────────────── */
.text-gradient {
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Utility: Eyebrow Label ───────────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--size-eyebrow);
  font-weight: var(--weight-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  background: var(--color-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-bottom: var(--space-sm);
}

/* ── Utility: Section Intro ───────────────────────────────── */
.section__intro {
  margin-bottom: var(--space-lg);
}

.section__intro h2 {
  margin-bottom: var(--space-xs);
}

.section__intro p {
  font-size: 1.05rem;
  max-width: 52ch;
}

/* ── Utility: Container ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

@media (max-width: 768px) {
  .container { padding: 0 var(--space-md); }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-sm); }
}

/* ── 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-width: 0;
}

/* ── Image Placeholder (shown when image file is missing) ─── */
.img-placeholder {
  background-color: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  width: 100%;
}

/* ── Noise Grain Overlay (applied via pseudo on hero) ─────── */
.noise-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 0;
}
