/* The homepage (index.html), on top of legal.css: its colors, header and
   footer are shared with the privacy policy and terms. */

:root {
  --accent: #256abf;
  --accent-hover: #1c5cab;
  --accent-soft: #e8f1fc;
  --on-accent: #ffffff;
  --art-paper: #faf6eb;
  --art-filter: none;
  --shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #2a78d6;
    --accent-hover: #3987e5;
    --accent-soft: #1b2a40;
    --art-filter: brightness(0.82);
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --accent: #2a78d6;
  --accent-hover: #3987e5;
  --accent-soft: #1b2a40;
  --art-filter: brightness(0.82);
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.welcome {
  --page: 1080px;
}

/* No margins of their own (and no weight, so the rules below can add them). */
:where(.welcome) :where(h1, h2, h3, p, figure, ul) {
  margin: 0;
}

/* Header ---------------------------------------------------------------------- */

.welcome-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px 24px 0;
}

.welcome-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
}

.welcome-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.welcome-nav a:not(.welcome-btn) {
  color: var(--text-2);
  text-decoration: none;
}

.welcome-nav a:not(.welcome-btn):hover {
  color: var(--text);
  text-decoration: underline;
}

/* Buttons --------------------------------------------------------------------- */

.welcome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  background: var(--bg);
  text-decoration: none;
}

.welcome-btn:hover {
  background: var(--bg-subtle);
}

.welcome-btn-primary {
  border-color: var(--accent);
  color: var(--on-accent);
  background: var(--accent);
}

.welcome-btn-primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.welcome-btn:focus-visible,
.welcome a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero ------------------------------------------------------------------------ */

/* The text and the illustration share one panel the color of the
   illustration's paper, so they read as one picture. The panel keeps the light
   theme's colors in both themes: in the dark one, the whole panel is dimmed
   alike, so the text and the picture still match. */
.welcome-hero {
  --text: #1d1d1f;
  --text-2: #52525b;
  --text-3: #71717a;
  --accent: #256abf;
  --accent-hover: #1c5cab;
  --accent-text: #1c5cab;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 24px;
  width: calc(100% - 48px);
  max-width: calc(var(--page) - 48px);
  margin: 28px auto 64px;
  padding: 40px 24px 40px 56px;
  border-radius: 20px;
  color: var(--text);
  background: var(--art-paper);
  filter: var(--art-filter);
}

.welcome-hero .welcome-btn:not(.welcome-btn-primary) {
  border-color: rgba(60, 45, 20, 0.18);
  background: rgba(255, 255, 255, 0.5);
}

.welcome-hero .welcome-btn:not(.welcome-btn-primary):hover {
  background: rgba(255, 255, 255, 0.85);
}

.welcome-kicker {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-text);
}

.welcome-hero h1 {
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.welcome-lede {
  margin-top: 18px;
  font-size: 18px;
  color: var(--text-2);
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.welcome-note {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-3);
}

/* Its edges fade into the panel, so there's no line where the picture ends. */
.welcome-art img {
  display: block;
  width: 100%;
  height: auto;
  mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
    linear-gradient(transparent, #000 4%, #000 96%, transparent);
  mask-composite: intersect;
}

/* What is Platespin? ---------------------------------------------------------- */

.welcome-about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px 48px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 8px 24px 56px;
}

.welcome h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.welcome-about-text {
  display: grid;
  gap: 14px;
  font-size: 17px;
  color: var(--text-2);
}

/* Features -------------------------------------------------------------------- */

.welcome-features {
  width: calc(100% - 48px);
  max-width: calc(var(--page) - 48px);
  margin: 0 auto;
  padding: 36px 40px 40px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.welcome-features-head p {
  margin-top: 6px;
  color: var(--text-2);
}

.welcome-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.welcome-feature h3 {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.35;
}

.welcome-feature p {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}

.welcome-icon {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 10px;
  color: var(--accent-text);
  background: var(--accent-soft);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Closing and footer ---------------------------------------------------------- */

.welcome-closing {
  max-width: var(--page);
  margin: 0 auto;
  padding: 64px 24px 56px;
  text-align: center;
}

.welcome-closing p {
  margin-top: 8px;
  color: var(--text-2);
}

.welcome-closing .welcome-btn {
  margin-top: 12px;
}

.welcome-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px 24px 40px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-3);
}

.welcome-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

/* Smaller screens ------------------------------------------------------------- */

@media (max-width: 900px) {
  /* The text above the picture, on the same panel. */
  .welcome-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 40px 40px 24px;
  }

  .welcome-about {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .welcome-top,
  .welcome-about,
  .welcome-closing,
  .welcome-foot {
    padding-right: 16px;
    padding-left: 16px;
  }

  .welcome-nav {
    gap: 14px;
  }

  .welcome-nav a[href="#about"] {
    display: none;
  }

  /* Edge to edge, like the Features card. */
  .welcome-hero {
    width: 100%;
    margin: 16px 0 44px;
    padding: 32px 16px 12px;
    border-radius: 0;
  }

  .welcome-hero h1 {
    font-size: 34px;
  }

  .welcome-lede {
    font-size: 17px;
  }

  .welcome h2 {
    font-size: 24px;
  }

  .welcome-features {
    width: 100%;
    padding: 28px 16px 32px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .welcome-feature-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  /* The icon beside the text, rather than above it. */
  .welcome-feature {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 14px;
  }

  .welcome-feature .welcome-icon {
    grid-row: span 2;
  }

  .welcome-feature h3 {
    margin-top: 0;
  }
}
