/*
  ToStyle
  Structure: Swiss International (asymmetric grid, hard rules, flush-left type)
  Texture:   Risograph (paper stock, three spot inks, misregistration, halftone)
  Wildcard:  Dada (inverted hierarchy in the project index, a crooked sticker)
*/

:root {
  --paper: #f1ebdf;
  --paper-2: #e8e0d0;
  --ink: #1d1b19;
  --pink: #ff48b0;
  --yellow: #ffd60a;
  --teal: #00838a;
  --rule: 2px solid var(--ink);
  --hair: 1px solid var(--ink);

  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Courier Prime", "Courier New", monospace;

  --gutter: clamp(16px, 2.2vw, 44px);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .3 0 0 0 0 .25 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; }
::selection { background: var(--yellow); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- first fold: exactly one screen ---------- */

.fold {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0 var(--gutter);
}

.fold > main {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
}

/* ---------- masthead ---------- */

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 15rem;
  align-items: end;
  gap: 2rem;
  padding: 18px 0 12px;
  border-bottom: var(--rule);
}

/* the name is the product in miniature: typed words ("To") becoming a printed result ("Style") */
.wordmark {
  font-size: 26px;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}
.wordmark__to {
  font-family: var(--mono);
  font-weight: 400;
  font-size: .84em;
  letter-spacing: -.02em;
  margin-right: .04em;
}
.wordmark__style {
  position: relative;
  font-weight: 880;
  font-stretch: 125%;
  letter-spacing: -.035em;
  isolation: isolate;
}
.wordmark__style::before {
  content: "Style";
  position: absolute;
  inset: 0;
  color: var(--pink);
  transform: translate(.06em, .045em);
  mix-blend-mode: multiply;
  z-index: -1;
}
.wordmark--small { font-size: 19px; }
.wordmark__mark {
  align-self: center;
  margin-right: 10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 5px -3px 0 var(--yellow);
  mix-blend-mode: multiply;
}

.nav { display: flex; gap: 2.4rem; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  gap: .45rem;
  align-items: baseline;
}
.nav a span { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.masthead__note {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(360px, 0.62fr);
  gap: 0 clamp(20px, 2.6vw, 52px);
  padding: clamp(18px, 2.6vh, 36px) 0 clamp(18px, 2.6vh, 34px);
  min-height: 0;
}

.hero__side {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-left: var(--hair);
  padding-left: 8px;
  align-self: stretch;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kicker {
  margin: 0 0 clamp(8px, 1.6vh, 20px);
  font-family: var(--mono);
  font-size: 14px;
}
.kicker::before { content: "\2192\00a0"; color: var(--pink); }

.headline {
  position: relative;
  margin: 0;
  font-weight: 880;
  font-stretch: 112%;
  font-size: min(7.9vw, 14vh);
  line-height: .86;
  letter-spacing: -.045em;
  max-width: 13ch;
  isolation: isolate;
}
/* misregistered second pass in pink */
.headline::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--pink);
  transform: translate(.035em, .02em);
  mix-blend-mode: multiply;
  z-index: -1;
}
.headline em {
  font-style: normal;
  background: var(--yellow);
  padding: 0 .08em;
  margin: 0 -.04em;
  display: inline-block;
  transform: rotate(-2.5deg);
  mix-blend-mode: multiply;
}

.hero__body {
  margin-top: auto;
  padding-top: clamp(14px, 2.4vh, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 40px);
  align-items: end;
}
.hero__body p { margin: 0; font-size: clamp(15px, 1.05vw, 19px); line-height: 1.42; max-width: 42ch; }
.hero__aside {
  font-family: var(--mono);
  font-size: 14px !important;
  border-top: var(--rule);
  padding-top: 10px;
}

/* ---------- the press (interactive print) ---------- */

.press {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.press__sheet {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  background: #f8f4ec;
  border: var(--hair);
  box-shadow: 6px 6px 0 var(--ink);
}
.press__sheet canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.reg {
  position: absolute;
  width: 16px; height: 16px;
  z-index: 2;
  pointer-events: none;
}
.reg::before, .reg::after { content: ""; position: absolute; background: var(--ink); }
.reg::before { left: 7px; top: 0; width: 1px; height: 16px; }
.reg::after  { top: 7px; left: 0; height: 1px; width: 16px; }
.reg--tl { top: -22px; left: -1px; }
.reg--tr { top: -22px; right: -1px; }

.press__controls {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}
.press__controls input {
  font: 15px var(--mono);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: var(--rule);
  padding: 8px 2px;
  min-width: 0;
}
.press__controls input:focus { outline: none; background: rgba(255, 214, 10, .35); }

.btn {
  font: 600 14px var(--sans);
  font-stretch: 110%;
  color: var(--ink);
  background: var(--paper);
  border: var(--rule);
  padding: 8px 14px;
  cursor: pointer;
}
.btn:hover { background: var(--yellow); }
.btn:focus-visible, .press__controls input:focus-visible, .note input:focus-visible,
.note select:focus-visible, .note textarea:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--pink); color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--pink); color: var(--ink); }

.press figcaption {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.4;
}
.fig { font-weight: 700; margin-right: .4em; }
.press__words { display: block; margin-top: 4px; min-height: 1.4em; }
.press__words span { padding: 0 2px; transition: background .08s; }
.press__words span.on { background: var(--pink); }

/* ---------- projects ---------- */

.work {
  display: grid;
  /* deliberately uneven: the open slot is the narrowest */
  grid-template-columns: 9rem 1.35fr 1.15fr 1fr .72fr;
  border-top: var(--rule);
  border-bottom: var(--rule);
}

.work__head {
  padding: 16px 16px 16px 0;
  border-right: var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.work__head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  font-stretch: 110%;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.work__head p { margin: 0; font: 12.5px var(--mono); max-width: 9.5ch; }

.project {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 16px;
  padding: 14px 18px 16px;
  border-right: var(--rule);
  overflow: hidden;
  text-decoration: none;
  isolation: isolate;
}
.project:last-child { border-right: 0; }

/* inverted hierarchy: the number is the headline, the name is a label */
.project__no {
  font-weight: 900;
  font-stretch: 62%;
  font-size: clamp(64px, 9.4vh, 104px);
  line-height: .78;
  letter-spacing: -.03em;
  color: var(--c, var(--ink));
  mix-blend-mode: multiply;
}
.project--music  { --c: var(--pink); }
.project--print  { --c: var(--teal); }
.project--motion { --c: var(--yellow); }

/* halftone patch behind each number */
.project::before {
  content: "";
  position: absolute;
  left: 8px; top: 30px;
  width: 92px; height: 92px;
  background-image: radial-gradient(var(--c, var(--ink)) 28%, transparent 31%);
  background-size: 7px 7px;
  opacity: .5;
  mix-blend-mode: multiply;
  z-index: -1;
}

.project__body h3 {
  margin: 2px 0 2px;
  font-size: 13px;
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.project__meta { margin: 0 0 8px; font: 12px var(--mono); }
.project__body p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.4; }
.project__stat {
  font: 12.5px var(--mono) !important;
  border-top: var(--hair);
  padding-top: 6px;
  margin-top: 10px !important;
}
.project__stat b { font-size: 15px; }

.project--open { background: var(--paper-2); transition: background .15s; }
.project--open:hover { background: var(--yellow); }
.project--open .project__no { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.project--open::before { display: none; }
.sticker {
  position: absolute;
  right: 12px; bottom: 14px;
  font: 700 12px var(--mono);
  background: var(--pink);
  padding: 4px 8px;
  transform: rotate(-7deg);
  box-shadow: 2px 2px 0 var(--ink);
}

/* ---------- lower half ---------- */

.lower {
  min-height: 50vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  grid-template-rows: 1fr auto;
  padding: 0 var(--gutter);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: var(--rule);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vh, 42px);
  font-weight: 880;
  font-stretch: 112%;
  letter-spacing: -.035em;
  line-height: 1;
}
.section-head p { margin: 0; font: 13px var(--mono); }

.investors {
  padding: 26px clamp(20px, 2.4vw, 48px) 22px 0;
  border-right: var(--rule);
}
.contact { padding: 26px 0 22px clamp(20px, 2.4vw, 48px); }

/* Q&A */
.qa details { border-bottom: var(--hair); }
.qa summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: baseline;
  padding: 10px 0;
  font-weight: 650;
  font-size: 16.5px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary span { font: 12.5px var(--mono); color: var(--teal); }
.qa summary::after {
  content: "+";
  font: 700 18px var(--mono);
  transition: transform .15s;
}
.qa details[open] summary::after { transform: rotate(45deg); color: var(--pink); }
.qa summary:hover { background: linear-gradient(transparent 55%, rgba(255, 214, 10, .6) 55%); }
.qa details p {
  margin: 0 0 14px 3rem;
  max-width: 60ch;
  font-size: 15px;
}

/* contact */
.inboxes {
  list-style: none;
  margin: 6px 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 4px 28px;
}
.inboxes li { display: flex; flex-direction: column; }
.inboxes span { font: 12px var(--mono); color: var(--teal); }
.inboxes a { font-weight: 650; font-size: 16px; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.inboxes a:hover { background: var(--yellow); }

.note { display: grid; gap: 10px; }
.note__row { display: grid; grid-template-columns: 1fr 1.2fr .8fr; gap: 14px; }
.note label { display: flex; flex-direction: column; gap: 2px; font: 12px var(--mono); }
.note input, .note select, .note textarea {
  font: 15px var(--sans);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: var(--rule);
  border-radius: 0;
  padding: 6px 0;
  resize: vertical;
}
.note select { appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%231d1b19'/%3E%3C/svg%3E") right 2px center no-repeat; }
.note input:focus, .note select:focus, .note textarea:focus { outline: none; background-color: rgba(255, 214, 10, .3); }
.note .btn { justify-self: start; padding: 9px 26px; }
.note__sent { font: 13px var(--mono); margin: 0; }

/* footer */
.footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 28px;
  align-items: baseline;
  border-top: var(--rule);
  padding: 14px 0 18px;
  font: 12.5px var(--mono);
}
.footer a { text-underline-offset: 3px; }

/* ---------- smaller screens ---------- */

@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__side { display: none; }
  .press { margin-top: 28px; }
  .press__sheet { flex: none; aspect-ratio: 4 / 3; }
  .work { grid-template-columns: 1fr 1fr; }
  .work__head { grid-column: 1 / -1; border-right: 0; border-bottom: var(--rule); flex-direction: row; padding-right: 0; }
  .project { border-bottom: var(--hair); }
  .project:nth-of-type(even) { border-right: 0; }
  .lower { grid-template-columns: 1fr; }
  .investors { border-right: 0; padding-right: 0; }
  .contact { padding-left: 0; border-top: var(--rule); }
}

@media (max-width: 640px) {
  .masthead { grid-template-columns: 1fr; gap: 10px; }
  .masthead__note { display: none; }
  .nav { gap: 1.2rem; }
  .headline { font-size: 12.6vw; }
  .hero__body { grid-template-columns: 1fr; }
  .press__controls { grid-template-columns: 1fr 1fr; }
  .press__controls input { grid-column: 1 / -1; }
  .work { grid-template-columns: 1fr; }
  .project { border-right: 0; }
  .inboxes { grid-template-columns: 1fr; }
  .note__row { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- 404 ---------- */

.lost {
  align-self: center;
  padding: 8vh 0 12vh;
}
.lost .headline { max-width: 10ch; line-height: 1; }
.lost__note { font: 15px var(--mono); margin: 28px 0 0; }
.lost__note a { text-underline-offset: 3px; }
.lost__note a:hover { background: var(--yellow); }
