/* The home page: the course site's "editor" look (Geist, zinc with a trace of violet), by hand. */
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: oklch(0.995 0.002 286);
  --foreground: oklch(0.2 0.015 286);
  --card: oklch(1 0 0);
  --muted: oklch(0.965 0.005 286);
  --muted-foreground: oklch(0.5 0.015 286);
  --border: oklch(0.91 0.008 286);
  --primary: oklch(0.52 0.24 292);
  --primary-solid: oklch(0.52 0.24 292);
  --primary-solid-foreground: oklch(0.99 0 0);
  --grid-line: oklch(0.2 0.015 286 / 0.05);
  --glow: oklch(0.52 0.24 292 / 0.12);
  --destructive: oklch(0.577 0.245 27.325);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.16 0.008 286);
    --foreground: oklch(0.96 0.005 286);
    --card: oklch(0.19 0.01 286);
    --muted: oklch(0.23 0.012 286);
    --muted-foreground: oklch(0.68 0.015 286);
    --border: oklch(0.28 0.012 286);
    --primary: oklch(0.7 0.19 292);
    --primary-solid: oklch(0.55 0.22 292);
    --primary-solid-foreground: oklch(0.99 0 0);
    --grid-line: oklch(1 0 0 / 0.04);
    --glow: oklch(0.6 0.22 292 / 0.18);
    --destructive: oklch(0.704 0.191 22.216);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .wrap {
    padding: 0 1.5rem;
  }
}
.muted {
  color: var(--muted-foreground);
}
.mono {
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.small {
  font-size: 0.75rem;
}
.eyebrow {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
}
.visually-hidden,
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Header */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklch, var(--background) 80%, transparent);
  backdrop-filter: blur(12px);
}
.bar-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 3.5rem;
}
/* The course site's mark (apps/web/src/components/site/logo.tsx), to the pixel. */
.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background: var(--primary-solid);
  color: var(--primary-solid-foreground);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 0 20px -4px color-mix(in oklch, var(--primary) 60%, transparent);
  transition: transform 0.15s;
}
.logo:hover .logo-mark {
  transform: rotate(-6deg);
}
.logo-name {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}
.bar .nav {
  margin-left: auto;
}
.nav a:hover {
  color: var(--foreground);
}
@media (max-width: 560px) {
  .bar .nav a:nth-child(n + 3) {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--glow), transparent 70%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size:
    100% 100%,
    48px 48px,
    48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, black 40%, transparent 80%);
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 4rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 640px) {
  .hero-inner {
    padding-top: 5.5rem;
    padding-bottom: 4.5rem;
  }
}
h1 {
  max-width: 50rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lead {
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  text-wrap: balance;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.6rem;
  padding: 0 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  font: inherit;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.15s;
}
.button:hover {
  border-color: color-mix(in oklch, var(--primary) 50%, var(--border));
}
.button.primary {
  border-color: transparent;
  background: var(--primary-solid);
  color: var(--primary-solid-foreground);
}
.button.primary:hover {
  filter: brightness(1.1);
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}
.stats strong {
  color: var(--foreground);
  font-weight: 600;
}

/* Sections */
.section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-top: 3.5rem;
}
h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--card);
}
.products {
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .products {
    grid-template-columns: 1fr 1fr;
  }
}
.product {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem;
  transition:
    transform 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.product:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklch, var(--primary) 45%, var(--border));
  box-shadow: 0 10px 40px -16px var(--glow);
}
.product h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.link {
  margin-top: auto;
  padding-top: 0.5rem;
  font-weight: 500;
  color: var(--primary);
}
.host {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Latest */
.columns {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .columns {
    grid-template-columns: 1.1fr 1fr;
  }
}
.column-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.column-title a {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--primary);
}
.lectures,
.posts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.lecture,
.post {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.6rem;
  border-radius: 0.6rem;
  transition: background 0.15s;
}
.post {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
}
.lecture:hover,
.post:hover {
  background: var(--muted);
}
.lecture img,
.thumb-empty {
  flex-shrink: 0;
  width: 8.5rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--muted);
}
.lecture > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.item-title {
  font-weight: 500;
  line-height: 1.35;
}

/* Updates */
.updates {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
}
@media (min-width: 768px) {
  .updates {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}
.updates h2 {
  font-size: 1.15rem;
}
.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.signup input[type='email'] {
  flex: 1 1 14rem;
  height: 2.6rem;
  padding: 0 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  font: inherit;
  color: var(--foreground);
}
.signup input[type='email']:focus {
  outline: 2px solid color-mix(in oklch, var(--primary) 60%, transparent);
  outline-offset: 1px;
}
.note {
  flex-basis: 100%;
  min-height: 1.25rem;
  font-size: 0.875rem;
}
.error {
  flex-basis: 100%;
  font-size: 0.875rem;
  color: var(--destructive);
}
.done {
  font-weight: 500;
  color: var(--primary);
}

/* Footer, 404 */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 5rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.notfound {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 6rem;
  padding-bottom: 4rem;
}
