/* assets/css/base.css */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { scroll-padding-top: 140px; }
/* Below ~355px the sponsor-strip logos wrap onto a second row (no fixed
   breakpoint drives this — it's content width, not a media query in
   components.css), pushing the sticky header's rendered height to ~170px
   (measured 320px/300px width) vs ~122px at 375px+. 140px is no longer
   enough there, so bump scroll-padding-top for narrow phones. */
@media (max-width: 400px) {
  html { scroll-padding-top: 190px; }
}
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  text-transform: uppercase; /* AKSARA logo guide: capitals-only headlines, independent of which font is loaded */
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p { margin: 0 0 var(--space-2); }

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

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

/* Partial-include mount points (assets/js/include-partials.js) wrap the
   fetched header/footer markup in a plain <div>. Left as a normal block
   box, that div becomes the containing block for .site-header's
   `position: sticky`, and since the div's height exactly equals the
   header's own height (it has no other content), the sticky element has
   no room to travel — it scrolls away with the page instead of pinning to
   the viewport top. `display: contents` removes the wrapper's own box
   from the render tree so its children (the actual <header>/<footer>)
   lay out as direct children of <body>, which is full-page height and
   lets sticky positioning work as intended. */
[data-include] { display: contents; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Reusable motif utilities — an absolutely-positioned low-opacity dot
   texture (echoes the 2023 halftone background) and a small section
   divider built from the AKSARA icon, both from the design spec's
   "motif AKSARA berulang" / "tekstur latar" requirements. */
.texture-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(currentColor 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.08;
}
.section-divider {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  margin-block: var(--space-4);
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 2px; background: var(--color-ink); opacity: 0.15;
}
.section-divider img { width: 28px; height: auto; opacity: 0.6; }

/* Section background photos — replaces the earlier hand-built .kv-field
   pattern (mask-tinted AKSARA icon + scattered SVG bunga) now that the
   design team has delivered real illustration layers per the canvas sizes
   and safe-zone rules in "AKSARA Background Brief.pdf" (repo root). Each
   file is a transparent PNG-24 (Opsi A:
   "lapisan ilustrasi") meant to sit OVER the section's existing flat brand
   color — background-color stays exactly as already set per modifier class
   below, this only adds background-image on top via the browser's normal
   layering (image paints above color when both are set on one element).
   `background-size: cover` + `no-repeat` per the brief; position favors
   the side each asset was actually illustrated toward (checked per file —
   not assumed uniformly "right").
   Gated to >=641px only: the brief defines separate mobile canvases
   (portrait ratio, safe-zone at the TOP instead of the left) that haven't
   been delivered yet — forcing the desktop crop onto a narrow viewport via
   cover would zoom into the wrong part of the art and risk fighting the
   copy the same way the old un-gated kv-field pattern did before its
   mobile fade-out fix. Until mobile assets land, narrow viewports fall
   back to the flat brand color alone (safe default, matches how every
   text-bearing section already behaves before this photo layer). */
/* Rules moved to the end of pages.css (loaded after this file) — pages.css
   sets each of these same selectors' background via the `background`
   shorthand (for the flat brand color), which resets background-image back
   to `none` on any rule that comes later in the cascade. Same specificity,
   later file wins, so the image rules have to be the last word. */

/* A single AKSARA letter-icon, contain-fit inside its own box — replaces
   the old sprite-strip .icon-crop hack (which sliced a 1/6-width column out
   of a tightly-packed six-icon row and bled it off the container edge,
   cropping into the neighboring glyph or exposing blank canvas). These
   source from individually-padded per-letter PNGs
   (assets/img/icons/aksara-{a1,k,s,a2,r,a3}-{black,white}.png), so
   background-size:contain never cuts a glyph off mid-shape. */
.icon-glyph {
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}
