/* ==========================================================================
   Seashore Medical & Industrial Waste Factory
   base.css — fonts, reset, typography, layout primitives, utilities, a11y
   ========================================================================== */

/* ---- Self-hosted fonts (font-display: swap) ---- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin-800-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-600-normal.woff2") format("woff2");
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--smw-font-body);
  font-size: var(--smw-fs-body);
  line-height: 1.7;
  color: var(--smw-text);
  background: var(--smw-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.6em;
  font-family: var(--smw-font-head);
  font-weight: 800;
  line-height: 1.16;
  color: var(--smw-ink);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--smw-fs-h1); }
h2 { font-size: var(--smw-fs-h2); }
h3 { font-size: var(--smw-fs-h3); font-weight: 700; }
h4 { font-size: var(--smw-fs-h4); font-weight: 700; }

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--smw-green-600);
  text-decoration: none;
  transition: color var(--smw-dur) var(--smw-ease);
}

a:hover {
  color: var(--smw-green-800);
}

ul, ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

figure {
  margin: 0;
}

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

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

address {
  font-style: normal;
}

::selection {
  background: rgba(31, 169, 113, 0.28);
}

/* ---- Focus visibility (WCAG) ---- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--smw-emerald);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Skip link ---- */
.smw-skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 2000;
  padding: 0.7rem 1.2rem;
  background: var(--smw-green-900);
  color: #fff;
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  transition: top 0.2s var(--smw-ease);
}

.smw-skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---- Layout primitives ---- */
.smw-container {
  width: 100%;
  max-width: calc(var(--smw-container) + var(--smw-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--smw-gutter);
}

.smw-container--wide {
  max-width: calc(var(--smw-container-wide) + var(--smw-gutter) * 2);
}

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

.smw-section--sm {
  padding-block: var(--smw-section-sm);
}

.smw-section--soft {
  background: var(--smw-bg-soft);
}

.smw-section--mist {
  background: linear-gradient(180deg, var(--smw-bg-soft) 0%, #fff 100%);
}

.smw-section--dark {
  background: var(--smw-dark-bg);
  color: var(--smw-dark-soft);
}

.smw-section--dark h2,
.smw-section--dark h3,
.smw-section--dark h4 {
  color: #fff;
}

/* ---- Section headers ---- */
.smw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.05rem;
  font-family: var(--smw-font-head);
  font-size: var(--smw-fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--smw-emerald-text);
}

.smw-eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--smw-grad-brand);
}

.smw-section--dark .smw-eyebrow {
  color: var(--smw-emerald-bright);
}

.smw-section-head {
  max-width: 720px;
  margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem);
}

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

.smw-section-head--center .smw-eyebrow::after {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--smw-grad-brand);
}

.smw-lead {
  font-size: var(--smw-fs-lead);
  line-height: 1.75;
  color: var(--smw-muted);
}

.smw-section--dark .smw-lead {
  color: var(--smw-dark-soft);
}

/* ---- Utilities ---- */
.smw-text-center { text-align: center; }
.smw-mt-2 { margin-top: 2rem; }
.smw-mt-3 { margin-top: 3rem; }
.smw-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Icon helper ---- */
.smw-i {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* Raster/standalone logo used where an icon glyph normally sits. A circular
   seal reads smaller than a glyph in the same box, so it gets a little more
   room and is never recoloured by currentColor. */
.smw-i--logo {
  width: 1.35em;
  height: 1.35em;
  object-fit: contain;
  fill: none;
}

/* Icon chips sit inside containers that style their own <img> children
   (e.g. .smw-split__media img is cover-sized). Pin the logo explicitly so
   those rules cannot stretch it. */
.smw-media-badge__icon .smw-i--logo,
.smw-benefit__icon .smw-i--logo,
.smw-contact-card__icon .smw-i--logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

/* ==========================================================================
   Scroll reveal
   Content is VISIBLE BY DEFAULT. A tiny inline script in <head> adds
   .smw-anim to <html> only when JS is available and the visitor has not
   asked for reduced motion — only then do elements start hidden and
   animate in. No JS, no IntersectionObserver, a crawler, or a script
   error all degrade to fully visible content.
   ========================================================================== */
.smw-anim [data-aos] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--smw-ease), transform 0.7s var(--smw-ease);
  will-change: opacity, transform;
}

.smw-anim [data-aos="fade-right"] {
  transform: translateX(-26px);
}

.smw-anim [data-aos="fade-left"] {
  transform: translateX(26px);
}

.smw-anim [data-aos="zoom-in"] {
  transform: scale(0.96);
}

.smw-anim [data-aos].is-revealed {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ---- Reduced motion ---- */
@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;
    scroll-behavior: auto !important;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
  .smw-process__step {
    opacity: 1 !important;
    transform: none !important;
  }
  .smw-reveal img {
    clip-path: none !important;
  }
}
