/*
 * 3M homepage (stardust uplift, variant A-video) — foundation styles.
 * Vanilla aem-boilerplate runtime. Brand tokens + self-hosted 3MCircular.
 */

/* ── self-hosted brand font (proprietary — see styles/fonts/LICENSING.md) ── */
@font-face {
  font-family: "3MCircular";
  font-weight: 300;
  font-display: swap;
  src: url("/styles/fonts/3MCircularWeb-Light.woff") format("woff");
}

@font-face {
  font-family: "3MCircular";
  font-weight: 400;
  font-display: swap;
  src: url("/styles/fonts/3MCircularWeb-Book.woff") format("woff");
}

@font-face {
  font-family: "3MCircular";
  font-weight: 700;
  font-display: swap;
  src: url("/styles/fonts/3MCircularWeb-Bold.woff") format("woff");
}

/* metric-matched fallback so the woff swap doesn't shift text */
@font-face {
  font-family: "3MCircular-fallback";
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
  src: local("Arial");
}

:root {
  /* colors (pinned from capture) */
  --background-color: #fff;
  --light-color: #f5f5f5;
  --dark-color: #4b4b4b;
  --text-color: #4b4b4b;
  --ink: #202024;
  --accent: #d10411;
  --accent-deep: #8a041f;
  --accent-dark: #b3030f;
  --link-color: #03c;
  --link-hover-color: #1d3ecf;
  --line: #e6e6e6;
  --muted: #9a9a9a;

  /* fonts */
  --body-font-family: "3MCircular", "3MCircular-fallback", arial, sans-serif;
  --heading-font-family: "3MCircular", "3MCircular-fallback", arial, sans-serif;

  /* body sizes */
  --body-font-size-m: 18px;
  --body-font-size-s: 16px;
  --body-font-size-xs: 14px;

  /* heading sizes (near-modular ~1.25) */
  --heading-font-size-xxl: 64px;
  --heading-font-size-xl: 46px;
  --heading-font-size-l: 34px;
  --heading-font-size-m: 26px;
  --heading-font-size-s: 20px;
  --heading-font-size-xs: 16px;

  /* layout */
  --maxw: 1200px;
  --nav-height: 70px;
  --radius: 0px;
}

@media (width >= 900px) {
  :root {
    --heading-font-size-xxl: 88px;
    --heading-font-size-xl: 46px;
  }
}

body {
  display: none;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-m);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.appear {
  display: block;
}

header {
  min-height: var(--nav-height);
  background: #fff;
}

header .header,
footer .footer {
  visibility: hidden;
}

header .header[data-block-status="loaded"],
footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--heading-font-family);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.05;
  scroll-margin: 40px;
}

h1 {
  font-size: var(--heading-font-size-xxl);
}

h2 {
  font-size: var(--heading-font-size-xl);
}

h3 {
  font-size: var(--heading-font-size-l);
}

h4 {
  font-size: var(--heading-font-size-m);
}

h5 {
  font-size: var(--heading-font-size-s);
}

h6 {
  font-size: var(--heading-font-size-xs);
}

p, dl, ol, ul, pre, blockquote {
  margin: 0.8em 0 0.25em;
}

main img {
  display: block;
  max-width: 100%;
  height: auto;
}

a:any-link {
  color: var(--link-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--link-hover-color);
}

/* buttons — rectilinear 3M system (decorateButtons applies .primary/.secondary/.accent) */
a.button:any-link,
button.button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 13px 26px;
  font-family: var(--heading-font-family);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

a.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

a.button.primary:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: #fff;
}

a.button.secondary {
  background: transparent;
  color: var(--ink);
}

a.button.secondary:hover {
  background: var(--ink);
  color: #fff;
}

a.button.accent {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

a.button.accent:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* sections */
main > .section {
  margin: 0;
  padding: 84px 0;
}

/* a metadata-only section is consumed into <head>, leaving an empty .section;
   collapse it so it adds no vertical space (e.g. above the hero) */
main > .section:empty {
  display: none;
}

main > .section > div {
  max-width: var(--maxw);
  margin: auto;
  padding: 0 24px;
}

/* full-bleed hero manages its own width + spacing internally */
main > .section.full {
  padding: 0;
}

main > .section.full > div {
  max-width: none;
  padding: 0;
}

main .section.light {
  background: var(--light-color);
}

main .section.ink {
  background: var(--ink);
}

main .section.black {
  background: #000;
}

/* section head authored as default content above a block */
main > .section > .default-content-wrapper {
  margin-bottom: 44px;
}

main > .section > .default-content-wrapper h2 {
  font-weight: 300;
  font-size: var(--heading-font-size-xl);
  letter-spacing: -0.01em;
}

main > .section > .default-content-wrapper h2 strong {
  font-weight: 700;
}

@media (width >= 900px) {
  main > .section > div {
    padding: 0 32px;
  }

  main > .section.full > div {
    padding: 0;
  }
}

@media (width <= 860px) {
  main > .section {
    padding: 56px 0;
  }
}
