/* ============================================================
   OGAI Digital Solutions — main.css
   Design tokens, reset, base typography, layout utilities.
   No build step — pure CSS3 custom properties.
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand color */
  --color-primary:      #1A3557;  /* Dark blue — logo primary, header/footer */
  --color-primary-deep: #12243d;  /* Hero gradient end */
  --color-accent:       #0F766E;  /* Teal — logo secondary, buttons/CTA */
  --color-accent-2:     #14A39A;  /* Lighter teal — gradient end */
  --color-accent-soft:  #E7F5F3;  /* Pale teal — tints, highlights */
  --color-icon:         #6B7280;  /* Grey — decorative icons */
  --color-icon-soft:    #EEF1F4;  /* Pale grey — icon chip backgrounds */
  --color-surface:      #F7F9FC;  /* Cool off-white — alternating sections */
  --color-text:         #1C2B3A;  /* Near-black body text */
  --color-text-muted:   #5A6B7C;  /* Secondary labels */
  --color-text-invert:  #EAF1F9;  /* Body text on dark blue */
  --color-border:       #DDE3EC;  /* Subtle dividers */
  --color-border-soft:  #EAEEF4;
  --color-white:        #FFFFFF;
  --color-success:      #1E7A4C;
  --color-danger:       #C0392B;

  /* Gradients */
  --grad-hero:   linear-gradient(155deg, #1A3557 0%, #12243d 100%);
  --grad-accent: linear-gradient(120deg, #0F766E 0%, #14A39A 100%);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.5rem;
  --text-5xl:  3.25rem;

  --leading-tight: 1.15;
  --leading-snug:  1.35;
  --leading-base:  1.65;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radius + shadow */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(18, 36, 61, 0.06);
  --shadow-md: 0 6px 20px rgba(18, 36, 61, 0.08);
  --shadow-lg: 0 18px 50px rgba(18, 36, 61, 0.14);
  --shadow-accent: 0 10px 28px rgba(15, 118, 110, 0.28);

  /* Layout */
  --container: 1200px;
  --container-narrow: 880px;
  --nav-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition: 220ms var(--ease);
}

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

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

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

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

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary); }

ul, ol { list-style: none; padding: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

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

/* ---------- Base Typography ---------- */
h1, h2, h3, h4 { line-height: var(--leading-tight); color: var(--color-primary); font-weight: 600; }

h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }

h1 { font-size: clamp(2rem, 5vw + 0.5rem, var(--text-5xl)); }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, var(--text-4xl)); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { color: var(--color-text); }
p + p { margin-top: var(--space-4); }

strong { font-weight: 600; color: var(--color-primary); }

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

.section { padding-block: var(--space-8); }
.section--surface { background: var(--color-surface); }
.section--soft { background: var(--color-accent-soft); }
.section--navy { background: var(--grad-hero); color: var(--color-text-invert); }
.section--navy h2, .section--navy h3, .section--navy h4 { color: var(--color-white); }

@media (min-width: 1024px) {
  .section { padding-block: var(--space-9); }
}

/* Eyebrow label — mono utility face carries the "data/precision" theme */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.section--navy .eyebrow { color: var(--color-accent-2); }
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

/* Section heading + signature precision mark */
.section-head { max-width: 720px; margin-bottom: var(--space-7); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--color-text-muted); margin-top: var(--space-3); font-size: var(--text-lg); }
.section--navy .section-head p { color: var(--color-text-invert); opacity: 0.85; }

/* The signature: diagonal "precision mark" beneath every H2 */
.section-head h2 { position: relative; display: inline-block; padding-bottom: var(--space-4); }
.section-head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 14px;
  /* a thin angled rule + an upward tick = a stylized check of accuracy */
  background:
    linear-gradient(to right, var(--color-accent), var(--color-accent)) left bottom / 44px 2px no-repeat,
    linear-gradient(to top, var(--color-accent), var(--color-accent)) 42px bottom / 2px 14px no-repeat;
  transform: skewX(-24deg);
  transform-origin: left bottom;
}
.section-head--center h2::after { left: 50%; transform: translateX(-50%) skewX(-24deg); }

/* Text helpers */
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.lead { font-size: var(--text-lg); color: var(--color-text-muted); line-height: var(--leading-base); }
.section--navy .lead { color: var(--color-text-invert); opacity: 0.9; }

.mono { font-family: var(--font-mono); }

/* Generic responsive grid helpers */
.grid { display: grid; gap: var(--space-5); }
@media (min-width: 640px)  { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* Visually hidden but available to screen readers */
.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;
}
