/**
 * The stories index. DotCollab's brand on a dark ground, matching the shell's
 * handover screen (os/src/styles/desktop.css) — the two are the only surfaces
 * where the product speaks for itself rather than dressing a story's set.
 */

/* The same cut the deck sets its type in, carried over so the index and the
   story it opens are not two different products. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --dc-primary: #ee9000;
  --dc-primary-lift: #ffab2e;
  --dc-accent: #0099e5;
  --dc-magenta: #e20074;
  --dc-aurora: linear-gradient(100deg, #0099e5, #e20074 52%, #ee9000);

  --fg: #f2f7ff;
  --fg-dim: #9fb2c9;
  --fg-faint: #6b7f97;
  --card: #ffffff0a;
  --card-hover: #ffffff12;
  --rule: #ffffff1a;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

body {
  margin: 0;
  min-height: 100svh;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  color: var(--fg);
  background:
    radial-gradient(52% 46% at 50% 24%, #0099e526 0%, transparent 72%),
    radial-gradient(46% 40% at 82% 84%, #ee900021 0%, transparent 70%),
    linear-gradient(170deg, #0b1421 0%, #05080e 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 940px;
  padding: 72px 0 56px;
}

/* Header */

header {
  text-align: center;
  margin-bottom: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--fg-dim);
}

.brand img {
  width: 24px;
  height: 24px;
}

.brand b {
  font-weight: 700;
  color: var(--fg);
}

h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 680;
  letter-spacing: -0.03em;
}

h1 em {
  font-style: normal;
  background: var(--dc-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--fg-dim);
  font-size: 15.5px;
  line-height: 1.6;
}

/* The stories */

/* Capped rather than stretched: a card is a card whether there is one story
   here or six, and a lone one spread across the full width reads as a mistake. */
.stories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 400px));
  justify-content: center;
  gap: 14px;
}

.story {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 24px 22px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.story:hover {
  background: var(--card-hover);
  border-color: #ffffff33;
  transform: translateY(-2px);
}

.story .meta {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dc-primary);
}

.story h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 640;
  letter-spacing: -0.02em;
}

.story p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 14.5px;
  line-height: 1.55;
}

.story .go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dc-primary);
}

.story .go svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.story:hover .go svg {
  transform: translateX(3px);
}

/* Footer */

footer {
  margin-top: 44px;
  text-align: center;
  font-size: 13.5px;
}

footer a {
  color: var(--fg-faint);
  text-decoration: none;
}

footer a:hover {
  color: var(--fg-dim);
}

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

  .story:hover {
    transform: none;
  }
}
