/* ==========================================================================
   ANEKA CCTV — BASE STYLES & LAYOUT UTILITIES
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--ink-primary);
  background-color: var(--bg-alabaster);
  overflow-x: hidden;
}

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

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

/* Typography Hierarchy */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  color: var(--ink-primary);
}

h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
}

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

h4 {
  font-size: var(--text-h4);
  font-weight: 600;
  line-height: 1.35;
}

p {
  color: var(--ink-secondary);
}

.lead {
  font-size: var(--text-lead);
  line-height: var(--leading-relaxed);
  color: var(--ink-secondary);
}

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid var(--ink-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  background: var(--ink-primary);
  color: var(--surface-white);
  font-weight: 500;
  font-size: var(--text-sm);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Container & Section Rhythm */
.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 2rem, var(--container-narrow));
  margin-inline: auto;
}

@media (min-width: 768px) {
  .container,
  .container--narrow {
    width: min(100% - 4rem, var(--container-max));
  }
  .container--narrow {
    width: min(100% - 4rem, var(--container-narrow));
  }
}

.section {
  padding-block: var(--section-py);
  position: relative;
}

.section--alabaster {
  background-color: var(--bg-alabaster);
}

.section--soft {
  background-color: var(--surface-soft);
}

.section--white {
  background-color: var(--surface-white);
}

.section--warm {
  background: var(--grad-warm-band);
}

.section--bordered {
  border-top: 1px solid var(--border-subtle);
}

/* Section Headers */
.section-header {
  max-width: 680px;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}

.section-header--center {
  margin-inline: auto;
  text-align: center;
}

.section-header--split {
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
  justify-content: space-between;
}

@media (min-width: 860px) {
  .section-header--split {
    flex-direction: row;
    align-items: flex-end;
  }
}

.section-header__copy {
  max-width: 620px;
}

.section-header p {
  margin-top: var(--space-4);
}

/* Eyebrow / Micro-label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: var(--text-micro);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: var(--space-4);
}

.eyebrow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-coral);
  flex-shrink: 0;
}

/* Subtle Hairline Divider */
.hairline {
  width: 100%;
  height: 1px;
  background-color: var(--border-metallic);
  opacity: 0.55;
  border: 0;
  margin: 0;
}

/* Reveal Animation (progressive enhancement) */
[data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
}

.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
