/* AVELTAN — institutional design system.
   Palette: cool document paper, graphite ink, one restrained pine accent.
   Type: Instrument Sans (text) + IBM Plex Mono (reference labels). */

:root {
  --paper: #f7f7f5;
  --paper-deep: #efefec;
  --ink: #14161a;
  --ink-muted: #565b63;
  --rule: #dcdcd6;
  --rule-strong: #c4c4bd;
  --accent: #26463f;
  --danger: #8c3a2e;

  --measure: 34rem;
  --label-col: 9.5rem;
  --gutter: clamp(1.5rem, 5vw, 4.5rem);
  --spine-gap: clamp(1.5rem, 3vw, 3rem);

  --step--1: 0.8125rem;
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.55rem + 2.2vw, 3.375rem);

  --font-text: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: -0.021em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

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

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 50;
}
.skip:focus {
  left: 0;
}

/* ---------- shell ---------- */

.shell {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
}

.masthead__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.375rem;
}

.wordmark {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.nav a {
  position: relative;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

/* Enlarges the touch target without moving the underline. */
.nav a::before,
.action::before,
.footer__links a::before,
.contact__phone a::before {
  content: "";
  position: absolute;
  inset: -0.6875rem 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(4.5rem, 13vh, 9rem) clamp(3.5rem, 9vh, 6.5rem);
  border-bottom: 1px solid var(--rule);
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.hero h1 {
  font-size: var(--step-3);
  max-width: 18ch;
}

.hero__lede {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  max-width: 32rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-muted);
}

.hero__actions {
  margin-top: 3.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.reveal {
  opacity: 0;
  transform: translateY(0.5rem);
  animation: rise 700ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.reveal:nth-child(2) {
  animation-delay: 70ms;
}
.reveal:nth-child(3) {
  animation-delay: 140ms;
}
.reveal:nth-child(4) {
  animation-delay: 210ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- actions ---------- */

.action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--step-0);
  border-bottom: 1px solid var(--ink);
  transition: color 180ms ease, border-color 180ms ease, gap 180ms ease;
}

.action:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  gap: 1.1rem;
}

.action--quiet {
  border-bottom-color: var(--rule-strong);
  color: var(--ink-muted);
}
.action--quiet:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.action__mark {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1;
}

/* ---------- spine sections ---------- */

.section {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  scroll-margin-top: 2rem;
}

.section__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: clamp(3.5rem, 8vh, 5.5rem);
  padding-right: var(--spine-gap);
}

.section__body {
  border-left: 1px solid var(--rule);
  padding-left: var(--spine-gap);
  padding-block: clamp(3.5rem, 8vh, 5.5rem);
  min-width: 0;
}

.section:last-of-type .section__body {
  padding-bottom: clamp(4.5rem, 10vh, 7rem);
}

.section h2 {
  font-size: var(--step-2);
  max-width: 24ch;
}

.section__intro {
  margin-top: 1.5rem;
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: var(--step-1);
  line-height: 1.55;
}

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

/* Vertical rhythm, one scale for every page:
   0.75rem heading to its own paragraph
   1.125rem between paragraphs
   1.5rem heading to the block that follows it
   2.25rem to a new sub-block
   3.25rem to a closing action */

.section h2 + .prose,
.statement + .prose {
  margin-top: 1.5rem;
}

.section__intro + .prose {
  margin-top: 2.25rem;
}

.prose p + p {
  margin-top: 1.125rem;
}

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

.prose h3 + p {
  margin-top: 0.75rem;
}

.prose a {
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 180ms ease, color 180ms ease;
}
.prose a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- sequence (identify / qualify / introduce) ---------- */

.sequence {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  max-width: var(--measure);
}

.sequence li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0 1rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
}

.sequence li:last-child {
  border-bottom: 1px solid var(--rule);
}

.sequence__index {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  padding-top: 0.3rem;
}

.sequence h3 {
  font-size: var(--step-1);
}

.sequence p {
  margin-top: 0.5rem;
  color: var(--ink-muted);
}

/* ---------- register (what we originate) ---------- */

.register {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  max-width: var(--measure);
  border-top: 1px solid var(--rule);
}

.register li {
  padding-block: 1.0625rem;
  border-bottom: 1px solid var(--rule);
}

.register__note {
  margin-top: 1.5rem;
  max-width: var(--measure);
  color: var(--ink-muted);
  font-size: var(--step--1);
  line-height: 1.65;
}

/* ---------- statement ---------- */

.statement {
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 24ch;
}

.statement + .prose {
  color: var(--ink-muted);
}

/* ---------- criteria block ---------- */

.criteria {
  margin-top: 2.25rem;
  max-width: var(--measure);
  background: var(--paper-deep);
  border-left: 2px solid var(--accent);
  padding: clamp(1.5rem, 3vw, 2rem);
}

.criteria__title {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.criteria p {
  margin-top: 0.9rem;
}

.criteria ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 2rem;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

.criteria li {
  padding-block: 0.2rem;
  break-inside: avoid;
}

/* ---------- contact ---------- */

.contact__direct {
  margin-top: 2.25rem;
}

.contact__email {
  display: inline-block;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.2rem;
  transition: color 180ms ease, border-color 180ms ease;
  overflow-wrap: anywhere;
}

.contact__email:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contact__phone {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.contact__phone a {
  position: relative;
  display: inline-block;
  border-bottom: 1px solid var(--rule);
  transition: color 180ms ease, border-color 180ms ease;
}

.contact__phone a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- form ---------- */

.form {
  margin-top: 3.25rem;
  max-width: 34rem;
  display: grid;
  gap: 2.5rem;
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.3rem 0 0.5rem;
  line-height: 1.4;
  border-radius: 0;
  transition: border-color 180ms ease;
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 5.5rem;
  line-height: 1.55;
}

.field input:hover,
.field textarea:hover {
  border-bottom-color: var(--ink-muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-bottom-color: var(--danger);
}

.field__error {
  font-size: var(--step--1);
  color: var(--danger);
  min-height: 1.2em;
}

.form__submit {
  justify-self: start;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.4rem 0;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 180ms ease, border-color 180ms ease, gap 180ms ease,
    opacity 180ms ease;
}

.form__submit:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  gap: 1.1rem;
}

.form__submit[disabled] {
  opacity: 0.45;
  cursor: default;
}

.form__status {
  font-size: var(--step--1);
  color: var(--ink-muted);
  min-height: 1.4em;
}

.form__status--error {
  color: var(--danger);
}

.form__done {
  margin-top: 3.25rem;
  max-width: 34rem;
  border-left: 2px solid var(--accent);
  background: var(--paper-deep);
  padding: clamp(1.5rem, 3vw, 2rem);
}

.form__done h3 {
  font-size: var(--step-1);
}

.form__done p {
  margin-top: 0.75rem;
  color: var(--ink-muted);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--rule);
}

.footer__inner {
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem 3rem;
}

.footer__identity .wordmark {
  display: block;
  margin-bottom: 0.75rem;
}

.footer__identity p {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  line-height: 1.7;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: flex-start;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.footer__links a {
  position: relative;
  display: inline-block;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.footer__links a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.footer__legal {
  padding-bottom: clamp(2rem, 4vw, 2.5rem);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* ---------- narrow viewports ---------- */

@media (max-width: 46rem) {
  .section {
    grid-template-columns: minmax(0, 1fr);
  }

  .section:first-of-type .section__label {
    border-top: 0;
  }

  .section__label {
    padding-top: clamp(2.75rem, 7vh, 3.5rem);
    padding-right: 0;
    padding-bottom: 1rem;
    border-top: 1px solid var(--rule);
  }

  .section__body {
    border-left: 0;
    padding-left: 0;
    padding-top: 0;
    padding-bottom: clamp(2.75rem, 7vh, 3.5rem);
  }

  .criteria ul {
    columns: 1;
  }

  .hero h1 {
    max-width: none;
  }

  .masthead__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-block: 1.125rem;
  }

  .nav {
    gap: 1.5rem;
  }
}

@media (max-width: 30rem) {
  .hero__eyebrow .sep {
    display: none;
  }

  .hero__eyebrow .place {
    display: block;
  }

  .wordmark {
    letter-spacing: 0.18em;
  }

  .contact__email {
    font-size: var(--step-1);
  }
}

/* ---------- print ---------- */

@media print {
  :root {
    --paper: #ffffff;
    --ink: #000000;
    --ink-muted: #333333;
    --rule: #cccccc;
  }

  .nav,
  .form,
  .hero__actions,
  .skip {
    display: none;
  }

  .section {
    grid-template-columns: minmax(0, 1fr);
    break-inside: avoid;
  }

  .section__body {
    border-left: 0;
    padding-left: 0;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
