/* silentwerk — shared stylesheet.
   one font. two colours: gray and orange, sampled from the app.
   shapes: circles and capsules. nothing square. */

:root {
  color-scheme: light dark;

  /* palette — light. paper and orange taken from the app itself. */
  --paper:  #f5f4ee;
  --ink:    #1a1a16;
  --ink-2:  #6e6d65;
  --rule:   #dedcd2;
  --dot:    #e2e0d4;
  --dot-mark: #b9b7ab;
  --accent: #fe5900;
  --on-accent: #151511;
  --bezel:  #1a1a16;

  /* type scale — the only sizes on this site */
  --s1: 11px;
  --s2: 13px;
  --s3: 15px;
  --s4: 17px;
  --s5: 22px;
  --s6: 34px;

  /* radii — a dot is a circle */
  --r-pill:   999px;
  --r-device: 46px;
  --r-screen: 40px;

  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shell: 1120px;
  --pad: 24px;

  /* optical correction. mono glyphs sit inside their cell, so a wordmark
     hangs right of the text under it. measured side bearings, per glyph. */
  --bearing-r: -0.177em;   /* r, as in raum. */
  --bearing-s: -0.104em;   /* s, as in silentwerk */
  --bearing-p: -0.093em;   /* p, as in privacy. */
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:  #151511;
    --ink:    #edebe3;
    --ink-2:  #8c8a80;
    --rule:   #2b2b26;
    --dot:    #26251f;
    --dot-mark: #56554c;
    --bezel:  #2c2c27;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--s3);
  line-height: 1.6;
  text-align: left;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure { margin: 0; }

h1, h2 { font-weight: 500; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--r-pill);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- the world, as the app draws it ----------
   two masked layers over one tile: grey land, orange "visited".
   the tile is a full 360 degrees of longitude, so it loops seamlessly. */

.field {
  position: relative;
  isolation: isolate;
}

.world {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  --tile-w: 1000px;
  --tile-h: 623px;
  -webkit-mask-image: radial-gradient(125% 80% at 18% 42%, #000 0%, #000 26%, transparent 74%);
  mask-image: radial-gradient(125% 80% at 18% 42%, #000 0%, #000 26%, transparent 74%);
}

.field-end .world {
  -webkit-mask-image: radial-gradient(118% 85% at 22% 56%, #000 0%, #000 22%, transparent 76%);
  mask-image: radial-gradient(118% 85% at 22% 56%, #000 0%, #000 22%, transparent 76%);
}

.world::before,
.world::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: calc(100% + var(--tile-w));
  height: var(--tile-h);
  margin-top: calc(var(--tile-h) / -2);
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: var(--tile-w) var(--tile-h);
  mask-size: var(--tile-w) var(--tile-h);
  animation: drift 90s linear infinite;
}

.world::before {
  background-color: var(--dot);
  opacity: 0.7;
  -webkit-mask-image: url(assets/world.svg);
  mask-image: url(assets/world.svg);
}

.world::after {
  background-color: var(--accent);
  opacity: 0.45;
  -webkit-mask-image: url(assets/world-visited.svg);
  mask-image: url(assets/world-visited.svg);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(var(--tile-w) * -1), 0, 0); }
}

/* content settles in once, on load. nothing tied to scrolling. */
@keyframes rise {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: none; }
}

@keyframes fill {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.hero-copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-device { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) 0.12s backwards; }

.wordmark .dot { animation: fill 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) 0.45s backwards; }

@media (prefers-reduced-motion: reduce) {
  .world::before,
  .world::after,
  .hero-copy > *,
  .hero-device,
  .wordmark .dot {
    animation: none;
  }
}

/* visually hidden, still read aloud */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- the dot. a circle, never a square. ---------- */

.dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  margin-left: 0.1em;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: baseline;
}

/* ---------- header ---------- */

.site-header {
  position: relative;
  z-index: 1;
  padding-block: 20px;
}

.site-header a {
  font-size: var(--s2);
  color: var(--ink-2);
  text-decoration: none;
}

.site-header a:hover { color: var(--ink); }

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

.hero { padding-block: 56px 72px; }

.wordmark {
  margin: 0 0 0 var(--bearing-r);
  font-size: clamp(76px, 9.5vw, 140px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 26px 0 0;
  font-size: var(--s4);
  color: var(--ink-2);
}

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.8em;
  margin-top: 36px;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  font-size: var(--s3);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
}

.btn { transition: background-color 140ms ease, color 140ms ease; }

.btn:hover { background: var(--ink); color: var(--paper); }

.hero-device { margin-top: 56px; }

/* ---------- the phone ---------- */

.device {
  width: 100%;
  padding: 6px;
  border-radius: var(--r-device);
  background: var(--bezel);
}

.device img {
  width: 100%;
  border-radius: var(--r-screen);
}

/* ---------- legend ---------- */

.legend { padding-block: 16px 80px; }

.label {
  margin: 0 0 20px;
  font-size: var(--s1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.legend ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--s5);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.key {
  flex: none;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--dot);
}

.key-on { background: var(--accent); }

/* ---------- blocks ---------- */

.block {
  padding-block: 40px 72px;
  border-top: 1px solid var(--rule);
}

.idx {
  margin: 0 0 24px;
  font-size: var(--s1);
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.block .device { margin-top: 32px; }

.block h2 {
  margin: 0;
  font-size: var(--s5);
  letter-spacing: -0.01em;
}

.block p {
  margin: 10px 0 0;
  font-size: var(--s3);
  color: var(--ink-2);
  max-width: 42ch;
}

/* ---------- facts ---------- */

.facts { padding-block: 56px 72px; border-top: 1px solid var(--rule); }

.facts ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 9px 13px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  font-size: var(--s2);
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- maker (see raum/index.html) ---------- */

.maker { padding-block: 0 80px; }

.maker img {
  width: 180px;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  object-fit: cover;
}

.maker p {
  margin: 28px 0 0;
  font-size: var(--s4);
  max-width: 46ch;
}

/* ---------- outro ---------- */

.outro { padding-block: 96px 104px; }

.outro-mark {
  margin: 0 0 0 var(--bearing-r);
  font-size: var(--s6);
  line-height: 1;
  letter-spacing: -0.02em;
}

.outro .tagline { margin-top: 18px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 36px 64px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  font-size: var(--s2);
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 1px;
}

.site-footer a:hover { color: var(--ink); }

.colophon {
  margin: 28px 0 0;
  font-size: var(--s2);
  color: var(--ink-2);
}

/* ---------- document pages (privacy, support, press) ---------- */

.doc { padding-block: 40px 88px; }

.doc-head { max-width: 44ch; }

.doc h1 {
  margin: 0 0 0 var(--bearing-p);
  font-size: var(--s6);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.doc .lede {
  margin: 22px 0 0;
  font-size: var(--s4);
  color: var(--ink-2);
}

.doc .meta {
  margin: 26px 0 0;
  font-size: var(--s2);
  color: var(--ink-2);
}

.prose {
  max-width: 66ch;
  margin-top: 64px;
}

.prose section + section {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid var(--rule);
}

.prose h2 {
  margin: 0 0 8px;
  font-size: var(--s5);
  letter-spacing: -0.01em;
}

.prose h2 + .sub {
  margin: 0 0 36px;
  font-size: var(--s2);
  color: var(--ink-2);
}

.prose h3 {
  margin: 40px 0 0;
  font-size: var(--s4);
  font-weight: 500;
}

.prose h3:first-of-type { margin-top: 32px; }

.prose p {
  margin: 12px 0 0;
  font-size: var(--s3);
  color: var(--ink-2);
}

.prose ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.prose li {
  position: relative;
  margin-top: 8px;
  padding-left: 22px;
  font-size: var(--s3);
  color: var(--ink-2);
}

.prose li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-mark);
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.prose a:hover { color: var(--accent); }

.todo {
  margin: 14px 0 0;
  padding: 14px 18px;
  border: 1px dashed var(--rule);
  border-radius: 22px;
  font-size: var(--s2);
  color: var(--ink-2);
}

@media (min-width: 720px) {
  .doc { padding-block: 56px 112px; }

  .prose p,
  .prose li { font-size: var(--s4); }
}

/* ---------- studio index ----------
   a directory, not a pitch. deliberately unlike the product page. */

.studio { padding-block: 88px 96px; }

.studio .world {
  -webkit-mask-image: radial-gradient(85% 68% at 76% 46%, #000 0%, #000 14%, transparent 70%);
  mask-image: radial-gradient(85% 68% at 76% 46%, #000 0%, #000 14%, transparent 70%);
}

.studio .wordmark {
  margin-left: var(--bearing-s);
  font-size: clamp(44px, 7vw, 92px);
}

.studio .lede {
  margin: 26px 0 0;
  font-size: var(--s4);
  color: var(--ink-2);
  max-width: 34ch;
}

.apps { margin-top: 88px; }

.apps ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.apps li { border-top: 1px solid var(--rule); }

.apps a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: baseline;
  gap: 0 20px;
  padding: 26px 0;
  text-decoration: none;
}

.apps a:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }

.apps .n {
  font-size: var(--s1);
  letter-spacing: 0.14em;
  color: var(--ink-2);
}

.apps .name {
  font-size: var(--s5);
  letter-spacing: -0.01em;
}

.apps .what {
  grid-column: 2;
  margin-top: 6px;
  font-size: var(--s3);
  color: var(--ink-2);
}

.apps .go {
  font-size: var(--s4);
  color: var(--ink-2);
  transition: transform 140ms ease, color 140ms ease;
}

.apps a:hover .go {
  color: var(--accent);
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .apps .go { transition: none; }
}

/* ---------- 720 and up ---------- */

@media (min-width: 720px) {
  :root { --pad: 40px; }

  .site-header { padding-block: 28px; }

  .hero { padding-block: 72px 88px; }

  .device { max-width: 264px; }

  .hero .device { max-width: 320px; }

  .legend { padding-block: 24px 96px; }

  .legend li { font-size: var(--s6); }

  .facts li { padding: 9px 18px; }

  .block p { font-size: var(--s4); }

  .maker p { max-width: none; }
}

/* ---------- 1000 and up: side by side ---------- */

@media (min-width: 1000px) {
  :root { --pad: 56px; }

  .hero { padding-block: 80px 104px; }

  .hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 88px;
    align-items: center;
  }

  .hero-device { margin-top: 0; }

  .legend { padding-block: 32px 120px; }

  .block {
    display: grid;
    grid-template-columns: 44px 264px minmax(0, 1fr);
    column-gap: 56px;
    align-items: start;
    padding-block: 44px 88px;
  }

  .block-copy { padding-top: 4px; }

  .idx { grid-area: 1 / 1; margin: 0; align-self: start; }

  .block .device { grid-area: 1 / 2; margin-top: 0; }

  .block-copy { grid-area: 1 / 3; }

  .facts { padding-block: 72px 96px; }

  .facts ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .maker { padding-block: 0 112px; }

  .maker-inner {
    display: flex;
    align-items: flex-start;
    gap: 48px;
  }

  .maker img { flex: none; }

  .maker p { margin: 0; }

  .outro { padding-block: 128px 136px; }

  .outro-mark { font-size: clamp(34px, 5vw, 72px); }

  .studio { padding-block: 140px 128px; }

  .apps a { grid-template-columns: 64px 1fr auto; padding: 32px 0; }
}
