/* ==========================================================================
   FUSION CNC — RESET + BASE TYPOGRAPHY
   ========================================================================== */

*,*::before,*::after{ box-sizing: border-box; }

html{
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor links must clear the fixed header. */
  scroll-padding-top: calc(var(--header-h) + var(--s-6));
}

body{
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd{ margin: 0; }
ul,ol{ margin: 0; padding: 0; }
li{ list-style: none; }

h1,h2,h3,h4{
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 800;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;      /* stops orphaned last words in headlines */
}
h1{ font-size: var(--t-h1); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
h2{ font-size: var(--t-h2); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); }
h3{ font-size: var(--t-h3); }
h4{ font-size: var(--t-h4); font-weight: 700; }

p{ text-wrap: pretty; }

a{ color: inherit; text-decoration: none; }

img,svg,video,canvas{ display: block; max-width: 100%; }
img,video{ height: auto; }

button,input,select,textarea{ font: inherit; color: inherit; }
button{ background: none; border: 0; padding: 0; cursor: pointer; }

table{ border-collapse: collapse; width: 100%; }

/* Visible focus is a brand-guide accessibility requirement. :focus-visible
   keeps it off mouse clicks but always on for keyboard users. */
:focus-visible{
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
/* On dark surfaces the orange ring alone is too low-contrast, so pair it
   with a white halo. */
.on-dark :focus-visible{
  outline-color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.65);
}

::selection{ background: var(--brand); color: var(--ink); }

/* Skip link — first tab stop on every page. */
.skip-link{
  position: absolute;
  left: var(--s-4);
  top: -100%;
  z-index: calc(var(--z-modal) + 10);
  padding: var(--s-3) var(--s-5);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r);
  transition: top var(--dur-1) var(--ease-io);
}
.skip-link:focus{ top: var(--s-4); }

/* Screen-reader-only, still focusable. */
.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;
}

/* Fallback so text never sits invisible if the reveal JS fails to run
   (no-js, script error, or blocked file://). Progressive enhancement:
   reveal.js adds .js-reveal-ready to <html> before anything is hidden. */
[data-reveal]{ opacity: 1; transform: none; }
