/* Tokens, type, and the desktop layout.
   Social URLs: /js/config.js
   Breakpoints: /css/responsive.css */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-roman.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --paper: #f2f2f2; */
  --paper: #f8f9fa;
  --paper-deep: #e4e4e4;
  --lift: #f7f7f7;
  --ink: #1a1a1a;
  --ink-soft: #3a3a3a;
  --muted: #5e5e5e;
  --line: #d4d4d4;
  --accent: #8e3b2a;
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --page: clamp(1.25rem, 4vw, 3.25rem);
  --wide: 66rem;
  --measure: 40rem;
  --frame: 52rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  overflow-x: clip;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: #e2e2e2;
  color: var(--ink);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--page);
  top: 0.6rem;
  z-index: 90;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 0.75rem;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

/* Underline that draws in from the left and leaves to the right. */
.hover-line {
  position: relative;
  text-decoration: none;
}

.hover-line::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.16em;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.42s var(--ease);
  pointer-events: none;
}

.hover-line:hover::after,
.hover-line:focus-visible::after,
a:hover > .hover-line::after,
a:focus-visible > .hover-line::after,
.hover-line[aria-current="page"]::after,
.hover-line[data-current="true"]::after,
a[aria-current="page"] > .hover-line::after {
  width: 100%;
}

.site-header,
.mobile-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
  padding: 1.35rem var(--page) 1.15rem;
}

.site-header {
  position: relative;
  z-index: 5;
  flex-wrap: nowrap;
}

.wordmark {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.wordmark img {
  width: 1.75rem;
  height: 1.75rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 1.85rem);
}

.nav-link,
.works-toggle {
  background: none;
  border: 0;
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.98rem;
  line-height: 1;
  text-decoration: none;
}

.nav-menus {
  display: contents;
}

.works {
  position: relative;
}

.works-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  background: transparent;
  border: 0;
  top: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.22s var(--ease), visibility 0.22s;
}

.works:hover .works-dropdown,
.works.is-open .works-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.works[data-suppress] .works-dropdown {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.works-dropdown ul {
  position: relative;
  flex: 0 0 auto;
  margin-top: 0.7rem;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 0;
}

.works-dropdown ul::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.7rem;
  height: 0.7rem;
}

.works-dropdown .hover-line::after {
  top: var(--line-top, calc(100% + 3px));
  bottom: auto;
  height: 1.5px;
}

.works-dropdown a,
.works-dropdown a:hover,
.works-dropdown a:focus,
.works-dropdown a:focus-visible,
.works-dropdown a:active {
  text-decoration: none;
}

.works-dropdown a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.5rem 1.15rem;
  color: var(--paper);
  font-size: 0.98rem;
  line-height: 1;
  white-space: nowrap;
}

.works-dropdown .hover-line {
  flex: 0 0 auto;
  width: max-content;
}

.works-dropdown .idx {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  min-width: 1.35rem;
  color: color-mix(in srgb, var(--paper) 62%, transparent);
}

.works-dropdown a:focus-visible {
  outline-color: var(--paper);
}

.is-project .idx {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  min-width: 1.35rem;
}

.socials {
  display: flex;
  align-items: center;
  gap: 0.05rem;
  margin-left: 0.25rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line);
}

.socials a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  opacity: 0.75;
  transition: opacity 0.25s var(--ease);
}

.socials a:hover,
.socials a:focus-visible {
  opacity: 1;
}

.socials img {
  width: 1.15rem;
  height: 1.15rem;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.nav-toggle-box {
  position: relative;
  width: 1.3rem;
  height: 0.7rem;
}

.nav-toggle-box span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.nav-toggle-box span:first-child {
  top: 0.05rem;
}

.nav-toggle-box span:last-child {
  top: 0.6rem;
}

body.nav-open .nav-toggle-box span:first-child {
  top: 0.32rem;
  transform: rotate(40deg);
}

body.nav-open .nav-toggle-box span:last-child {
  top: 0.32rem;
  transform: rotate(-40deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 0.25rem var(--page) calc(1.5rem + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
}

.mobile-nav .hover-line::after {
  content: none;
}

.mobile-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.8rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 4.6vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.mobile-kicker {
  display: block;
  margin: 1.5rem 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.mobile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.35rem;
  margin-top: auto;
  padding-top: 2.5rem;
}

.mobile-socials a {
  font-size: 0.98rem;
  text-decoration: none;
}

.mobile-list li > *,
.mobile-socials a {
  opacity: 0;
  transform: translateY(10px);
}

.mobile-nav.is-open .mobile-list li > *,
.mobile-nav.is-open .mobile-socials a {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.mobile-nav.is-open .mobile-list li:nth-child(1) > * { transition-delay: 0.04s; }
.mobile-nav.is-open .mobile-list li:nth-child(2) > * { transition-delay: 0.08s; }
.mobile-nav.is-open .mobile-list li:nth-child(3) > * { transition-delay: 0.12s; }
.mobile-nav.is-open .mobile-list li:nth-child(4) > * { transition-delay: 0.16s; }
.mobile-nav.is-open .mobile-list li:nth-child(5) > * { transition-delay: 0.2s; }
.mobile-nav.is-open .mobile-socials a { transition-delay: 0.26s; }

main {
  flex: 1;
  width: 100%;
  padding: clamp(2rem, 5vw, 3.5rem) var(--page) 4.5rem;
}

.sheet {
  width: min(100%, var(--wide));
  margin-inline: auto;
}

.kicker,
.article-num,
.side-num,
.pager-dir {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker {
  margin: 0 0 0.9rem;
}

/* Home */
.home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.5rem, 8vh, 5rem) var(--page);
}

.home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 100%;
  animation: rise 0.8s var(--ease) both;
}

.home-title {
  margin: 0;
  font-size: clamp(3.1rem, 7.2vw, 6.4rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.home-title .line {
  display: block;
}

.line-italic {
  font-style: italic;
}

.mark {
  color: var(--accent);
}

.home-caption {
  margin: 1.95rem 0 0;
  max-width: 20rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.5;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.home-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.home-actions a:hover,
.home-actions a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

/* Information */
.page-head h1,
.article-head h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.page-head h1 {
  max-width: 11em;
}

.deck {
  margin: 1.15rem 0 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.125rem;
  line-height: 1.5;
}

.about-sheet {
  width: min(100%, var(--measure));
}

.about-sheet .page-head {
  margin-bottom: clamp(1.75rem, 1vw, 1rem);
}

.cover img,
.figure img {
  width: 100%;
  background: var(--paper-deep);
}

.cover figcaption,
.figure figcaption,
.media-slot figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.lede {
  margin: 0 0 1rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.025em;
}

.prose h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  line-height: 1.15;
}

.prose h3 {
  margin: 1.7rem 0 0.55rem;
  font-size: 1.28rem;
  font-style: italic;
  line-height: 1.25;
}

.prose p,
.note p {
  color: var(--ink-soft);
}

.prose p {
  margin: 0 0 1rem;
}

.prose a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(28, 27, 23, 0.35);
  transition: text-decoration-color 0.25s var(--ease);
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-color: currentColor;
}

.prose ul {
  margin: 0.2rem 0 1.15rem;
}

.prose li {
  position: relative;
  margin: 0.4rem 0;
  padding-left: 1rem;
  color: var(--ink-soft);
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.28rem;
  height: 0.28rem;
  background: var(--accent);
}

.prose-block {
  margin-top: 2.75rem;
}

.prose-block + .prose-block,
.section-gap {
  margin-top: 3rem;
}

.article-head,
.prose-block,
.pull-block {
  display: grid;
  grid-template-columns: 1fr minmax(0, var(--measure)) 1fr;
  column-gap: 1.5rem;
  align-items: start;
}

.article-num,
.side-num {
  grid-column: 1;
  justify-self: end;
  width: 5.5rem;
  text-align: right;
}

.article-copy,
.prose-block > .prose,
.prose-block > .pull {
  grid-column: 2;
}

.prose,
.article-copy,
.pull {
  max-width: var(--measure);
}

.side-num,
.article-num {
  margin: 0;
  padding-top: 0.7rem;
}

.side-num:empty {
  display: block;
  min-height: 1px;
  padding: 0;
}

.cover,
.figure,
.media-slot {
  width: min(100%, var(--frame));
  margin: 2.75rem auto 0;
}

.split {
  margin-top: 2.75rem;
}

.pull {
  margin: 0;
  padding: 0;
  border: 0;
}

.pull p {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.pull footer {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr minmax(0, var(--measure)) 1fr;
  gap: 2rem 1.5rem;
  align-items: start;
}

.split .prose {
  grid-column: 2;
}

.split .note {
  grid-column: 3;
  justify-self: start;
  max-width: 16rem;
}

.note {
  padding: 1.15rem 1.2rem 1.25rem;
  background: rgba(0, 0, 0, 0.045);
}

.note-label {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.note p:last-child {
  margin: 0;
}

.media-frame,
.embed {
  aspect-ratio: 16 / 9;
  background: var(--paper-deep);
}

.media-frame {
  display: grid;
  place-items: center;
}

.media-frame p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Future film or prototype: drop a video or iframe inside .embed */
.embed iframe,
.embed video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.contact-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.3rem;
}

.pager[hidden] {
  display: none;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: min(100%, var(--measure));
  margin-top: 4.5rem;
  margin-inline: auto;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.pager a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  max-width: 16rem;
  padding: 0.35rem 0;
  text-decoration: none;
}

.pager-next {
  grid-column: 2;
  justify-self: end;
  align-items: flex-end;
  text-align: right;
}

.pager-name {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.4rem var(--page) 1.5rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
  letter-spacing: 0.16em;
}

.noscript-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0 var(--page) 1.5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-head,
.article-head {
  animation: rise 0.7s var(--ease) both;
}
