/* One365 FM — production additions.
 *
 * Deliberately small. The visual design ships inside the pages themselves
 * (extracted to design.css + per-page <style> at build time); this file only adds
 * what a live site needs and a design-tool render never had: a skip link, form
 * validation states, print output, and safety rails for motion and images. */

/* ------------------------------------------------------------- skip link */
.o365-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink-900, #171a24);
  color: #fff;
  font: var(--text-label-md);
  border-radius: 0 0 var(--radius-md, 8px) 0;
  text-decoration: none;
}
.o365-skip:focus {
  left: 0;
}

/* ------------------------------------------------------------ form states */
[data-o365='offer-form'] [aria-invalid='true'] {
  border-color: var(--flame-500, #e9560d) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(233, 86, 13, 0.15);
}

[data-o365='offer-form'] [data-o365-required]::after {
  content: ' *';
  color: var(--flame-600, #c8161a);
}

[data-o365-role='submit'][disabled] {
  opacity: 0.65;
  cursor: progress;
}

/* The calculator checkboxes are custom controls; give them a real focus ring. */
.calc-check:focus-visible,
.slot-btn:focus-visible,
.calc-toggle:focus-visible {
  outline: 2px solid var(--border-focus, #e9560d);
  outline-offset: 2px;
}

/* Before/after sliders are keyboard operable — make that visible. */
[data-o365='ba-pair']:focus-visible {
  outline: 2px solid var(--rv-gold, #c9a468);
  outline-offset: 3px;
}

/* ----------------------------------------------------------- small screens
 *
 * Everything below 1200px lives in responsive.css, which is linked after each
 * page's own <style> block so it can actually win the cascade. This file is
 * linked before it and would lose. Do not add breakpoint rules here. */

/* --------------------------------------------------------------- images */
/* Width/height attributes are set at build time so boxes are reserved before
   the bytes arrive; this keeps them fluid without reintroducing layout shift. */
img[width][height] {
  max-width: 100%;
}

/* Photos ship as <picture> (WebP + original fallback). `display: contents` takes
   the wrapper out of layout entirely, so every existing rule that targets the
   img — and every flex/grid parent that expected it as a direct child — behaves
   exactly as it did in the design. */
picture {
  display: contents;
}

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

/* ---------------------------------------------------------------- print */
@media print {
  header[data-o365='header'],
  [data-o365='carousel'],
  [data-o365='ba-carousel'],
  .o365-skip {
    display: none !important;
  }
  body {
    background: #fff;
  }
  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    word-break: break-all;
  }
}
