/* ==========================================================================
   Base — reset, typography scale, shared primitives
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--c-canvas);
  color: var(--c-primary);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

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

/* ---- Type scale ----------------------------------------------------- */

.t-display {
  font-size: var(--fs-display);
  font-weight: var(--fw-medium);
  line-height: var(--lh-display);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--c-primary);
  text-wrap: balance;
}

.t-h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  line-height: var(--lh-heading);
  text-transform: uppercase;
  color: var(--c-primary);
  text-wrap: balance;
}

.t-h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  line-height: 1.1em;
  text-transform: uppercase;
  color: var(--c-primary);
}

.t-lead {
  font-size: var(--fs-lead);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  text-transform: uppercase;
  color: var(--c-primary);
}

.t-quote {
  font-size: var(--fs-lead);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  text-transform: lowercase;
  color: var(--c-muted);
}

.t-body {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--c-muted);
}

.t-label {
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  line-height: var(--lh-body);
  text-transform: uppercase;
  color: var(--c-primary);
}

.t-meta {
  font-size: var(--fs-meta);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--c-muted);
}

.t-caption {
  font-size: var(--fs-caption);
  font-weight: var(--fw-regular);
  line-height: var(--lh-caption);
  text-transform: capitalize;
  color: var(--c-muted);
}

.t-micro {
  font-size: var(--fs-micro);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  text-transform: capitalize;
  color: var(--c-primary);
}

.t-mono {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  letter-spacing: 0.08em;
}

/* ---- Layout primitives ---------------------------------------------- */

.section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--container);
  padding: var(--section-y) 0;
}

.container--band {
  padding: var(--band-y) 0;
}

.container--flush-bottom {
  padding-bottom: 0;
}

@media (max-width: 1199.98px) {
  .container {
    padding-left: var(--gutter-tablet);
    padding-right: var(--gutter-tablet);
  }
}

@media (max-width: 809.98px) {
  .container {
    padding-left: var(--gutter-phone);
    padding-right: var(--gutter-phone);
  }
}

/* ---- Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-label);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color var(--dur-hover) var(--ease-appear),
    color var(--dur-hover) var(--ease-appear),
    transform var(--dur-hover) var(--ease-appear);
}

.btn__arrow {
  transition: transform var(--dur-hover) var(--ease-appear);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--c-primary);
  color: var(--c-white);
}

.btn--primary:hover {
  background: var(--c-accent);
}

.btn--ghost {
  border: var(--rule);
  color: var(--c-primary);
}

.btn--ghost:hover {
  background: var(--c-primary);
  color: var(--c-white);
}

.btn--block {
  justify-content: center;
  width: 100%;
}

/* ---- Section heading pattern ----------------------------------------- */

.heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  padding-bottom: 24px;
  border-bottom: var(--hairline);
}

.heading__title {
  flex: 1 1 0;
  max-width: 620px;
}

.heading__aside {
  flex: 0 0 auto;
  max-width: 340px;
  text-align: right;
}

.heading__index {
  display: block;
  margin-bottom: 12px;
}

@media (max-width: 809.98px) {
  .heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .heading__aside {
    text-align: left;
  }
}

/* ---- Utilities -------------------------------------------------------- */

.u-hide-desktop {
  display: none !important;
}

@media (max-width: 1199.98px) {
  .u-hide-desktop {
    display: revert !important;
  }

  .u-hide-tablet {
    display: none !important;
  }
}

@media (max-width: 809.98px) {
  .u-hide-tablet {
    display: revert !important;
  }

  .u-hide-phone {
    display: none !important;
  }
}

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