/* Miscellany Studio. One page. The word "miscellany" is set as a miscellany of type:
   each letter has its own family, weight and width, and settles into them on load. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-italic-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #EEF0EA;
  --ink: #1C2630;
  --muted: #56616B;
  --line: #C9CFC4;
  --accent: #1F5A4B;
  --card: #FFFFFF;
  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --serif: "Source Serif 4", ui-serif, Georgia, serif;
  --gutter: max(24px, env(safe-area-inset-left), env(safe-area-inset-right));
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151B21;
    --ink: #E7EAE3;
    --muted: #9CA6AE;
    --line: #34404A;
    --accent: #8CC7B2;
    --card: #1F2830;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 3px; }
a:focus-visible, .skip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  font-family: var(--sans);
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Page frame */
.top, main, .foot {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding-top: max(1.5rem, env(safe-area-inset-top));
  font-family: var(--sans);
  font-size: 0.95rem;
}
.top-name { font-weight: 600; text-decoration: none; }
.top-mail { color: var(--muted); text-decoration-color: var(--line); }

/* Hero */
.hero { padding-top: clamp(3.5rem, 12vw, 9rem); }

.wordmark {
  margin: 0;
  font-weight: 400;
  line-height: 0.82;
  color: var(--ink);
}
.word {
  display: block;
  font-size: clamp(3.3rem, 16vw, 12.5rem);
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.g {
  display: inline-block;
  font-size-adjust: ex-height 0.5;
  animation: settle 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i) * 70ms + 150ms);
}
.s1, .s2, .s3, .s4, .s5 { font-family: var(--sans); }
.r1, .r2, .r3, .r4, .r5 { font-family: var(--serif); }

.s1 { font-weight: 800; font-stretch: 75%; }
.r1 { font-style: italic; font-weight: 300; }
.s2 { font-weight: 250; font-stretch: 100%; }
.r2 { font-weight: 750; }
.s3 { font-weight: 560; font-stretch: 82%; }
.r3 { font-style: italic; font-weight: 450; }
.s4 { font-weight: 200; font-stretch: 75%; }
.r4 { font-style: italic; font-weight: 800; }
.s5 { font-weight: 480; font-stretch: 100%; }
.r5 { font-style: italic; font-weight: 300; }

@keyframes settle {
  from { font-weight: 400; font-stretch: 100%; opacity: 0.35; }
}

.studio {
  display: block;
  margin-top: 0.15em;
  margin-left: 0.06em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  line-height: 1.1;
  color: var(--accent);
}

.lede {
  max-width: 34rem;
  margin: clamp(2rem, 5vw, 3.25rem) 0 0;
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  line-height: 1.55;
}

/* What we make */
h2 {
  margin: 0 0 0.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.2;
  color: var(--accent);
}

.made {
  max-width: 46rem;
  padding-top: clamp(4.5rem, 12vw, 8rem);
}

.item {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 2.75rem;
}

.item h3 {
  margin: 0.1rem 0 0.35rem;
  font-family: var(--sans);
  font-weight: 650;
  font-stretch: 88%;
  font-size: 1.65rem;
  line-height: 1.15;
}
.item p { margin: 0; }
.item .status {
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
}

.emblem { width: 100%; height: auto; overflow: visible; }

.card { transform: rotate(-6deg); }
.card-face { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.card-index { font-family: var(--sans); font-weight: 700; font-size: 15px; fill: var(--ink); }
.card-pip { fill: var(--ink); }

.record { transform: rotate(3deg); }
.record-sheet { fill: var(--card); stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
.record-fold { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
.record-lines { fill: none; stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.record-seal { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.record-check { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.more-outline { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 5; }
.more-shape { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* Contact */
.contact {
  max-width: 46rem;
  padding-top: clamp(4rem, 10vw, 6.5rem);
}
.contact p { margin: 0; max-width: 34rem; }

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding-top: clamp(4.5rem, 12vw, 8rem);
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}
.foot p { margin: 0; }

@media (max-width: 480px) {
  .item { grid-template-columns: 3.25rem 1fr; gap: 1.1rem; }
  .item h3 { font-size: 1.45rem; }
}

@media (prefers-reduced-motion: reduce) {
  .g { animation: none; }
}
