/* aaroncphelps.com — the collection skeleton shared by the Notes and
   Projects indexes (design/notes-v1, design/projects-v1). Paper ground, the
   dot screen and grain, the difference-blended masthead with the domino
   wordmark, a very large Alpina title that types in with the lede fading in
   after it, the list of full-width cards (each page styles its own), and
   the charcoal close with the email and the footer. The cards' hover field
   lives in collection.js. A page loads fonts.css, this file and its own
   stylesheet. */

:root {
  --paper: #e8e6e1;
  --charcoal: #2b2b29;
  --ink: #2b2b29;
  --muted: #6b6b67;
  --body: #585855;
  --orange: #c9502b;
  --sky: #9fd3ec;
  --sage: #d3d9c3;
  --lav: #cbc7dc;
  --light-orange: #ecc6b0;
  --rule: rgba(43, 43, 41, .18);
  --gutter: clamp(24px, 2.8vw, 52px);
}

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

html { scroll-behavior: smooth; }

/* html carries the paper too: with a background of its own, the body's
   paint stays inside the body's isolated group, so the masthead's
   difference blend has paper to invert against (not the transparent root) */
html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, p { margin: 0; }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  background: var(--orange);
  color: var(--paper);
  padding: 12px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- the fixed layers ---------- */

/* a faint dot screen fading down the page */
.screen {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(43, 43, 41, .16) .7px, transparent 1px);
  background-size: 10px 10px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .6) 40%, transparent 80%);
  mask-image: linear-gradient(180deg, #000 0, rgba(0, 0, 0, .6) 40%, transparent 80%);
}
/* film grain, multiplied into the paper */
.grain {
  position: fixed;
  inset: -25%;
  width: 150%;
  height: 150%;
  pointer-events: none;
  z-index: 20;
  background-image: url("/assets/home/grain.png");
  background-size: 155px 155px;
  opacity: .07;
  mix-blend-mode: multiply;
  animation: grain-shift .24s steps(1) infinite;
  will-change: transform;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-1%, 3%); }
  80% { transform: translate(3%, -1%); }
}

/* ---------- masthead and the brand mark ---------- */

.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--gutter);
  mix-blend-mode: difference;
  color: #fff;
}
.masthead nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3vw, 52px);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -.01em;
}
.masthead nav a[aria-current] { border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.masthead nav a:hover { opacity: .55; }

/* the falling dominoes (design/homepage-v10/BRAND-MARK.md): nine bars that
   topple left to right on hover and stand back up on leave. The
   a.wordmark:hover selectors must out-rank the rest-state delays that
   follow, so keep the order */
.wordmark{display:inline-flex;align-items:center;gap:14px;font-family:var(--display);font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:-.01em;color:inherit;text-decoration:none}
.wordmark:hover{opacity:1}   /* override any global link-dim on hover — the animation is the hover state */
.site-foot a.wordmark:hover { opacity: 1; }
.mark{display:inline-flex;align-items:flex-end;gap:5px;height:22px;padding-right:12px}
.mark i{width:2px;height:22px;background:var(--ink);transform-origin:50% 100%;transition:transform .5s cubic-bezier(.4,.9,.5,1)}
.mark i:last-child{background:var(--orange);width:2.5px}
a.wordmark:hover .mark i{transform:rotate(52deg)}
a.wordmark:hover .mark i:nth-child(1){transition-delay:0s}
a.wordmark:hover .mark i:nth-child(2){transition-delay:.06s}
a.wordmark:hover .mark i:nth-child(3){transition-delay:.12s}
a.wordmark:hover .mark i:nth-child(4){transition-delay:.18s}
a.wordmark:hover .mark i:nth-child(5){transition-delay:.24s}
a.wordmark:hover .mark i:nth-child(6){transition-delay:.3s}
a.wordmark:hover .mark i:nth-child(7){transition-delay:.36s}
a.wordmark:hover .mark i:nth-child(8){transition-delay:.42s}
a.wordmark:hover .mark i:nth-child(9){transition-delay:.5s;transform:rotate(44deg)}
.wordmark .mark i:nth-child(9){transition-delay:0s}
.wordmark .mark i:nth-child(8){transition-delay:.05s}
.wordmark .mark i:nth-child(7){transition-delay:.1s}
.wordmark .mark i:nth-child(6){transition-delay:.15s}
.wordmark .mark i:nth-child(5){transition-delay:.2s}
.wordmark .mark i:nth-child(4){transition-delay:.25s}
.wordmark .mark i:nth-child(3){transition-delay:.3s}
.wordmark .mark i:nth-child(2){transition-delay:.35s}
.wordmark .mark i:nth-child(1){transition-delay:.4s}
/* masthead sits under mix-blend-mode:difference, so everything is white there (incl. the orange bar) */
.masthead .mark i,.masthead .mark i:last-child{background:#fff}

/* ---------- icons and type roles ---------- */

.ar { width: 1em; height: 1em; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: square; stroke-linejoin: miter; vertical-align: -.08em; flex: none; }
.ar-up { transform: rotate(-45deg); }
.px { width: .9em; height: .9em; fill: currentColor; display: inline-block; vertical-align: -.05em; flex: none; }

/* the Typewriter voice: the captions only */
.caption {
  font-family: var(--caption);
  font-weight: 300;
  font-style: italic;
  font-size: 15px;
  letter-spacing: .01em;
  color: var(--muted);
}
.turn { font-family: var(--turn); font-weight: 700; font-style: italic; letter-spacing: -.01em; }
/* a typed word: a snap, not a fade */
.hw { display: inline-block; opacity: 0; transition: opacity .1s linear; }
.hw.on { opacity: 1; }

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

.hero {
  padding: 170px var(--gutter) 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px var(--gutter);
  align-items: end;
}
.hero h1 {
  font-family: var(--statement);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 156px);
  line-height: .9;
  letter-spacing: -.025em;
  margin-top: 22px;
  text-wrap: balance;
}
/* the lede waits for the title to finish typing */
.hero .lede {
  font-family: var(--lede);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(24px, 2.1vw, 36px);
  line-height: 1.1;
  color: var(--body);
  max-width: 22ch;
  justify-self: end;
  padding-bottom: 10px;
  opacity: 0;
  transition: opacity .6s ease;
}
body[data-typed="on"] .hero .lede { opacity: 1; }

/* ---------- the list of cards: each page styles its own ---------- */

.list { display: grid; gap: 14px; padding: 0 var(--gutter); }
/* the sweep: one band of prismatic light (a sky edge, a paper core, a peach
   edge) crosses the card once and rests. collection.js adds .lit on hover or
   focus, and once on arrival on a touch screen; the class leaves when the
   animation ends. Under the card's content (which sits at z-index 1) */
.list a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  /* a wide band with a little spectrum in it: sky, lilac, paper, peach,
     sage, each at a fifth to a third strength, screened on so it adds light
     and a hint of hue rather than paint */
  background-image: linear-gradient(104deg, transparent 0 35%, rgba(159, 211, 236, .22) 41%, rgba(203, 199, 220, .2) 45.5%, rgba(232, 230, 225, .3) 50%, rgba(236, 198, 176, .22) 54.5%, rgba(211, 217, 195, .2) 59%, transparent 65% 100%);
  background-size: 260% 100%;
  background-position: 120% 0;
  mix-blend-mode: screen;
}
/* two stages on one clock: the band crosses in the first 1.3s as before,
   then the glow it leaves at the left drifts a little further and dissolves
   over the last 1.2s on a gentle in-and-out curve, so it goes gradually
   rather than dropping away */
.list a.lit::after { animation: sweep 2.5s linear 1; }
@keyframes sweep {
  0% { opacity: 0; background-position: 120% 0; animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
  11% { opacity: .9; animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
  52% { opacity: .9; background-position: -70% 0; animation-timing-function: cubic-bezier(.42, .05, .5, .95); }
  100% { opacity: 0; background-position: -90% 0; }
}

/* ---------- the close: the CTA and the footer, on charcoal ---------- */

.close {
  margin-top: 120px;
  background: var(--charcoal);
  color: #e8e6e1;
  --ink: #e8e6e1;
  --muted: #a9a8a3;
  --body: #c4c2bc;
  --rule: rgba(232, 230, 225, .22);
  padding: 0 var(--gutter);
}
.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px var(--gutter);
  padding: 12vh 0 10vh;
  align-items: end;
}
.cta h2 { font-family: var(--statement); font-weight: 700; font-size: clamp(34px, 3.8vw, 68px); line-height: .94; letter-spacing: -.02em; }
.cta .email {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 520px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(19px, 1.8vw, 30px);
  letter-spacing: -.03em;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 12px;
  overflow-wrap: anywhere;
}
.cta .email:hover { opacity: .7; }
.site-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 0 36px; border-top: 1px solid var(--rule); }
.site-foot a:hover { opacity: .6; }
.site-foot .caption { font-size: 14px; letter-spacing: .02em; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; }
  .hero .lede { justify-self: start; }
  .cta { grid-template-columns: 1fr; }
  .cta .email { font-size: 16px; letter-spacing: -.02em; }
}

/* ---------- reduced motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .hw, .hero .lede { opacity: 1; }
  .mark i { transition: none; }
}

@media print {
  .screen, .grain, .skip-link { display: none; }
  .list a::after { display: none; }
  .hw, .hero .lede { opacity: 1 !important; }
}
