:root {
  --ink: #111;
  --grey: #666;
  --hairline: #e5e5e5;
  --hairline-dark: #bbb;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', Consolas, ui-monospace, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

/* layout: centered column with a notebook rule down the left margin */
.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
}

.page::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 1px;
  background: var(--hairline);
  transform-origin: top;
  animation: drawRule 1.1s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}

.chip {
  display: inline-block;
  border: 1px solid var(--hairline);
  padding: 4px 10px;
}

/* progress status dots — colour maps to stage */
.status-dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.status-dot--corner {
  position: absolute;
  top: 18px;
  left: 20px;
}

.status-dot.is-concept { background: #9aa4b2; }    /* slate — early idea */
.status-dot.is-inprogress { background: #3f9b52; } /* green — actively building */
.status-dot.is-workshop { background: #d99a2b; }   /* amber — running as sessions */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 44px;
}

.divider::before {
  content: "+";
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1;
  color: var(--hairline-dark);
}

.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* hero — centered scroller with side elements */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-index {
  position: absolute;
  top: 40px;
  left: 0;
  animation: heroRise 0.7s cubic-bezier(0.22, 0.7, 0.2, 1) both;
  animation-delay: 0.15s;
}

.hero-stage {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-name {
  font-family: 'Space Grotesk', var(--sans);
  font-weight: 700;
  font-size: clamp(3rem, 8.5vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-align: center;
}

/* side elements: fly in from the edges on load, retract on scroll (JS-driven) */
.hero-el {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  will-change: transform, opacity;
}

.hero-el--tl { left: clamp(16px, 5vw, 72px); top: 22vh; }
.hero-el--bl { left: clamp(16px, 5vw, 72px); top: 66vh; }
.hero-el--tr { right: clamp(16px, 5vw, 72px); top: 22vh; align-items: flex-end; text-align: right; }
.hero-el--br { right: clamp(16px, 5vw, 72px); top: 66vh; align-items: flex-end; text-align: right; }

.el-value {
  font-size: 1.05rem;
  color: var(--ink);
}

/* while JS drives the animation, start hidden so there is no flash of the layout */
.hero.js-anim .hero-el,
.hero.js-anim .hero-name { opacity: 0; }

/* contact reveal: hover/focus via CSS, tap-toggle adds .open via JS */
.contact {
  position: absolute;
  top: 40px;
  right: 0;
  text-align: right;
  animation: heroRise 0.8s cubic-bezier(0.22, 0.7, 0.2, 1) both;
  animation-delay: 0.72s;
}

.contact-label {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.contact-label::after { content: " +"; }

.contact-reveal {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-dark);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.contact:hover .contact-reveal,
.contact:focus-within .contact-reveal,
.contact.open .contact-reveal {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* drafts board */
.drafts { padding: 32px 0 96px; }

.drafts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  position: relative;
  display: block;
  border: 1px solid var(--hairline);
  background: #fff;
  padding: 32px 28px;
  color: inherit;
  text-decoration: none;
  transform: rotate(-0.3deg);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 15px;
  height: 15px;
  background-color: var(--hairline-dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%203h7v7'/%3E%3Cpath%20d='M10%2014%2021%203'/%3E%3Cpath%20d='M19%2013v6a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V7a2%202%200%200%201%202-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%203h7v7'/%3E%3Cpath%20d='M10%2014%2021%203'/%3E%3Cpath%20d='M19%2013v6a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V7a2%202%200%200%201%202-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color 0.25s ease;
}

.card:nth-child(even) { transform: rotate(0.25deg); }

.card:hover {
  border-color: var(--hairline-dark);
  transform: translateY(-3px);
}

.card:hover::after { color: var(--grey); }

.card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 18px 0 8px;
}

.card p {
  color: var(--grey);
  font-size: 0.95rem;
  margin: 0 0 20px;
}

.card-more { color: var(--ink); }

/* shop — storefront preview linking out to eBay */
.shop { padding: 32px 0 96px; }

.shop-preview {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--hairline);
  padding: 40px 36px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.shop-preview::after {
  content: "+";
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1;
  color: var(--hairline-dark);
  transition: color 0.25s ease;
}

.shop-preview:hover {
  border-color: var(--hairline-dark);
  transform: translateY(-3px);
}

.shop-preview:hover::after { color: var(--grey); }

.shop-preview-main {
  display: flex;
  align-items: center;
  gap: 22px;
}

.shop-logo {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--hairline-dark);
}

.shop-preview-label {
  display: block;
  margin-bottom: 8px;
}

.shop-preview-name {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 2.7rem;
  line-height: 1;
  margin: 0 0 6px;
}

.shop-preview-desc {
  color: var(--grey);
  font-size: 0.95rem;
  margin: 0;
  max-width: 32rem;
}

.shop-preview-cta {
  white-space: nowrap;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline-dark);
  padding-bottom: 3px;
}

/* footer */
.footer {
  border-top: 1px solid var(--hairline);
  margin-top: 48px;
  padding: 24px 0 40px;
}

.footer::before {
  content: "+";
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--hairline-dark);
  margin-bottom: 10px;
}

/* project pages */
.topbar {
  display: flex;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--hairline);
}

.topbar a { text-decoration: none; }

.project-header { padding: 72px 0 40px; }

.project-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
  margin: 20px 0 12px;
}

.project-pitch {
  color: var(--grey);
  font-size: 1.1rem;
  max-width: 40rem;
  margin: 0;
}

.project-body {
  max-width: 65ch;
  padding-bottom: 48px;
}

.project-section {
  border-top: 1px solid var(--hairline);
  padding: 32px 0;
}

.section-label {
  display: block;
  margin-bottom: 12px;
}

.project-section p { margin: 0 0 16px; }

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.cta-button:hover {
  background: var(--ink);
  color: #fff;
}

.next-draft {
  border-top: 1px solid var(--hairline);
  padding: 32px 0 64px;
}

.next-draft a {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline-dark);
}

/* crop marks — blueprint corner ticks framing the page */
.crop-marks span {
  position: fixed;
  width: 10px;
  height: 10px;
  border: 0 solid var(--hairline-dark);
  z-index: 2;
  pointer-events: none;
  animation: markFade 1s ease both;
  animation-delay: 0.9s;
}

.crop-marks span:nth-child(1) { top: 18px; left: 18px; border-top-width: 1px; border-left-width: 1px; }
.crop-marks span:nth-child(2) { top: 18px; right: 18px; border-top-width: 1px; border-right-width: 1px; }
.crop-marks span:nth-child(3) { bottom: 18px; left: 18px; border-bottom-width: 1px; border-left-width: 1px; }
.crop-marks span:nth-child(4) { bottom: 18px; right: 18px; border-bottom-width: 1px; border-right-width: 1px; }

/* load animations */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes drawLine {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes drawRule {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

@keyframes markFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .page::before,
  .hero-index,
  .contact,
  .crop-marks span {
    animation: none;
  }
}

@media (max-width: 720px) {
  .page { padding: 0 20px; }
  .page::before { display: none; }
  .drafts-grid { grid-template-columns: 1fr; }
  .shop-preview { flex-direction: column; align-items: flex-start; gap: 20px; }
  .crop-marks { display: none; }

  /* hero collapses to a simple stacked block; side elements become a static list */
  .hero { min-height: 82vh; align-items: flex-start; }
  .hero-stage { flex-direction: column; align-items: flex-start; width: 100%; }
  .hero-name { text-align: left; order: -1; }
  .hero-el {
    position: static;
    opacity: 1 !important;
    transform: none !important;
    flex-direction: row;
    gap: 8px;
    align-items: baseline;
    text-align: left !important;
    margin-top: 10px;
  }
  .hero-el--tr,
  .hero-el--br { align-items: baseline; }
}
