/* ============================================================
   AsetZ marketing-site preview-B — base.css
   Layer 2 of 3: Reset, document, typography, links, body elements,
   image placeholder (.ph-img)
   Depends on tokens.css (load it FIRST)
   ------------------------------------------------------------
   Seline grammar: cream canvas, warm near-black ink, one blue link.
   ============================================================ */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* ---- Overflow guard --------------------------------------- */
/* Prevent any single wide element (long uppercase labels, fixed
   <br> headings, full-bleed figures) from forcing a horizontal
   scrollbar on narrow screens. Defense-in-depth alongside the
   per-component wrapping rules below. */
html, body { overflow-x: hidden; max-width: 100%; }

/* ---- Document --------------------------------------------- */
body {
  background-color: var(--bg-canvas);
  color: var(--text-body-c);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Inter cv11/ss01 — Seline numerals/alternates (graceful if unsupported) */
  font-feature-settings: "cv11", "ss01";
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

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

svg { fill: currentColor; }

ul, ol { list-style: none; }

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

input, textarea, select { font: inherit; }

/* ---- Headings (display family, tight tracking by size) ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  letter-spacing: var(--tracking-display);
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--text-heading-lg);
  line-height: var(--leading-heading-lg);
  letter-spacing: var(--tracking-display);
}
h2 {
  font-size: var(--text-heading-md);
  line-height: var(--leading-heading-md);
  letter-spacing: var(--tracking-display);
}
h3 {
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
}
h4 {
  font-size: var(--text-heading-sm);
  line-height: var(--leading-heading-sm);
  font-weight: var(--fw-medium);
}
h5, h6 {
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  letter-spacing: var(--tracking-subhead);
  font-weight: var(--fw-medium);
}

/* ---- Body text -------------------------------------------- */
p {
  color: var(--text-body-c);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

/* Strong inline emphasis — weight 600, never a second color */
strong, b { font-weight: var(--fw-semibold); color: var(--text-strong); }

small { font-size: var(--text-body-sm); }

/* ---- Links — Signal Blue, the one chromatic voice for text - */
a {
  color: var(--link);
  text-decoration: none;
  transition: color .18s ease;
}
a:hover { color: var(--link-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Selection -------------------------------------------- */
::selection {
  background: var(--color-highlight-wash);
  color: var(--text-strong);
}

/* ---- Image placeholder (.ph-img) -------------------------- */
/* Reserves a slot for an image/graphic the user drops in later.
   Use when a data-viz / dashboard mock would otherwise look AI-ish.
   Usage:
     <div class="ph-img ph-img--16x9">
       <span class="ph-img__label">assets/img/hero.png — 1040×585</span>
     </div>
   Set size via aspect-ratio (preferred) or explicit height. */
.ph-img {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  background-color: var(--color-canvas-cream);
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(120, 113, 108, .045) 0,
      rgba(120, 113, 108, .045) 10px,
      transparent 10px,
      transparent 20px
    );
  border: 1.5px dashed var(--color-mist-gray);
  border-radius: var(--radius-card);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-16);
  overflow: hidden;
}
.ph-img__label {
  font-family: var(--font-ui);
  font-size: var(--text-body-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-body);
  color: var(--text-muted);
  line-height: 1.5;
}
/* Optional: a small icon slot above the label */
.ph-img__icon {
  display: block;
  margin: 0 auto var(--space-8);
  width: 28px;
  height: 28px;
  color: var(--color-mist-gray);
}
/* size helpers */
.ph-img--16x9  { aspect-ratio: 16 / 9; }
.ph-img--4x3   { aspect-ratio: 4 / 3; }
.ph-img--1x1   { aspect-ratio: 1 / 1; }
.ph-img--21x9  { aspect-ratio: 21 / 9; }

/* ---- Utilities (minimal) ---------------------------------- */
.u-center  { text-align: center; }
.u-hidden  { display: none !important; }
/* PC-only line break: on narrow screens the <br class="br-pc"> collapses
   so headings wrap naturally instead of overflowing. */
.u-mt-8    { margin-top: var(--space-8); }
.u-mt-16   { margin-top: var(--space-16); }
.u-mt-24   { margin-top: var(--space-24); }
.u-mt-32   { margin-top: var(--space-32); }
.u-mt-40   { margin-top: var(--space-40); }
.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;
}

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

/* ---- Responsive heading scale ----------------------------- */
@media (max-width: 768px) {
  h1 { font-size: var(--text-heading-md); }
  h2 { font-size: var(--text-heading); }
  h3 { font-size: var(--text-heading-sm); }
  p  { font-size: var(--text-body); }
  /* collapse PC-only line breaks so headings wrap to fit */
  br.br-pc { display: none; }
}
