/* clutterworks.studio: tokens, fonts and layout from design-handoff/clutterworks-site/README.md */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #FAF5EA;
  --ink: #1C2A44;
  --ink-soft: #4B5468;
  --ember: #A84716;
  --ember-deep: #87390F;
  --rule: #D9CFBC;
  --bezel: #262A2E;
  --screen: #0D0F0E;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --pad: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
}
h1, h2, h3, p, figure { margin: 0; }
svg { display: block; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { max-width: 1184px; margin: 0 auto; padding: 0 var(--pad); }

/* Links */
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
.link {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ember); font-weight: 600; font-size: 17px;
  text-decoration: underline; text-decoration-color: rgba(168, 71, 22, .45);
  text-decoration-thickness: 1px; text-underline-offset: .24em;
}
.link:hover { color: var(--ember-deep); text-decoration-color: currentColor; text-decoration-thickness: 2px; }

/* Header */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 4px 16px; padding-top: 16px; padding-bottom: 16px;
}
.logo { display: inline-flex; align-items: center; min-height: 44px; }
.logo svg { width: 160px; height: auto; }
.logo path { stroke-dasharray: 1 1.01; stroke-dashoffset: 1; animation: cwdraw 2.6s cubic-bezier(.42, .08, .58, .92) .25s forwards; }
@keyframes cwdraw { to { stroke-dashoffset: 0; } }
.nav { display: flex; gap: 16px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 500; font-size: 16px; text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-decoration-color: var(--ember); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* Opening + featured project share a wrapper so the tall line can span both */
.lead-in { position: relative; }
.line-tall { display: none; position: absolute; pointer-events: none; }
.line-tall path, .line-small path { vector-effect: non-scaling-stroke; }

.hero { padding-top: 40px; }
.hero h1 {
  font: 560 40px/1.08 var(--serif); font-variation-settings: "opsz" 72;
  letter-spacing: -.015em; max-width: 14ch; text-wrap: balance;
}
.lede { margin-top: 20px; font-size: 18px; line-height: 1.55; max-width: 34ch; }

/* Featured project */
.work { padding-top: 56px; scroll-margin-top: 24px; }
.label {
  font: 600 13px/1.4 var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--ember);
}
.frame {
  margin-top: 16px; background: var(--bezel); padding: 6px; border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 1px rgba(28, 42, 68, .10),
    0 14px 28px -14px rgba(28, 42, 68, .45), 0 34px 70px -34px rgba(28, 42, 68, .30);
}
.screen {
  aspect-ratio: 9 / 5; width: 100%; background: var(--screen); border-radius: 3px;
  overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55);
}
.screen video, .screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.screen [hidden] { display: none; }

.project { margin-top: 28px; display: grid; gap: 0; }
.proj-name { padding: 8px 0; }
.proj-name svg { width: 240px; height: auto; }
.proj-intro {
  margin-top: 12px; font: 500 24px/1.22 var(--serif); font-variation-settings: "opsz" 36; max-width: 20ch;
}
.proj-intro span { display: inline-block; }
.proj-copy { margin-top: 20px; }
.proj-copy p, .prose p { max-width: 60ch; }
.proj-copy p + p, .prose p + p { margin-top: 14px; }
.proj-copy .link, .contact .link { margin-top: 14px; }

/* About + contact */
.line-small { margin-top: 80px; width: 132px; height: auto; pointer-events: none; }
.about { margin-top: 20px; }
.section h2 {
  font: 560 30px/1.15 var(--serif); font-variation-settings: "opsz" 60;
  letter-spacing: -.01em; max-width: 16ch; text-wrap: balance;
}
.section .prose { margin-top: 14px; }
.contact { margin-top: 72px; }
.contact .link { font-size: 19px; }

/* Footer */
.site-footer { margin-top: 72px; }
.site-footer p {
  border-top: 1px solid var(--rule); padding: 20px 0 28px;
  font-size: 14px; color: var(--ink-soft);
}

/* Tablet */
@media (min-width: 700px) {
  :root { --pad: 32px; }
  body { font-size: 18px; }
  .site-header { padding-top: 22px; padding-bottom: 22px; }
  .logo svg { width: 192px; }
  .nav { gap: 28px; }
  .line-tall { display: block; right: 22px; top: 6px; width: 80px; height: 320px; }
  .hero { padding-top: 64px; padding-right: 96px; }
  .hero h1 { font-size: 60px; line-height: 1.05; }
  .lede { margin-top: 24px; font-size: 20px; max-width: 38ch; }
  .work { padding-top: 72px; }
  .frame { margin-top: 20px; padding: 10px; border-radius: 13px; }
  .screen { border-radius: 4px; }
  .project { margin-top: 36px; grid-template-columns: 5fr 7fr; column-gap: 32px; }
  .proj-name svg { width: 260px; }
  .proj-intro { font-size: 26px; }
  .proj-copy { margin-top: 0; border-left: 1px solid var(--rule); padding-left: 32px; }
  .link { font-size: 18px; }
  .contact .link { font-size: 20px; }
  .line-small { margin-top: 104px; width: 150px; }
  .about { margin-top: 24px; }
  .section h2 { font-size: 38px; }
  .contact { margin-top: 96px; }
  .site-footer { margin-top: 96px; }
}

/* Desktop */
@media (min-width: 1024px) {
  :root { --pad: 48px; }
  .site-header { padding-top: 28px; padding-bottom: 28px; }
  .logo svg { width: 224px; }
  .line-tall { right: 20px; top: -4px; width: 110px; height: 440px; }
  .hero { padding-top: 72px; padding-right: 160px; }
  .hero h1 { font-size: 84px; line-height: 1.02; letter-spacing: -.02em; }
  .lede { margin-top: 28px; font-size: 22px; max-width: 36ch; }
  .work { padding-top: 80px; }
  .frame { margin-top: 24px; padding: 14px; border-radius: 16px; }
  .screen { border-radius: 5px; }
  .project { margin-top: 48px; column-gap: 56px; }
  .proj-name svg { width: 320px; }
  .proj-intro { font-size: 30px; }
  .proj-copy { padding-left: 48px; }
  .line-small { margin-top: 136px; width: 160px; }
  .section { display: grid; grid-template-columns: 5fr 7fr; column-gap: 56px; }
  .section h2 { font-size: 48px; }
  .section .prose { margin-top: 0; padding-left: 49px; }
  .contact { margin-top: 120px; }
  .site-footer { margin-top: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo path { animation: none; stroke-dashoffset: 0; }
}
