/* Aldenmere AI: The Portfolio Letter, distilled. Tokens live in tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--text-body); line-height: var(--leading-body);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--field); color: var(--on-field); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: var(--s-3); z-index: 20; background: var(--paper); color: var(--ink); padding: var(--s-2) var(--s-3); }

/* Bands: the green field */
.band { background: var(--field); color: var(--on-field); }
.band ::selection { background: var(--on-field); color: var(--field); }

/* Type */
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: var(--tracking-display); text-wrap: balance; }
h1 { font-size: var(--text-display); line-height: var(--leading-tight); max-width: 15ch; }
h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.25rem); line-height: 1.08; max-width: 20ch; }
.lead { font-size: var(--text-lead); line-height: 1.55; color: var(--on-field-2); max-width: 44ch; }
.sub { font-size: var(--text-lead); color: var(--ink-2); max-width: 56ch; margin-top: var(--s-4); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem;
  padding: 0 var(--s-6); font: 600 1rem/1 var(--font); text-decoration: none; white-space: nowrap;
  background: var(--carbon); color: var(--carbon-ink); border: 1px solid var(--carbon); border-radius: var(--radius);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:hover { background: transparent; color: var(--carbon); }
.btn:active { transform: translateY(1px); }
.btn--light { background: var(--on-field); color: var(--field); border-color: var(--on-field); }
.btn--light:hover { background: transparent; color: var(--on-field); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.cta small { font-size: 0.9375rem; color: var(--on-field-2); }

/* Top bar */
.top__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 4.5rem; border-bottom: 1px solid var(--field-rule); }
.wordmark { font-family: var(--serif); font-size: 1.5rem; text-decoration: none; }
.wordmark span { font-family: var(--font); font-size: 0.75rem; letter-spacing: var(--tracking-label); margin-left: 0.15em; vertical-align: 0.35em; }
.toplink { font-weight: 600; font-size: 0.9375rem; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; white-space: nowrap; }

/* Hero */
.hero__inner { display: grid; gap: var(--s-6); justify-items: start; padding-block: clamp(3.5rem, 2.5rem + 5vw, 7rem) clamp(3rem, 2rem + 4vw, 5.5rem); }
.figure {
  margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--field-rule);
  font-size: var(--text-lead); line-height: 1.6; color: var(--on-field); max-width: 48ch;
}
.figure strong { font-weight: 600; color: #fff; }
.figure strong[data-out="fees"] { color: #ffb59e; }
.figure input {
  width: 4.8ch; padding: 0 0.1em; font: inherit; font-weight: 600; color: #fff; text-align: center;
  background: transparent; border: 0; border-bottom: 1px dashed var(--on-field-2); border-radius: 0;
  -moz-appearance: textfield; appearance: textfield;
}
.figure input::-webkit-inner-spin-button, .figure input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.figure input:focus { outline: none; border-bottom: 1px solid var(--on-field); background: rgba(255,255,255,0.06); }
.note { font-size: var(--text-label); color: var(--on-field-2); max-width: 62ch; margin-top: calc(-1 * var(--s-4)); }

/* Sections on paper */
.section { padding-block: clamp(4rem, 3rem + 5vw, 7rem); }
.section + .section { border-top: 1px solid var(--rule); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); margin-top: var(--s-7); }
.trio dt { font-weight: 700; font-size: 1.125rem; line-height: 1.35; padding-top: var(--s-4); border-top: 1px solid var(--rule-strong); }
.trio dd { margin-top: var(--s-3); color: var(--ink-2); }
.aside { margin-top: var(--s-7); color: var(--ink-2); max-width: 62ch; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); margin-top: var(--s-7); }
.steps span { display: block; font-family: var(--serif); font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1; margin-bottom: var(--s-3); }
.steps li:first-child span { color: var(--accent); }
.steps p { color: var(--ink-2); max-width: 32ch; }
.guarantee { margin-top: var(--s-8); padding: var(--s-5) 0; border-block: 1px solid var(--rule-strong); display: grid; gap: var(--s-3); max-width: 64ch; }
.guarantee p { font-size: var(--text-lead); line-height: 1.5; }
.guarantee p + p { font-size: var(--text-body); color: var(--ink-2); }

/* Close */
.close__inner { display: grid; gap: var(--s-6); justify-items: start; padding-block: clamp(4rem, 3rem + 5vw, 7rem); }
.people { display: grid; gap: var(--s-2); font-size: var(--text-lead); color: var(--on-field-2); max-width: 52ch; }
.people strong { color: var(--on-field); font-weight: 600; }

/* Footer */
.foot { background: var(--field); color: var(--on-field-2); font-size: 0.9375rem; }
.foot__row { display: flex; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-5); border-top: 1px solid var(--field-rule); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (max-width: 820px) {
  .trio, .steps { grid-template-columns: 1fr; }
  .toplink { font-size: 0.875rem; }
  .foot__row { flex-direction: column; }
}
