/* ==========================================================================
   Base: reset, tipografi, layout dasar
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

::selection { background: var(--sfa-deep-red); color: var(--sfa-off-white); }

/* --- Type roles ---------------------------------------------------------- */

.display-xl,
.display-l,
.section-title,
.headline,
.label {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
}

.display-xl {
  font-size: var(--fs-display-xl);
  line-height: 0.86;
  letter-spacing: var(--track-display);
}
.display-l {
  font-size: var(--fs-display-l);
  line-height: 0.88;
  letter-spacing: var(--track-display);
}
.section-title {
  font-size: var(--fs-section);
  line-height: 0.9;
  letter-spacing: var(--track-display);
}
.headline {
  font-size: var(--fs-headline);
  line-height: 0.95;
  letter-spacing: var(--track-headline);
}
/* Judul panjang otomatis diperkecil bertahap (kelas fit-l / fit-xl dari helper fit() di app/Core/helpers.php,
   atau dari pilihan "Ukuran judul" di CMS). Kata yang terlalu panjang dipatahkan agar tidak keluar layar. */
.display-xl, .display-l, .section-title, .headline { overflow-wrap: break-word; }
.display-xl.fit-l { font-size: var(--fs-display-l); line-height: 0.88; }
.display-xl.fit-xl { font-size: var(--fs-section); line-height: 0.9; }
.display-l.fit-l { font-size: var(--fs-section); line-height: 0.9; }
.display-l.fit-xl { font-size: clamp(2rem, 4vw, 3.75rem); line-height: 0.95; letter-spacing: var(--track-headline); }
.section-title.fit-l { font-size: clamp(2rem, 4.2vw, 3.75rem); line-height: 0.92; }
.section-title.fit-xl { font-size: clamp(1.75rem, 3.2vw, 2.875rem); line-height: 0.95; letter-spacing: var(--track-headline); }
.headline.fit-l { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.headline.fit-xl { font-size: clamp(1.375rem, 2.1vw, 1.875rem); line-height: 1; }

.label {
  font-size: var(--fs-label);
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.45;
  font-weight: 400;
}

.editorial {
  font-family: var(--font-editorial);
  font-stretch: condensed;
  font-weight: 400;
  font-size: var(--fs-editorial);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.spec { font-family: var(--font-spec); font-size: var(--fs-caption); }

/* Highlight block — aksen khas SFA, satu per layout */
.highlight {
  display: inline-block;
  line-height: inherit;
  background: var(--sfa-deep-red);
  color: var(--sfa-off-white);
  padding: 0.02em 0.07em 0;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* --- Layout -------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--sfa-black);
  color: var(--sfa-off-white);
}
.skip-link:focus { top: var(--space-4); }

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