/* =====================================================================
   OjarisLabs — Base: reset, typography, layout primitives, utilities
   ===================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  /* Propagates to the viewport and clips the off-canvas menu (a fixed element
     that body overflow cannot contain), preventing horizontal scroll on mobile. */
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-body);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

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

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select, button { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: var(--lh-snug);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { color: var(--text-body); }

:focus-visible {
  outline: 3px solid var(--oj-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: rgba(139, 61, 255, 0.22); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 1.6rem + 3vw, 4rem); }

.bg-white { background: var(--bg-white); }
.bg-light { background: var(--bg-light-1); }
.bg-light-2 { background: var(--bg-light-2); }

.bg-dark {
  background: var(--bg-core);
  color: var(--text-on-dark-soft);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--text-on-dark); }
.bg-dark p { color: var(--text-on-dark-soft); }

/* ---------- Text helpers ---------- */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oj-purple);
  margin-bottom: 0.85rem;
}
.bg-dark .eyebrow { color: var(--oj-cyan); }
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-primary);
}
.eyebrow--center { justify-content: center; }

.lead { font-size: var(--fs-lead); color: var(--text-muted); }
.bg-dark .lead { color: var(--text-on-dark-soft); }

.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 62ch; }
.measure-narrow { max-width: 48ch; }

/* ---------- Section heading block ---------- */
.section-head { margin-bottom: clamp(2rem, 1.2rem + 2vw, 3.25rem); }
.section-head--center { text-align: center; max-width: 720px; margin-inline: auto; }
.section-head p { margin-top: 0.85rem; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  z-index: var(--z-toast);
  background: var(--bg-core);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- Utilities ---------- */
.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;
}
.no-scroll { overflow: hidden; }

.grid { display: grid; gap: clamp(1rem, 0.6rem + 1.2vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
