/* Nathan Bernhardt, r7: BYQ aiaiaiai family ported whole (nav bar 1, hero 1, hero 6, value-features 4, contact 1, footer 1).
   Sources and every departure: SOURCES.json. Type: Inter (OFL), the family's face. */
@font-face { font-family: "Inter"; src: url("fonts/inter-var-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #f4f4f4;
  --dark: #121212;
  --dark-64: rgba(18, 18, 18, 0.64);
  --dark-32: rgba(18, 18, 18, 0.32);
  --dark-16: rgba(18, 18, 18, 0.16);
  --s12: 0.857vw; --s16: 1.143vw; --s24: 1.714vw; --s32: 2.286vw; --s40: 2.857vw; --s48: 3.429vw; --s64: 4.571vw; --s80: 5.714vw; --s120: 8.571vw; --s160: 11.429vw;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--dark); font-family: "Inter", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 100vw; font-size: 15px; text-decoration: none; }
.skip:focus { top: 16px; }
:focus-visible { outline: 2px solid var(--dark); outline-offset: 3px; }

/* Family type scale (vw, from the specs) */
.h1 { font-size: clamp(30px, 3vw, 42px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; margin: 0; text-wrap: balance; }
.h1--muted { color: var(--dark-32); }
.h2 { font-size: clamp(22px, 1.9vw, 26px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
.h3 { font-size: clamp(20px, 1.7vw, 24px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin: 0; }
.h3--muted { color: var(--dark-32); }
.h4 { font-size: clamp(20px, 1.6vw, 23px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; margin: 0; }
.h5 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.text-big { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.5; margin: 0; }
.text-small { font-size: 13px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.4; margin: 0; }
.label { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; line-height: 1.2; text-transform: uppercase; margin: 0; }

/* Underline links: a thin line slides in from the left on hover (family) */
.u { position: relative; text-decoration: none; }
.u::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.15em; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.u--big::after { height: 2px; }
.u:hover::after, .u:focus-visible::after { transform: scaleX(1); }

/* Pills (cta-main) */
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border-radius: 100vw; font-size: 14px; font-weight: 500; text-decoration: none; border: 2px solid var(--dark); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; font-family: inherit; }
.cta--dark { background: var(--dark); color: #fff; width: 100%; }
.cta--dark:hover { background: var(--bg); color: var(--dark); }
.cta--light { background: #fff; color: var(--dark); border-color: #fff; }

/* ---------- Nav: aiaiaiai-navigation-bar-1 ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; gap: 40px; align-items: center; padding: 14px 32px; background: linear-gradient(180deg, rgba(244,244,244,0.96), rgba(244,244,244,0.75) 70%, rgba(244,244,244,0)); }
.nav__brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; font-size: 15px; }
.nav__mid { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.nav__cta { font-size: 15px; font-weight: 500; }
.nav .u::after { transform: scaleX(0); }
.nav__cta::after { transform: scaleX(1); }
.nav__cta:hover::after { transform: scaleX(0); }

/* ---------- Hero: aiaiaiai-hero-1 ---------- */
.hero { padding: 120px 32px 24px; max-width: 1180px; margin: 0 auto; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: end; }
.hero__copy { display: flex; flex-direction: column; gap: 0.15em; max-width: 720px; padding-bottom: 8px; }
.lede { font-size: 17px; line-height: 1.55; color: var(--dark-64); margin: 20px 0 0; max-width: 480px; }
.lede strong { font-weight: 600; color: var(--dark); }
.hero__links { display: flex; gap: 24px; margin: 20px 0 0; font-size: 15px; font-weight: 500; }
.hero__side { display: flex; flex-direction: column; gap: 10px; }
.hero__portrait { width: 320px; aspect-ratio: 816 / 900; height: auto; }
.hero__portrait img { height: 100%; transform: none !important; object-fit: contain; }
.books { padding: 40px 32px 48px; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }

.hero__head { display: flex; flex-direction: column; gap: 0.15em; max-width: 720px; }
.hero__projects { display: flex; flex-direction: column; gap: 16px; margin-top: 56px; }
.hero__label { white-space: pre-line; color: var(--dark-64); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 760px; }
.tile { position: relative; }
.tile__link { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--dark); }
.tile__media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: #e6e6e6; }
.tile__media img { width: 100%; height: 130%; object-fit: cover; transform: translateY(-10%); will-change: transform; }
.tile__media::after { content: ""; position: absolute; inset: 0; background: rgba(18, 18, 18, 0.16); }
.tile__meta { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 500; letter-spacing: -0.01em; }
.tile__name { line-height: 1.3; }
/* Typographic covers: no photograph to approve; the family's ink, grey and off-white */
.cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1; padding: 18px; }
.cover--ink { background: var(--dark); color: #fff; }
.cover--mid { background: #6b6b6b; color: #fff; }
.cover--light { background: #e4e4e4; color: var(--dark); }
.cover__title { font-size: clamp(18px, 1.5vw, 22px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; max-width: 9em; }
.cover__author { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
.tile__year { color: var(--dark-64); }
.tile__cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; transition: opacity .3s; z-index: 3; min-height: 0; padding: 0.5vw 1vw; }
.tile__link:hover .tile__cta, .tile__link:focus-visible .tile__cta { opacity: 1; }
.hero__mark { position: relative; padding: 72px 0 0; }
.wordmark { font-size: clamp(40px, 6vw, 86px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.9; white-space: nowrap; }
.hero__scroll { position: absolute; right: 0; bottom: 8px; color: var(--dark-64); }

/* ---------- About: aiaiaiai-hero-6 ---------- */
.about { padding: 48px 32px 32px; max-width: 1180px; margin: 0 auto; }
.about__images { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; padding: 24px 0 32px; }
.about__left { width: 280px; height: 150px; flex: none; }
.about__rightblock { display: flex; flex-direction: column; gap: 10px; }
.about__right { width: 300px; height: 340px; }
.reveal-wipe { position: relative; overflow: hidden; background: #e6e6e6; }
.reveal-wipe img { width: 100%; height: 130%; object-fit: cover; transform: translateY(-10%); will-change: transform; }
.about__left img { object-position: 50% 32%; }
.about__right img { object-position: 50% 15%; }
.mask { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--bg); transition: height .9s var(--ease); }
.js .reveal-wipe:not(.is-in) .mask { height: 100%; }
.about__heading { max-width: 640px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 14px; }

/* Split entrances: each word climbs out of a clipped line (family's SplitText) */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.05em; margin-bottom: -0.05em; }
.split .w > span { display: inline-block; transform: translateY(0); }
.js .split:not(.is-in) .w > span { transform: translateY(110%); }
.js .split.is-in .w > span { transition: transform .9s var(--ease); }
[data-reveal] { transition: opacity .7s ease-out, transform .7s ease-out; }
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(16px); }

/* ---------- Work: aiaiaiai-value-features-4 ---------- */
.work { padding: 48px 32px 56px; max-width: 1180px; margin: 0 auto; }
.work__divider { height: 1px; background: var(--dark-16); margin-bottom: 32px; }
.work__desc { max-width: 640px; display: flex; flex-direction: column; gap: 14px; }
.rows { list-style: none; margin: 32px 0 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 32px; align-items: baseline; padding: 22px 0; border-top: 1px solid var(--dark-16); scroll-margin-top: 80px; }
.row__go { justify-self: end; white-space: nowrap; }
.row:last-child { border-bottom: 1px solid var(--dark-16); }
.row__body { display: flex; flex-direction: column; gap: 6px; }
.row__sep { display: inline-block; width: 20px; }

/* ---------- Contact: aiaiaiai-contact-1 ---------- */
.contact { padding: 64px 32px 72px; max-width: 1180px; margin: 0 auto; }
.contact__head { display: flex; flex-direction: column; gap: 0.15em; }
.contact__head .h1--muted { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.03em; line-height: 1.2; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; margin-top: 40px; align-items: start; }
.contact__info { display: flex; flex-direction: column; gap: 6px; }
.contact__info .label { margin-top: 20px; color: var(--dark-64); }
.contact__info .label:first-child { margin-top: 0; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.field input, .field select, .field textarea { width: 100%; height: 44px; padding: 0; border: 0; border-bottom: 1px solid var(--dark-16); background: transparent; color: var(--dark); font: 500 16px/1.4 "Inter", sans-serif; letter-spacing: -0.01em; border-radius: 0; transition: border-color .2s; }
.field textarea { height: auto; min-height: 88px; resize: vertical; padding-top: 8px; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%23121212' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 0 center; padding-right: 24px; }
.field select:invalid, .field select option[value=""] { color: var(--dark-32); }
.field input::placeholder, .field textarea::placeholder { color: var(--dark-32); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--dark); }
.contact-form__trap { position: absolute; left: -9999px; }
.contact-form__done, .contact-form__error { margin-top: 20px; }

/* ---------- Footer: aiaiaiai-footer-1 ---------- */
.foot { padding: 0 0 24px; overflow: hidden; border-top: 1px solid var(--dark-16); max-width: 1180px; margin: 24px auto 0; }
.foot__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; padding: 0 32px; max-width: 1180px; margin: 0 auto; }
.foot__links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3em; }
.foot__right { display: flex; flex-direction: column; gap: 0.1em; }
.foot__info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
.foot__info .label { color: var(--dark-64); margin-bottom: 6px; }
.marquee { margin-top: 56px; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 6vw; will-change: transform; }
.js .marquee__track { animation: marquee 32s linear infinite; }
.marquee .wordmark { font-size: clamp(40px, 6vw, 86px); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-100% / 3 - 2vw)); } }
.foot__bar { display: flex; justify-content: space-between; padding: 24px 32px 0; color: var(--dark-64); max-width: 1180px; margin: 0 auto; }

/* Breakpoints: 991, 767, 479 (family) */
@media (max-width: 991px) {
  .nav__mid { display: none; }
  .nav { grid-template-columns: 1fr auto; padding: 12px 24px; }
  .hero { padding: 96px 24px 24px; }
  .books { padding: 24px 24px 40px; }
  .tiles { max-width: none; }
  .about, .work, .contact { padding-left: 24px; padding-right: 24px; }
  .foot__grid { grid-template-columns: 1fr; gap: 40px; padding: 0 24px; }
  .foot__info { grid-template-columns: 1fr 1fr; }
  .foot__bar { padding: 24px 24px 0; }
}
@media (max-width: 767px) {
  .hero { padding: 88px 20px 16px; }
  .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero__portrait { width: 100%; max-width: 320px; height: auto; aspect-ratio: 816 / 900; }
  .books { padding: 16px 20px 32px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .about, .work, .contact { padding-left: 20px; padding-right: 20px; }
  .about__images { flex-direction: column; align-items: stretch; gap: 16px; }
  .about__left { width: 100%; height: 150px; }
  .about__right { width: 100%; height: auto; aspect-ratio: 4 / 5; max-width: 360px; }
  .row { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .row__go { justify-self: start; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .cta { font-size: 15px; }
  .foot { padding-top: 40px; }
  .foot__info { grid-template-columns: 1fr; gap: 20px; }
  .foot__grid { padding: 0 20px; }
  .foot__bar { padding: 20px 20px 0; flex-direction: column; gap: 6px; }
  .marquee { margin-top: 40px; }
}
@media (max-width: 479px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .hero__mark { padding-top: 48px; }
  .hero__scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .marquee__track { animation: none; }
  .js .split:not(.is-in) .w > span { transform: none; }
  .js [data-reveal]:not(.is-in) { opacity: 1; transform: none; }
  .js .reveal-wipe:not(.is-in) .mask { height: 0; }
  .tile__media img, .reveal-wipe img { transform: translateY(-10%) !important; }
}

/* ---------- Utility pages: aiaiaiai-utility-page-1 (thanks.html, 404.html) ---------- */
.h0 { font-size: 9.143vw; font-weight: 600; line-height: 1; letter-spacing: -0.06em; margin: 0; }
.util { padding: var(--s120) var(--s32) var(--s32); min-height: 100vh; }
.util__thirds { display: grid; grid-template-columns: 25% 1fr auto; gap: var(--s32); align-items: end; }
.util__body { display: flex; flex-direction: column; gap: 1.429vw; align-self: start; }
.util__link { margin-top: var(--s32); }
.util__image { width: 22.857vw; height: 21.929vw; }
@media (max-width: 991px) { .util__thirds { grid-template-columns: 1fr; } .util__image { width: 60vw; height: 56vw; } }
@media (max-width: 767px) { .util { padding: 96px 20px 32px; } .h0 { font-size: 11vw; } }
@media (max-width: 479px) { .h0 { font-size: 40px; } .util__image { width: 100%; height: auto; aspect-ratio: 1; } }
