/* The Making of a Startup Simulator: layout inspired by tucker.wales */

:root {
  --ink: #111827;
  --body: #344054;
  --muted: #5f6b7a;
  --line: #d9dee7;
  --paper: #f8fafc;
  --accent: #0f766e;
  --accent-soft: #8dd7cf;
  --measure: 46rem;
}

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

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0) 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: 2rem;
  }
}

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

.site-header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 15% -10%, rgba(15, 118, 110, 0.35), transparent 60%),
    radial-gradient(50rem 26rem at 110% 10%, rgba(56, 189, 248, 0.14), transparent 60%),
    var(--ink);
  color: white;
}

/* faint grid, fading downward */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 2.75rem 2.75rem;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
  pointer-events: none;
}

.hero {
  position: relative;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .hero {
    padding-top: 3rem;
    padding-bottom: 5rem;
  }
}

.site-header a:hover {
  color: white;
}

.hero-identity {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, var(--accent));
  color: white;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.7), 0 0 0 6px rgba(15, 118, 110, 0.18);
}

.hero-identity p {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.hero-identity span:not(.avatar) {
  display: block;
  margin-top: 0.4rem;
  color: rgb(203 213 225);
  font-size: 0.95rem;
  font-weight: 500;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-header .eyebrow {
  display: block;
  margin-top: 2.5rem;
  color: var(--accent-soft);
}

.site-header h1 {
  margin: 1.25rem 0 0;
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* let the title grow into the empty space to the right of the text column,
   smoothly as the window widens (up to 12rem), so it never re-wraps */
.site-header h1 {
  margin-right: calc(-1 * clamp(0rem, (100vw - var(--measure)) / 2 - 1rem, 12rem));
}

/* ---------- Article ---------- */

main {
  padding-top: 2.5rem;
  padding-bottom: 5rem;
}

@media (min-width: 640px) {
  main {
    padding-top: 3.5rem;
  }
}

.prose {
  color: var(--body);
  font-size: 1.075rem;
  line-height: 1.82;
  overflow-wrap: break-word;
}

.prose p {
  margin: 0 0 1.35rem;
}

/* slightly larger opening paragraph */
.prose > p:first-child {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.7;
}

.prose a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose a:hover {
  color: #0d9488;
}

.prose blockquote {
  margin: 1.75rem 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-size: 1.15rem;
  font-style: italic;
}

.prose blockquote p {
  margin: 0;
}

.prose figure {
  margin: 2.25rem 0;
}

.prose img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0 18px 40px -24px rgba(17, 24, 39, 0.35);
}

/* let wide screenshots break out of the text column on large screens */
@media (min-width: 1100px) {
  .prose figure.wide {
    margin-inline: -8rem;
  }
}

.prose .aside {
  color: var(--muted);
  font-style: italic;
}

/* ---------- Footer ---------- */

.post-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 3px solid var(--ink);
  color: var(--muted);
  font-size: 0.95rem;
}

.post-footer p {
  margin: 0;
}

.post-footer .eyebrow {
  margin-right: 0.5rem;
}

/* ---------- Play button ---------- */

.button-accent,
.prose a.button-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border-radius: 0.45rem;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 20px -8px rgba(15, 118, 110, 0.7);
  transition: background-color 160ms ease, transform 160ms ease;
}

.button-accent:hover,
.site-header a.button-accent:hover,
.prose a.button-accent:hover {
  background: #0d9488;
  color: white;
  transform: translateY(-1px);
}

.site-header .button-accent {
  margin-top: 2rem;
}

.prose .cta {
  margin: 2rem 0;
}

/* ---------- Subtitle, headings, objections ---------- */

.site-header .dek {
  margin: 1rem 0 0;
  color: rgb(203 213 225);
  font-size: 1.2rem;
  line-height: 1.5;
}

.prose h2 {
  margin: 2.75rem 0 1rem;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose .objections {
  margin: 1.75rem 0;
}

.prose details {
  border-top: 1px solid var(--line);
}

.prose details:last-child {
  border-bottom: 1px solid var(--line);
}

.prose summary {
  padding: 0.6rem 0;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

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

.prose details > p {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--line);
  font-size: 1rem;
}

.prose details > p.objection {
  color: var(--muted);
  font-style: italic;
}

/* ---------- Previous / next post ---------- */

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
}

.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: white;
  transition: border-color 160ms ease, color 160ms ease;
}

.post-nav a:hover {
  border-color: var(--accent);
}

.post-nav .next {
  margin-left: auto;
  text-align: right;
}

.post-nav-title {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
}

@media (max-width: 559px) {
  .post-nav {
    flex-direction: column;
  }

  .post-nav a {
    width: 100%;
  }
}
