/* Global base & utilities shared across sections */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
.container {
  width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(var(--s3), 2vw, var(--s5));
}

@media (max-width: 980px) {
  .hide-img-md {
    display: none !important;
  }
}
@media (max-width: 680px) {
  .hide-img-sm {
    display: none !important;
  }
}

/* Buttons (used across sections) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  transition: 0.2s transform, 0.2s box-shadow, 0.2s background;
  box-shadow: var(--shadow-1);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
  background: #019a71;
}
.btn.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
[data-theme="outage"] .btn.secondary {
  border-color: #2a3a4f;
  color: #e3edf4;
}

/* Sections & heads */
section {
  padding: clamp(var(--s7), 8vw, var(--s8)) 0;
}
section:first-of-type {
  border-top: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: clamp(var(--s5), 3vw, var(--s7));
}
.section-head h2 {
  font-family: var(--font-head);
  font-size: var(--h2);
  margin: 0;
}
.section-head p {
  color: var(--muted);
  max-width: 60ch;
}
@media (max-width: 980px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .section-head p {
    max-width: 100%;
  }
}

/* Grids & cards used in multiple sections */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}
.grid-fluid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}
.grid-fluid > * {
  height: 100%;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(var(--s4), 2vw, var(--s5));
  transition: 0.2s transform, 0.2s box-shadow, 0.2s border-color;
  position: relative;
  overflow: hidden;
  height: 100%;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--green);
}

.icon {
  inline-size: 42px;
  block-size: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(0, 180, 131, 0.12), transparent);
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.icon svg {
  inline-size: 22px;
  block-size: 22px;
}

.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.meta {
  color: var(--muted);
  font-size: 13px;
}
.small {
  font-size: 14px;
  color: var(--muted);
}

/* Reveal animation utility */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
  .reveal {
    transition: none;
  }
}

/* Responsive helpers */
@media (max-width: 980px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 780px) {
  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Chips (pills) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  font-size: 13px;
  color: #0b1220;
  margin-top: 5px;
}
[data-theme="outage"] .chip {
  background: rgba(16, 22, 31, 0.55);
  color: #e7f1f8;
  border-color: #25344a;
}
