/* =========================================================================
   ProClad Solutions Inc
   main.css — design tokens, reset, base type, layout primitives
   ========================================================================= */


/* -------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------- */
:root {
  /* Breakpoints — reference only; @media queries use literal values.
     Keep these in sync with the media query definitions below. */
  --bp-tablet: 640px;
  --bp-desktop-sm: 960px;
  --bp-desktop-lg: 1280px;

  /* Layout */
  --container-max: 1280px;
  --container-gutter: clamp(1rem, 4vw, 2.5rem);
  --section-py: clamp(3rem, 8vw, 7rem);
  --section-py-sm: clamp(2rem, 5vw, 4rem);

  /* Surfaces — light */
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f4;
  --color-bg-soft: #fafaf9;
  --color-surface: #ffffff;

  /* Ink on light */
  --color-ink: #15171a;
  --color-ink-muted: #5a6069;
  --color-ink-subtle: #8a8f96;

  /* Hairlines / dividers */
  --color-line: #e2e4e8;
  --color-line-strong: #c8ccd1;

  /* Surfaces — dark (nav, footer, hero, accent sections).
     Keep --color-charcoal aligned to the logo PNG bg so the header/footer
     don't show a rectangular patch around the logo. Revisit once the logo
     is supplied as a transparent PNG. */
  --color-charcoal: #16171b;
  --color-charcoal-elev: #24262a;
  --color-charcoal-line: #3a3d43;

  /* Ink on dark */
  --color-ink-inverse: #f5f5f4;
  --color-ink-inverse-muted: #a8aeb5;
  --color-ink-inverse-subtle: #7a8089;

  /* Accent (steel blue) — swap here to restyle the entire site */
  --color-accent: #6b8a9e;
  --color-accent-strong: #3e6480;
  --color-accent-soft: #dde5eb;
  --color-accent-ink: #ffffff;

  /* Metallic silver — mirrors the logo finish */
  --color-silver: #b8bdc3;

  /* Focus ring */
  --color-focus: #3e6480;
  --color-focus-inverse: #a8c1d1;

  /* Type family */
  --ff-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Size scale — fluid where it matters */
  --fs-eyebrow: 0.75rem;
  --fs-body-sm: 0.875rem;
  --fs-body: 1rem;
  --fs-body-lg: 1.125rem;
  --fs-h4: 1.25rem;
  --fs-h3: clamp(1.5rem, 1rem + 1.6vw, 1.875rem);
  --fs-h2: clamp(1.875rem, 1.25rem + 2.5vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 4vw, 3.75rem);
  --fs-display: clamp(2.75rem, 1.75rem + 5.5vw, 4.5rem);

  /* Line height */
  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.55;
  --lh-loose: 1.75;

  /* Tracking */
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.04em;
  --ls-wider: 0.14em;

  /* Spacing — 4px base, exponential curve */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  /* Radii */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  /* Shadows — restrained, architectural */
  --shadow-sm: 0 1px 2px rgba(15, 17, 20, 0.06), 0 1px 1px rgba(15, 17, 20, 0.04);
  --shadow-md: 0 6px 16px rgba(15, 17, 20, 0.08), 0 2px 4px rgba(15, 17, 20, 0.04);
  --shadow-lg: 0 20px 48px rgba(15, 17, 20, 0.14), 0 4px 12px rgba(15, 17, 20, 0.06);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 220ms;
  --dur-slow: 360ms;

  /* Z-index scale */
  --z-nav: 40;
  --z-overlay: 50;
  --z-modal: 60;
}


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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

body {
  min-height: 100dvh;
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

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

a {
  color: var(--color-accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease);
}
a:hover {
  color: var(--color-ink);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-ink);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:where(p, li, dd) {
  overflow-wrap: break-word;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-line);
}

table {
  border-collapse: collapse;
}


/* -------------------------------------------------------------------------
   Motion preferences
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* -------------------------------------------------------------------------
   Focus & accessibility
   ------------------------------------------------------------------------- */
:focus {
  outline: none;
}

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

.section--dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--color-focus-inverse);
}

.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;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: calc(var(--z-overlay) + 10);
  padding: var(--sp-3) var(--sp-4);
  background: var(--color-charcoal);
  color: var(--color-ink-inverse);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--color-ink-inverse);
}


/* -------------------------------------------------------------------------
   Base type scale
   ------------------------------------------------------------------------- */
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
h5 {
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-semibold);
}
h6 {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}


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

.container--narrow { max-width: 920px; }
.container--reading { max-width: 720px; }
.container--wide { max-width: 1440px; }

.section {
  padding-block: var(--section-py);
}

.section--tight {
  padding-block: var(--section-py-sm);
}

.section--dark {
  background: var(--color-charcoal);
  color: var(--color-ink-inverse);
}

.section--dark :where(h1, h2, h3, h4, h5, h6) {
  color: var(--color-ink-inverse);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--soft {
  background: var(--color-bg-soft);
}


/* -------------------------------------------------------------------------
   Section heading & eyebrow
   ------------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin-bottom: var(--sp-3);
}

.section--dark .eyebrow {
  color: var(--color-accent);
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--sp-7);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head > p {
  margin-top: var(--sp-4);
  font-size: var(--fs-body-lg);
  color: var(--color-ink-muted);
  line-height: var(--lh-normal);
}

.section--dark .section-head > p {
  color: var(--color-ink-inverse-muted);
}

.lead {
  font-size: var(--fs-body-lg);
  color: var(--color-ink-muted);
  line-height: var(--lh-normal);
}

.section--dark .lead {
  color: var(--color-ink-inverse-muted);
}


/* -------------------------------------------------------------------------
   Grid helpers — mobile-first, single column by default
   ------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--sp-5);
}

.grid--2,
.grid--3,
.grid--4 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .grid { gap: var(--sp-6); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .grid--2 { gap: var(--sp-7); }
}


/* -------------------------------------------------------------------------
   Flow utility — consistent vertical rhythm for prose
   ------------------------------------------------------------------------- */
.flow > * + * {
  margin-top: var(--sp-4);
}

.flow-lg > * + * {
  margin-top: var(--sp-5);
}

.flow-prose > * + * {
  margin-top: var(--sp-5);
}

.flow-prose h2,
.flow-prose h3 {
  margin-top: var(--sp-7);
}

.flow-prose h4 {
  margin-top: var(--sp-6);
}


/* -------------------------------------------------------------------------
   Rule (thin horizontal divider)
   ------------------------------------------------------------------------- */
.rule {
  height: 1px;
  background: var(--color-line);
  border: 0;
}

.section--dark .rule {
  background: var(--color-charcoal-line);
}


/* -------------------------------------------------------------------------
   Utility helpers
   ------------------------------------------------------------------------- */
.u-text-center { text-align: center; }
.u-text-balance { text-wrap: balance; }
.u-mt-0 { margin-top: 0 !important; }
.u-mb-0 { margin-bottom: 0 !important; }

.u-hide-mobile { display: none; }
@media (min-width: 960px) {
  .u-hide-mobile { display: initial; }
  .u-hide-desktop { display: none; }
}

/* Visually hidden but focusable */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
