/* SlipStitch studio site. Values come from ../brand/tokens.json; no other hex lives here. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #1B1D2E;
  --ink-raised: #23264A;
  --linen: #F3EEE4;
  --linen-raised: #FBF8F2;
  --thread: #F0B429;
  --thread-deep: #8C640A;
  --wool: #8A8794;
  --wool-text: #5E5B6A;

  --ground: var(--linen);
  --surface: var(--linen-raised);
  --text: var(--ink);
  --muted: var(--wool-text);
  --rule: color-mix(in oklab, var(--ink) 14%, transparent);
  --link: var(--thread-deep);

  --display: "Fraunces", Georgia, serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: max(clamp(16px, 5vw, 64px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: var(--ink);
    --surface: var(--ink-raised);
    --text: var(--linen);
    --muted: #A9A6B3;
    --rule: color-mix(in oklab, var(--linen) 16%, transparent);
    --link: var(--thread);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --ground: var(--ink);
    --surface: var(--ink-raised);
    --text: var(--linen);
    --muted: #A9A6B3;
    --rule: color-mix(in oklab, var(--linen) 16%, transparent);
    --link: var(--thread);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  font-feature-settings: "ss01";
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1, h2 { font-family: var(--display); font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
h1 { font-size: clamp(44px, 8vw, 88px); line-height: 1; }
h1 em { font-style: italic; color: var(--link); }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 72; }
h3 { font-family: var(--body); font-size: 20px; line-height: 1.3; }
p { margin: 0; }
a { color: var(--link); text-decoration-color: color-mix(in oklab, var(--thread) 70%, transparent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--thread); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--thread); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  padding: 8px 12px; background: var(--ink); color: var(--linen); border-radius: 8px;
}
.skip:focus { top: 12px; z-index: 10; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--rule);
}
.home { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.mark { width: 44px; height: 44px; display: block; }
.wordmark { height: 30px; width: auto; display: block; }
.top nav { display: flex; gap: 22px; font-weight: 600; font-size: 15px; }
.top nav a { color: var(--text); text-decoration: none; }
.top nav a:hover { color: var(--link); }

main > section { padding: clamp(56px, 9vw, 120px) var(--gutter); max-width: 1120px; margin: 0 auto; }

.hero { padding-bottom: clamp(40px, 6vw, 80px); }
.eyebrow { font-weight: 600; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); margin-bottom: 20px; }
.hero h1 { max-width: 12ch; }
.lede { font-size: clamp(18px, 2.2vw, 22px); max-width: var(--measure); margin-top: 28px; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 36px; }
.button {
  display: inline-block; padding: 14px 22px; border-radius: 999px;
  background: var(--text); color: var(--ground); font-weight: 600; text-decoration: none;
  transition: transform 240ms var(--ease), background 240ms var(--ease);
}
.button:hover { transform: translateY(-1px); }
.quiet { font-weight: 600; }

/* A row of stitches as a divider: the brand's own shape, repeated. */
.stitch-row {
  height: 28px; margin: 0 var(--gutter);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 28'><path d='M4 7 L20 23 L36 7' fill='none' stroke='%238A8794' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='0.55'/></svg>");
  background-size: 40px 28px; background-repeat: repeat-x; background-position: center;
}

.name { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.name .big { width: 100%; height: auto; }
.name p { max-width: var(--measure); margin-top: 16px; font-size: 18px; }
.name h2 + p { font-family: var(--display); font-variation-settings: "SOFT" 100, "opsz" 36; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.3; margin-top: 20px; }

.apps h2, .how h2, .contact h2 { margin-bottom: 36px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card {
  position: relative; padding: 28px 24px 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--rule); overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--tint); }
/* Each app's own brand colour, the one place an app colour appears on the studio site. */
.card.taperoff { --tint: #FD7661; }
.card.notions { --tint: #2E6B4F; }
.card.openandshut { --tint: #C9A66B; }
.card.bolts { --tint: #3C7DD9; }
.card h3 { font-family: var(--display); font-size: 28px; font-variation-settings: "SOFT" 100, "opsz" 36; margin-bottom: 10px; }
.card p { color: var(--text); }
.status { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.platforms { font-size: 14px; color: var(--muted); margin-top: 16px; }
.card a { display: inline-block; margin-top: 12px; font-weight: 600; }

.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 36px 48px; counter-reset: rule; }
.rules li { counter-increment: rule; padding-top: 16px; border-top: 2px solid var(--rule); }
.rules li::before { content: counter(rule, decimal-leading-zero); display: block; font-family: var(--display); font-size: 15px; color: var(--link); margin-bottom: 10px; font-variation-settings: "opsz" 12; }
.rules h3 { margin-bottom: 8px; }
.rules p { color: var(--text); max-width: 48ch; }

.contact p { font-size: 18px; color: var(--muted); }
.mail { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; max-width: 520px; }
.mail li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.mail span { font-weight: 400; color: var(--muted); }

footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 32px var(--gutter) 48px; border-top: 1px solid var(--rule);
  font-size: 14px; color: var(--muted);
}
footer a { color: var(--muted); }

@media (max-width: 640px) {
  .top nav { display: none; }
  .name { grid-template-columns: 1fr; }
  .name .big { width: 140px; }
  .mail li { flex-direction: column; gap: 2px; }
}
