/* Site-wide ink. Same paper, stamp, and yellow as the footer.
   Each page keeps its own drawing. */

.ink-meter {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

body[data-namespace^="/projects/"]:not([data-namespace="/projects/"]) .ink-meter {
  display: block;
}

h1, h2, h3, h4 {
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: -0.035em;
  text-transform: none;
  line-height: 0.96;
  color: #f4f1ea;
}

p, li, label, input, textarea, button, a {
  font-family: "Nunito", "Segoe UI", sans-serif;
}

.nav-link,
.mobile-nav-link,
.header-cta,
.btn,
.page-meta,
.form-label,
.project-toc-link,
.project-hero-credits,
.section-subtitle {
  font-family: "Nunito", "Segoe UI", sans-serif;
  text-transform: none;
  letter-spacing: -0.01em;
}

.nav-link,
.mobile-nav-link {
  font-weight: 800;
}

.header-cta,
.btn {
  font-weight: 800;
  border-radius: 999px;
  border: 2px solid var(--color-accent-ink);
  box-shadow: 0 3px 0 var(--color-accent-ink);
}

.header-cta:hover,
.btn:hover {
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 5px 0 var(--color-accent-ink);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  border-color: var(--color-accent-ink);
}

.btn-primary:hover {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn-secondary {
  background: transparent;
  color: #f4f1ea;
  border-color: #f4f1ea;
  box-shadow: 0 3px 0 #f4f1ea;
}

.btn-secondary:hover {
  background: transparent;
  color: #f4f1ea;
  box-shadow: 0 5px 0 #f4f1ea;
}

.page-meta {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.ink-line {
  fill: none;
  stroke: #f4f1ea;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ink-fill {
  fill: #141414;
  stroke: #f4f1ea;
  stroke-width: 2.6;
  stroke-linejoin: round;
}

.ink-a {
  fill: var(--color-accent);
  stroke: #141414;
  stroke-width: 2.2;
}

.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.85fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 48px) clamp(20px, 5vw, 64px) 36px;
}

.sheet-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-weight: 800;
  color: var(--color-accent);
}

.sheet h1 {
  margin: 0 0 16px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  max-width: 10ch;
}

.sheet-sub {
  max-width: 42ch;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
  color: color-mix(in oklab, #f4f1ea 74%, #0d0d0d);
}

.sheet-stage {
  position: relative;
  min-height: 280px;
}

.sheet-stage svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.sheet-stage text {
  fill: #f4f1ea;
  font-family: "Nunito", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 16px;
}

/* ---- about: the notebook ------------------------------------------------ */

.folio-note {
  position: absolute;
  left: 8%;
  top: 6%;
  transform: rotate(-6deg);
  background: #141414;
  color: #f4f1ea;
  border: 2px solid #f4f1ea;
  border-radius: 14px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 3px 3px 0 var(--color-accent);
}

.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.crew-card {
  --rest: -1.1deg;
  padding: 28px 26px 30px;
  background: #141414;
  border: 2px solid #f4f1ea;
  border-radius: 22px;
  box-shadow: 7px 7px 0 var(--color-accent);
}

.crew-card:nth-child(even) {
  --rest: 1.1deg;
}

.crew-card img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--color-accent);
  display: block;
  margin: 0 0 16px;
}

.crew-card h3 {
  margin: 0 0 6px;
  font-size: 1.7rem;
}

.crew-role {
  margin: 0 0 12px;
  color: var(--color-accent);
  font-weight: 800;
}

.crew-card p:last-child {
  margin: 0;
  color: color-mix(in oklab, #f4f1ea 72%, #0d0d0d);
  line-height: 1.6;
}

.service-card {
  --rest: -0.8deg;
  background: #141414;
  border: 2px solid #f4f1ea;
  border-radius: 20px;
  box-shadow: 6px 6px 0 var(--color-accent);
  overflow: visible;
}

.service-card:nth-child(even) { --rest: 0.7deg; }
.service-card:nth-child(3) { --rest: -0.3deg; }

.service-card::before { display: none; }

.service-card:hover,
.service-card.scroll-fade-in.visible:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 8px 10px 0 var(--color-accent);
}

/* ---- projects: the yard ------------------------------------------------- */

.project-card {
  --rest: -0.7deg;
  background: #141414;
  border: 2px solid #f4f1ea;
  border-radius: 20px;
  box-shadow: 7px 7px 0 var(--color-accent);
  overflow: hidden;
}

.project-card:nth-child(even) { --rest: 0.8deg; }

.project-card::before { display: none; }

.project-card:hover,
.project-card.scroll-fade-in.visible:hover {
  transform: rotate(0.4deg) translateY(-5px);
  box-shadow: 9px 12px 0 var(--color-accent);
}

.project-card-title,
.project-card-link {
  font-family: "Nunito", "Segoe UI", sans-serif;
  text-transform: none;
  letter-spacing: -0.02em;
}

.project-card-title {
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
}

.yard-float {
  position: absolute;
  width: 42px;
  height: 42px;
}

.yard-float svg {
  width: 100%;
  height: 100%;
  fill: var(--color-accent);
  stroke: #141414;
  stroke-width: 1.6;
}

/* ---- conference: the packet -------------------------------------------- */

.packet .sheet-stage {
  display: grid;
  place-items: center;
}

.stamp {
  width: 210px;
  height: 210px;
  border: 4px solid var(--color-accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--color-accent);
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 28px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transform: rotate(-14deg);
  box-shadow: inset 0 0 0 8px rgba(255, 229, 0, 0.18);
  animation: ink-stamp 0.7s cubic-bezier(0.2, 0.8, 0.25, 1.2) 0.15s both;
}

.stamp span {
  display: block;
  font-family: "Nunito", "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

@keyframes ink-stamp {
  0% { opacity: 0; transform: rotate(-28deg) scale(1.35); }
  100% { opacity: 1; transform: rotate(-14deg) scale(1); }
}

.material-card {
  --rest: -1deg;
  background: #141414;
  border: 2px solid #f4f1ea;
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--color-accent);
  position: relative;
}

.material-card:nth-child(2) { --rest: 1.2deg; }
.material-card:nth-child(3) { --rest: -0.4deg; }

.material-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #f4f1ea;
  display: grid;
  place-items: center;
  color: #141414;
  background: var(--color-accent);
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 900;
}

.demo-screen {
  max-width: 920px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 2px solid #f4f1ea;
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--color-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 229, 0, 0.08), transparent 46%),
    #0d0d0d;
}

.demo-play {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--color-accent);
  display: grid;
  place-items: center;
}

.demo-play span {
  width: 0;
  height: 0;
  border-left: 22px solid var(--color-accent);
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  margin-left: 6px;
}

/* ---- contact: the slip -------------------------------------------------- */

.slip-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.note-sheet {
  --rest: 0.6deg;
  background: #141414;
  border: 2px solid #f4f1ea;
  border-radius: 22px;
  box-shadow: 8px 8px 0 var(--color-accent);
  padding: 28px 26px 32px;
}

.note-spring {
  width: 36px;
  height: 72px;
  transform-origin: 50% 0;
  margin-bottom: 8px;
}

.note-spring path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.reply-note {
  border: 2px solid #f4f1ea;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 4px 4px 0 var(--color-accent);
}

.form-label {
  font-weight: 800;
}

.form-input,
.form-textarea {
  border: 2px solid #f4f1ea;
  border-radius: 14px;
  background: #0d0d0d;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 3px 3px 0 var(--color-accent);
}

/* ---- sent + lost -------------------------------------------------------- */

.sent,
.lost {
  min-height: 78vh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-height) + 36px) 24px 72px;
  text-align: center;
}

.sent-card,
.lost-card {
  max-width: 640px;
}

.sent h1,
.lost h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin: 12px 0 14px;
}

.check-mark {
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.loose-stage {
  position: relative;
  width: min(280px, 70vw);
  margin: 0 auto 8px;
}

.loose-stage svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

#loose-wheel { cursor: pointer; }
#loose-wheel:focus { outline: none; }

.loose-note {
  position: absolute;
  right: 0;
  top: 8%;
  background: #141414;
  color: #f4f1ea;
  border: 2px solid #f4f1ea;
  border-radius: 14px;
  padding: 6px 10px;
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--color-accent);
  transform: rotate(4deg);
}

.loose-note[hidden] { display: none; }

.lost-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.lost-links a {
  border: 2px solid #f4f1ea;
  border-radius: 999px;
  padding: 8px 14px;
  color: #f4f1ea;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 3px 3px 0 var(--color-accent);
}

.lost-links a:hover {
  transform: translateY(-2px) rotate(-1deg);
}

/* ---- project case file -------------------------------------------------- */

.ink-spin {
  display: grid;
  place-items: center;
}

.case-mark {
  width: 180px;
  height: 40px;
  margin-top: 18px;
  overflow: visible;
}

.case-mark text {
  fill: #f4f1ea;
  font-family: "Nunito", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.project-hero {
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 229, 0, 0.07), transparent 42%),
    #0d0d0d;
}

.project-hero-title,
.narrative-section h2,
.narrative-section h3,
.section-intro h2 {
  text-transform: none;
  letter-spacing: -0.035em;
}

.project-hero-image,
.narrative-image,
.design-image,
.narrative-image-single {
  border: 2px solid #f4f1ea;
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--color-accent);
  overflow: hidden;
}

.principle-number {
  border-radius: 50%;
  background: var(--color-accent);
  color: #141414;
  font-family: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.ink-scribble {
  display: block;
  width: min(280px, 60%);
  height: 18px;
  margin: -6px 0 16px;
}

.stat-item {
  border: 2px solid #f4f1ea;
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--color-accent);
  background: #141414;
}

.cta-section {
  background: #0d0d0d;
}

@media (max-width: 860px) {
  .sheet,
  .slip-grid {
    grid-template-columns: 1fr;
  }

  .sheet-stage { min-height: 0; }

  .slip-grid .note-sheet { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-fade-in,
  .scroll-fade-in.visible,
  .scroll-slide-in-left,
  .scroll-slide-in-left.visible,
  .scroll-slide-in-right,
  .scroll-slide-in-right.visible {
    opacity: 1;
    transform: none;
  }

  .stamp { animation: none; }
}
