/* Umbrellr brand, dark setting (admin/cross-project/UMBRELLR_BRAND_2026.md §2:
   dark-first, semantic tokens, system SF Pro / SF Mono, timecode yellow).
   Background is pure black rather than the brief's #1A1A1A, on the operator's call. */
:root {
  color-scheme: dark;
  --background: #000000;
  --text-primary: #F5F5F5;
  --text-secondary: #8E8E93;
  --text-tertiary: #48484A;
  --accent: #0A84FF;
  --timecode: #FFD60A;
  --border-subtle: #FFFFFF15;
  --border-default: #FFFFFF25;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mark-width: min(84vw, 1040px);
  --mark-height: calc(var(--mark-width) * 0.2176);
  --ruler: 28px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--background); }

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* Burnt-in overlay, as on dailies: company top left, running timecode top right. */
.burn {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  padding: 16px;
  pointer-events: none;
}
.burn-box {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  padding: 3px 8px;
  background: #000000A0;
  color: var(--text-primary);
}
.burn-box.tc { color: var(--timecode); font-variant-numeric: tabular-nums; }

/* The wordmark. Without script it sits in the opening screen; with script it is
   pinned and its ten shapes assemble, drift apart on scroll and come back at the end. */
.stage {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100svh;
  display: grid;
  place-items: center;
  padding-bottom: 20svh;
  pointer-events: none;
  z-index: 0;
}
.js .stage { position: fixed; }
.wordmark {
  display: block;
  width: var(--mark-width);
  height: auto;
  overflow: visible;
  fill: var(--text-primary);
}
.piece { transform-box: fill-box; transform-origin: center; will-change: transform, opacity; }
.stage > * { grid-area: 1 / 1; }
.over-mark { cursor: pointer; }
.ink { display: block; pointer-events: none; }

main, footer { position: relative; z-index: 1; }

.hero {
  min-height: 100svh;
  padding: calc(40svh + var(--mark-height) / 2 + clamp(16px, 2.5vh, 28px)) 24px 0;
  text-align: center;
}
.lead {
  margin: 0 auto;
  max-width: 26ch;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--text-secondary);
}

.marker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--timecode);
}
.marker::before { content: ""; width: 24px; height: 1px; background: currentColor; }

.product {
  min-height: 150svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 max(24px, 8vw);
}
/* Products: one tile per app, in a row that takes more as they arrive. */
.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 20px;
  max-width: 1400px;
}
.app {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon name" "icon what" "go go";
  column-gap: 28px;
  row-gap: 4px;
  align-items: center;
  padding: 36px;
  border-radius: 28px;
  background: #0E0E0F;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: transform .5s var(--ease), border-color .3s, background .3s;
}
.app-icon { grid-area: icon; width: clamp(96px, 9vw, 136px); height: auto; margin: -10px; }
.app-name { grid-area: name; align-self: end; font-size: clamp(28px, 3vw, 44px); font-weight: 600; letter-spacing: -.015em; line-height: 1.1; }
.app-what { grid-area: what; align-self: start; font-size: clamp(16px, 1.4vw, 20px); color: var(--text-secondary); }
.app-go {
  grid-area: go;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-secondary);
  transition: color .3s;
}
.arrow { display: inline-block; color: var(--accent); transition: transform .4s var(--ease); }
.app:hover, .app:focus-visible { transform: translateY(-4px); border-color: var(--border-default); background: #141416; }
.app:hover .app-go, .app:focus-visible .app-go { color: var(--text-primary); }
.app:hover .arrow, .app:focus-visible .arrow { transform: translate(3px, -3px); }

.end {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 max(24px, 8vw) calc(var(--ruler) + 40px);
}
.details { color: var(--text-secondary); font-size: 14px; }
.details p { margin: 0; }
.details .contact { margin-bottom: 16px; font-size: 17px; }
.details .contact a { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border-default); transition: border-color .3s; }
.details .contact a:hover, .details .contact a:focus-visible { border-bottom-color: var(--accent); }

/* Going to an app: the tile opens out to fill the screen, its icon to the middle. */
.cover {
  position: fixed;
  z-index: 20;
  display: grid;
  place-items: center;
  background: #0E0E0F;
  border-radius: 28px;
  transition: left .55s var(--ease), top .55s var(--ease), width .55s var(--ease), height .55s var(--ease), border-radius .55s var(--ease), background .4s ease;
  pointer-events: none;
}
.leaving .cover { border-radius: 0; background: #000; }
.cover-icon { width: 120px; height: 120px; transition: transform .55s var(--ease), opacity .35s ease; }
.leaving .cover-icon { transform: scale(1.4); }
.landing .cover-icon { opacity: 0; transform: scale(1.6); }
.leaving .burn, .leaving .ruler { opacity: 0; transition: opacity .3s; }

/* A timeline ruler along the bottom; the playhead follows the scroll. */
.ruler {
  position: fixed;
  inset: auto 0 0 0;
  height: var(--ruler);
  z-index: 10;
  border-top: 1px solid var(--border-default);
  background:
    repeating-linear-gradient(90deg, var(--border-default) 0 1px, transparent 1px 80px) bottom / 100% 14px no-repeat,
    repeating-linear-gradient(90deg, var(--border-subtle) 0 1px, transparent 1px 16px) bottom / 100% 6px no-repeat,
    #0A0A0A;
  pointer-events: none;
}
.playhead {
  position: absolute;
  top: -6px;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--accent);
  transform: translateX(var(--x, 0px));
}
.playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  border: 6px solid transparent;
  border-top-color: var(--accent);
}

/* The opening line arrives as the drawing finishes (and after 5 s whatever happens). */
.js .hero .lead { opacity: 0; transform: translateY(12px); transition: opacity 1s var(--ease), transform 1s var(--ease); animation: show 0s 5s forwards; }
.drawn .hero .lead { opacity: 1; transform: none; }
@keyframes show { to { opacity: 1; transform: none; } }

/* Sections fade up as they arrive. */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* 404 */
.lost main { min-height: 100svh; display: grid; place-content: center; gap: 8px; padding: 24px; text-align: center; }
.lost .home { display: block; margin-bottom: 24px; }
.lost .wordmark { width: min(70vw, 420px); margin: 0 auto; }
.lost a:not(.home) { color: var(--accent); text-decoration: none; }

@media (max-width: 600px) {
  .burn { padding: 12px; }
  .product { min-height: 110svh; }
}

@media (prefers-reduced-motion: reduce) {
  .js .stage { position: absolute; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .app, .app-go, .arrow { transition: none; }
}
