/* ==========================================================================
   eFinder — reset, elements and layout primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keep anchored sections clear of the sticky header. */
  scroll-padding-top: 6rem;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-snug);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

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

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

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

img {
  height: auto;
}

strong,
b {
  font-weight: 600;
}

::selection {
  background: var(--brass-soft);
  color: var(--ink);
}

/* --- Focus ---------------------------------------------------------------
   One visible, high-contrast focus ring for every interactive element.
   :focus-visible only, so pointer users never see it. */
:focus-visible {
  outline: 2px solid var(--brass-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.on-night :focus-visible {
  outline-color: var(--brass-line);
}

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

.wrap {
  width: 100%;
  max-width: calc(var(--max-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: calc(var(--max-width-narrow) + var(--gutter) * 2);
}

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

.section--paper-2 {
  background: var(--paper-2);
}

.section--paper-3 {
  background: var(--paper-3);
}

.section--surface {
  background: var(--surface);
}

.section--night {
  background: var(--night);
  color: var(--ink-inverse);
}

.section--hairline-top {
  border-top: 1px solid var(--line);
}

.section--hairline-bottom {
  border-bottom: 1px solid var(--line);
}

/* --- Typographic roles ---------------------------------------------------- */

.label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--brass-deep);
}

.label::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.section--night .label {
  color: var(--brass-line);
}

.h-section {
  font-size: var(--step-5);
  line-height: 1.05;
}

.h-sub {
  font-size: var(--step-3);
  line-height: 1.15;
}

.h-card {
  font-family: var(--font-ui);
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.lede {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: var(--step-1);
  line-height: 1.6;
}

.section--night .lede {
  color: #b6bac2;
}

.prose {
  max-width: var(--measure);
  color: var(--ink-2);
}

.prose--compact {
  margin-top: 0.4rem;
  font-size: var(--step--1);
}

.muted {
  color: var(--ink-3);
}

.mono {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

/* An accented word inside a display heading. */
.accent {
  color: var(--brass-deep);
  font-style: italic;
}

.section--night .accent {
  color: #d9b26a;
}

/* --- Section header ------------------------------------------------------- */

.section-head {
  display: grid;
  gap: var(--space-l) var(--space-3xl);
  align-items: end;
  margin-bottom: clamp(2.5rem, 1.5rem + 2.5vw, 4rem);
}

@media (min-width: 62rem) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
}

/* Where the supporting column carries artwork it is taller than the heading,
   and bottom alignment drops the heading awkwardly low. */
.section-head--top {
  align-items: start;
}

.section-head__title {
  display: grid;
  gap: var(--space-m);
}

.section-head--center {
  text-align: center;
  justify-items: center;
}

.section-head__title--center {
  justify-items: center;
}

.label--center {
  justify-self: center;
}

.lede--center {
  margin-inline: auto;
  text-align: center;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.icon-sprite {
  position: absolute;
}

.skip-link {
  position: absolute;
  top: var(--space-m);
  left: var(--space-m);
  z-index: var(--z-skip);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-s);
  background: var(--ink);
  color: var(--ink-inverse);
  font-size: 0.85rem;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}
