/* Fonts — self-hosted (SIL Open Font License) */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/assets/bricolage-grotesque-latin-ext-37500abe.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/assets/bricolage-grotesque-latin-16ac37c9.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/dm-mono-400-latin-ext-c908ed67.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/dm-mono-400-latin-bf792450.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Yellowtail";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/yellowtail-latin-ext-a83706f1.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Yellowtail";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/yellowtail-latin-c9348cd6.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens */

:root {
  --night: #1d1530;
  --night-deep: #150d27;
  --plum: #2c2244;
  --ember: #f24b2e;
  --cream: #fff2de;
  --lilac: #bfb3c4;
  --rule: rgba(255, 242, 222, 0.12);

  --sans: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, monospace;
  --script: "Yellowtail", "Brush Script MT", cursive;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Layout: 80px gutters on desktop, 20px on phones, content capped at 1280px */
  --gutter: max(clamp(20px, 5.5vw, 80px), 50% - 640px);
  --header-height: 96px;
  --logo-size: clamp(300px, 30.5vw, 440px);
  --card-width: 400px;
  --card-height: 480px;
  --card-gap: 32px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-width: 18rem;
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--cream);
}

a:hover {
  color: var(--ember);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 4px;
}

p {
  margin: 0;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--night);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow-x: clip;
}

main {
  flex: 1 0 auto;
}

/* Spotlight beam that falls on the logo */

.spotlight {
  position: absolute;
  z-index: 0;
  top: 0;
  right: calc(var(--gutter) + var(--logo-size) / 2 - 350px);
  width: 700px;
  height: 760px;
  filter: blur(22px);
  pointer-events: none;
}

.spotlight::before {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 242, 222, 0.12) 0%, rgba(255, 242, 222, 0.16) 35%, rgba(255, 242, 222, 0.05) 75%, rgba(255, 242, 222, 0) 100%);
  clip-path: polygon(41% 0, 59% 0, 100% 100%, 0 100%);
  content: "";
}

/* Header */

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-inline: var(--gutter);
}

.wordmark {
  display: flex;
  align-items: baseline;
  color: var(--cream);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--cream);
}

.wordmark__mic {
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: 0.01em;
}

.wordmark__script {
  position: relative;
  top: 0.2em;
  margin-left: 1px;
  color: var(--ember);
  font-family: var(--script);
  font-weight: 400;
}

.wordmark--small {
  font-size: 26px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__link {
  display: flex;
  min-height: 44px;
  align-items: center;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button--outline {
  height: 48px;
  padding: 0 22px;
  border: 1.5px solid rgba(255, 242, 222, 0.45);
  font-size: 17px;
  font-weight: 600;
}

.button--outline:hover {
  border-color: var(--ember);
}

.button--solid {
  height: 60px;
  padding: 0 32px;
  background: var(--ember);
  color: var(--night);
  font-size: 19px;
  font-weight: 650;
}

.button--solid:hover {
  background: var(--cream);
  color: var(--night);
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 7px;
}

.text-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Hero */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 64px var(--gutter) 0;
}

.hero__copy {
  min-width: 0;
  flex: 1 1 auto;
  container-type: inline-size;
}

.hero__title {
  margin: 0;
  color: var(--cream);
  /* 96px when the copy column is its full 760px */
  font-size: min(96px, 12.6cqi);
  font-weight: 700;
  font-stretch: 82%;
  letter-spacing: -0.025em;
  line-height: 1;
}

.hero__line {
  display: block;
}

.hero__line--nowrap {
  white-space: nowrap;
}

/* The proofreader's caret and the handwritten insertion above it */
.hero__aside {
  position: relative;
  display: inline-block;
  width: 0.417em;
  height: 1px;
}

.hero__caret {
  position: absolute;
  top: 0.02em;
  left: 0.104em;
  width: 0.3125em;
  height: 0.25em;
  color: var(--ember);
}

.hero__scribble {
  position: absolute;
  /* Offsets are in the scribble's own (smaller) ems */
  right: -0.107em;
  bottom: 1.43em;
  color: var(--ember);
  font-family: var(--script);
  font-size: 0.583em;
  font-stretch: 100%;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-3deg);
  transform-origin: 70% 80%;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 36px;
  margin-top: 56px;
}

.hero__logo {
  position: relative;
  width: var(--logo-size);
  flex-shrink: 0;
}

/* Soft pool of light under the logo */
.hero__logo::before {
  position: absolute;
  right: -11%;
  bottom: -14%;
  left: -11%;
  height: 22%;
  background: radial-gradient(closest-side, rgba(255, 242, 222, 0.2), rgba(255, 242, 222, 0));
  content: "";
}

.hero__logo-image {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 32px 70px rgba(8, 4, 20, 0.55), 0 0 0 1px rgba(255, 242, 222, 0.1);
}

/* Signal divider */

.signal {
  height: 88px;
  margin: 76px var(--gutter) 0;
  color: var(--cream);
}

.signal__line {
  display: block;
  width: 100%;
  height: 100%;
}

.signal__line--narrow {
  display: none;
}

/* Projects */

.projects {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 1fr) auto auto var(--gutter);
  grid-template-areas:
    ". intro counter buttons ."
    "viewport viewport viewport viewport viewport"
    ". progress progress progress .";
  align-items: end;
  padding: 48px 0 160px;
}

.projects__intro {
  display: flex;
  grid-area: intro;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  color: var(--ember);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.projects__title {
  margin: 0;
  color: var(--cream);
  font-size: clamp(40px, 2.3vw + 31px, 64px);
  font-weight: 700;
  font-stretch: 82%;
  letter-spacing: -0.02em;
  line-height: 1;
}

.projects__lede {
  max-width: 720px;
  margin-top: 4px;
  color: var(--lilac);
  font-size: clamp(17px, 0.3vw + 16px, 20px);
  line-height: 1.5;
}

.projects__viewport {
  position: relative;
  grid-area: viewport;
  margin-top: 48px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.projects__viewport::-webkit-scrollbar {
  display: none;
}

.projects__viewport:focus-visible {
  outline-offset: -3px;
}

.projects__track {
  display: flex;
  width: max-content;
  gap: var(--card-gap);
  padding-inline: var(--gutter);
}

.projects__controls {
  display: contents;
}

.projects__controls[hidden] {
  display: none;
}

.projects__counter {
  grid-area: counter;
  align-self: end;
  margin: 0 24px 0 40px;
  color: var(--lilac);
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 56px;
  white-space: nowrap;
}

.projects__buttons {
  display: flex;
  grid-area: buttons;
  gap: 12px;
}

.round-button {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1.5px solid rgba(255, 242, 222, 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: background-color 160ms ease, opacity 160ms ease;
}

.round-button svg {
  width: 22px;
  height: 22px;
}

.round-button:not(:disabled):hover {
  background: rgba(255, 242, 222, 0.1);
}

.round-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.progress {
  position: relative;
  grid-area: progress;
  height: 3px;
  margin-top: 40px;
  border-radius: 3px;
  background: rgba(255, 242, 222, 0.16);
}

.progress__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 3px;
  border-radius: 3px;
  background: var(--cream);
}

/* Project cards */

.project-card {
  display: flex;
  width: var(--card-width);
  height: var(--card-height);
  flex: 0 0 var(--card-width);
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 32px 34px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--ember);
  color: var(--night);
  scroll-snap-align: start;
}

.project-card--cream {
  background: var(--cream);
}

.project-card--plum {
  border: 1px solid rgba(255, 242, 222, 0.1);
  background: var(--plum);
  color: var(--cream);
}

.project-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card__number,
.status-pill {
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card__number {
  font-size: 14px;
}

.status-pill {
  display: flex;
  height: 30px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1.5px solid rgba(29, 21, 48, 0.4);
  border-radius: 999px;
  font-size: 12px;
}

.project-card--plum .status-pill {
  border-color: rgba(255, 242, 222, 0.4);
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.project-card__art {
  display: block;
  width: 300px;
  max-width: 100%;
  height: auto;
  align-self: center;
  aspect-ratio: 4 / 3;
}

.project-card__title {
  margin: 0;
  font-size: 32px;
  font-weight: 650;
  font-stretch: 90%;
  letter-spacing: -0.01em;
  line-height: 1.08;
  text-wrap: balance;
}

/* Footer */

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  padding: 64px var(--gutter) 56px;
  border-top: 1px solid var(--rule);
  background: var(--night-deep);
}

.site-footer__hello,
.site-footer__social {
  display: flex;
  flex-direction: column;
}

.site-footer__hello {
  gap: 14px;
}

.site-footer__social {
  gap: 10px;
}

.site-footer__sign-off {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.footer-label {
  color: var(--lilac);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.email-link {
  align-self: flex-start;
  font-size: clamp(26px, 1.715vw + 19.3px, 44px);
  font-weight: 600;
  font-stretch: 90%;
  letter-spacing: -0.01em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.23em;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}

.social-links svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.social-links a:hover svg {
  transform: translate(2px, -2px);
}

.copyright {
  color: var(--lilac);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* Tablet: logo moves above the headline */

@media (max-width: 1099px) {
  :root {
    --logo-size: clamp(232px, 40vw, 360px);
  }

  .spotlight {
    right: auto;
    left: 50%;
    width: calc(var(--logo-size) * 1.8);
    height: calc(var(--header-height) + var(--logo-size) + 76px);
    filter: blur(16px);
    transform: translateX(-50%);
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
    gap: 60px;
    padding-top: 24px;
  }

  .hero__logo {
    order: -1;
    align-self: center;
  }

  .hero__logo-image {
    box-shadow: 0 20px 44px rgba(8, 4, 20, 0.55), 0 0 0 1px rgba(255, 242, 222, 0.1);
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .site-footer__hello {
    grid-column: 1 / -1;
  }
}

/* Phone */

@media (max-width: 719px) {
  :root {
    --header-height: 72px;
    --card-width: 300px;
    --card-height: 420px;
    --card-gap: 16px;
  }

  .wordmark {
    font-size: 25px;
  }

  .wordmark--small {
    font-size: 22px;
  }

  .site-nav__link {
    display: none;
  }

  .button--outline {
    height: 44px;
    padding: 0 18px;
    font-size: 15px;
  }

  .button--solid {
    height: 52px;
    padding: 0 24px;
    font-size: 17px;
  }

  .text-link {
    gap: 8px;
    font-size: 17px;
    text-underline-offset: 6px;
  }

  .text-link svg {
    width: 18px;
    height: 18px;
  }

  .hero__title {
    /* 40px across a 350px column */
    font-size: min(56px, 11.4cqi);
    font-stretch: 78%;
    line-height: 1.08;
  }

  .hero__aside {
    width: 0.7em;
  }

  .hero__caret {
    left: 0.175em;
    width: 0.45em;
    height: 0.35em;
  }

  .hero__scribble {
    right: -0.143em;
    bottom: 1.32em;
    font-size: 0.7em;
  }

  .hero__actions {
    gap: 12px 20px;
    margin-top: 28px;
  }

  .signal {
    height: 56px;
    margin-top: 52px;
  }

  .signal__line--wide {
    display: none;
  }

  .signal__line--narrow {
    display: block;
  }

  .projects {
    grid-template-columns: var(--gutter) minmax(0, 1fr) auto auto var(--gutter);
    grid-template-areas:
      ". intro intro intro ."
      "viewport viewport viewport viewport viewport"
      ". progress counter buttons .";
    align-items: center;
    padding: 36px 0 72px;
  }

  .projects__intro {
    gap: 10px;
  }

  .eyebrow {
    font-size: 13px;
  }

  .projects__viewport {
    margin-top: 28px;
  }

  .progress,
  .projects__counter,
  .projects__buttons {
    margin-top: 24px;
  }

  .projects__counter {
    margin-inline: 14px;
    font-size: 13px;
    line-height: 48px;
  }

  .projects__buttons {
    gap: 10px;
  }

  .round-button {
    width: 48px;
    height: 48px;
  }

  .round-button svg {
    width: 20px;
    height: 20px;
  }

  .project-card {
    padding: 24px 24px 28px;
    border-radius: 24px;
  }

  .project-card__number {
    font-size: 13px;
  }

  .status-pill {
    height: 28px;
    gap: 7px;
    padding: 0 11px;
    font-size: 11px;
  }

  .project-card__art {
    width: 252px;
  }

  .project-card__title {
    font-size: 26px;
    line-height: 1.1;
  }

  .site-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 44px var(--gutter) 40px;
  }

  .site-footer__hello {
    gap: 10px;
  }

  .site-footer__social {
    gap: 6px;
  }

  .footer-label {
    font-size: 12px;
  }

  .social-links {
    gap: 0 24px;
  }

  .social-links a {
    gap: 5px;
    font-size: 17px;
  }

  .social-links svg {
    width: 13px;
    height: 13px;
  }

  .site-footer__sign-off {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--rule);
  }

  .copyright {
    font-size: 11px;
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .spotlight,
  .hero__logo::before {
    display: none;
  }

  .project-card,
  .round-button {
    border: 1px solid CanvasText;
  }

  .progress__thumb {
    background: CanvasText;
  }
}
