/* Reset + base typography. Mobile-first. */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important; /* hard ZimSaaS rule */
}

html {
  background-color: #0a0a0f;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  /* Match page chrome (#0A0A0F); light blocks set their own surfaces (e.g. .form-section). */
  background: var(--deep-navy);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

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

video {
  background: var(--deep-navy);
}

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

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

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-heading);
  color: var(--fg, var(--text));
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-heading);
  letter-spacing: -0.015em;
}

p {
  margin: 0;
}

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

/* Focus ring — always visible, ZimSaaS blue */
:where(a, button, [role="button"], input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--bright-blue);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--bright-blue);
  color: var(--deep-navy);
}

/* Skip link — invisible until focused */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--deep-navy);
  color: var(--cream);
  font-weight: 600;
  z-index: 1000;
  transition: top var(--dur-2) var(--ease);
}
.skip-link:focus {
  top: var(--sp-4);
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--sp-8);
  }
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-y);
  position: relative;
  isolation: isolate;
}

.section--dark {
  background: var(--surface-navy);
  color: var(--cream);
}

.section--light {
  background: var(--surface-cream);
  color: var(--text);
}

.section--ocean {
  background: var(--ocean-blue);
  color: var(--cream);
}

/* Glow line top edge for dark sections */
.section--dark::before,
.section--ocean::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--glow) 20%,
    var(--glow) 80%,
    transparent 100%
  );
  opacity: 0.85;
  z-index: 2;
}

/* Subtle grid texture on dark sections */
.section--dark::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 0%,
    #000 0%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0.6;
  z-index: -1;
}

/* Typography helpers */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  line-height: 1;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--bright-blue);
}

.on-light .eyebrow {
  color: var(--steel);
}

.lede {
  font-size: var(--fs-body-lg);
  line-height: 1.55;
  color: var(--fg-dim, var(--text-light));
  max-width: 58ch;
}

.balance {
  text-wrap: balance;
}

.measure {
  max-width: 58ch;
}

/* Utilities */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.no-wrap {
  white-space: nowrap;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01";
}
