/**
 * Base — reset and element defaults.
 *
 * Reads only from tokens.css; no hard-coded colours or sizes below.
 */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  background-color: var(--wb-white);
  color: var(--wb-text);
  font-family: var(--wb-font);
  font-size: var(--wb-fs-body);
  font-weight: var(--wb-fw-regular);
  line-height: var(--wb-lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
 * Headings
 * The design sets every heading in bold at the primary dark blue.
 * ----------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--wb-space-4);
  color: var(--wb-primary-dark);
  font-weight: var(--wb-fw-bold);
  line-height: var(--wb-lh-heading);
  text-wrap: balance;
}

h1 { font-size: var(--wb-fs-h1); }
h2 { font-size: var(--wb-fs-h2); }
h3 { font-size: var(--wb-fs-h3); }
h4 { font-size: var(--wb-fs-h4); }
h5 { font-size: var(--wb-fs-h5); }
h6 { font-size: var(--wb-fs-h6); }

p {
  margin: 0 0 var(--wb-space-4);
}

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

/* --------------------------------------------------------------------------
 * Links
 * ----------------------------------------------------------------------- */

a {
  color: var(--wb-primary);
  text-decoration: none;
  transition: color var(--wb-transition);
}

a:hover,
a:focus {
  color: var(--wb-secondary);
}

/* A visible focus ring everywhere, since the design does not specify one. */
:focus-visible {
  outline: 2px solid var(--wb-secondary);
  outline-offset: 2px;
  border-radius: var(--wb-radius-sm);
}

/* --------------------------------------------------------------------------
 * Media
 * ----------------------------------------------------------------------- */

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

img {
  height: auto;
}

/*
 * Deliberately no `svg { fill: currentColor }` here. CSS beats presentation
 * attributes, so it would override the `fill="none"` that outline icons rely
 * on and render them as solid shapes. wadi_badan_icon() already rewrites the
 * colour attributes inside each file instead.
 */

figure {
  margin: 0;
}

/* --------------------------------------------------------------------------
 * Lists
 * ----------------------------------------------------------------------- */

ul,
ol {
  margin: 0 0 var(--wb-space-4);
  padding-inline-start: var(--wb-space-5);
}

/* Lists used for layout carry their own classes and shed default styling. */
.wb-menu,
.wb-stats,
.wb-specs,
.wb-offerings__grid,
.wb-partners__grid,
.wb-purpose__list,
.wb-social__list,
.wb-footer__menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --------------------------------------------------------------------------
 * Forms
 * ----------------------------------------------------------------------- */

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

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: var(--wb-space-3) var(--wb-space-4);
  background-color: var(--wb-white);
  border: 1px solid var(--wb-gray-300);
  border-radius: var(--wb-radius-sm);
  transition: border-color var(--wb-transition), box-shadow var(--wb-transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--wb-primary);
  box-shadow: 0 0 0 3px rgba(43, 118, 160, 0.15);
  outline: none;
}

::placeholder {
  color: var(--wb-placeholder);
  opacity: 1;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

/* --------------------------------------------------------------------------
 * Tables and quotes
 * ----------------------------------------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: var(--wb-space-3);
  border-bottom: 1px solid var(--wb-gray-300);
  text-align: start;
}

blockquote {
  margin: 0 0 var(--wb-space-4);
  font-size: var(--wb-fs-lead);
  line-height: var(--wb-lh-body);
}

hr {
  height: 1px;
  margin: var(--wb-space-8) 0;
  background-color: var(--wb-gray-300);
  border: 0;
}

/* --------------------------------------------------------------------------
 * Accessibility helpers
 * ----------------------------------------------------------------------- */

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

.wb-skip-link:focus {
  position: fixed !important;
  top: var(--wb-space-4);
  inset-inline-start: var(--wb-space-4);
  z-index: 999;
  width: auto;
  height: auto;
  margin: 0;
  padding: var(--wb-space-3) var(--wb-space-5);
  clip: auto;
  background-color: var(--wb-white);
  border-radius: var(--wb-radius-sm);
  box-shadow: var(--wb-shadow-md);
  color: var(--wb-primary-dark);
  font-weight: var(--wb-fw-bold);
}

/* WordPress core alignment classes. */
.alignleft {
  float: left;
  margin: 0 var(--wb-space-5) var(--wb-space-4) 0;
}

.alignright {
  float: right;
  margin: 0 0 var(--wb-space-4) var(--wb-space-5);
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

.wp-caption-text,
.wp-element-caption {
  margin-top: var(--wb-space-2);
  color: var(--wb-gray-500);
  font-size: var(--wb-fs-caption);
}
