/* ==========================================================================
   Curated Resource Directory — Styles
   Phase 2: Visual Structuring
   Design tokens from docs/briefing.md
   Aesthetic: motherfuckingwebsite.com (readability) + stripe.dev (polish)
   ========================================================================== */

/* --- Base --- */

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

html {
  color: #1a1a1a;
  background-color: #f4f4f4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  background-color: #ffffff;
}

/* --- Typography --- */

h1, h2, h3, h4, h5, h6 {
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
}

/* ==========================================================================
   Hero Section — Full-Screen Typography
   Sits outside <main>; breaks out of body max-width.
   Neo-brutalist aesthetic via heavy type, tight spacing, web fonts.
   ========================================================================== */

.hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-top: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background-color: #f4f4f4;
  overflow-x: hidden;
}

.hero-content {
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-title {
  font-family: 'Bricolage Grotesque', Georgia, serif;
  font-size: clamp(1.5rem, 8vw, 11rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #1a1a1a;
  text-transform: uppercase;
  margin: 0 0 1rem;
  padding: 0 0.25rem;
}

.hero-not {
  font-family: 'Bricolage Grotesque', Georgia, serif;
  font-weight: 800;
  font-size: 1.25em;
  color: #d32f2f;
  display: inline-block;
  vertical-align: baseline;
  margin-right: -0.05em;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: clamp(4rem, 11vw, 11rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }
}

.hero-meta {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(0.875rem, 1.5vw, 1.125rem);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: #666666;
  max-width: 540px;
  margin: 0 auto;
}

/* --- End Hero Section --- */

h2 {
  font-size: 2em;
  line-height: 1.3;
  font-weight: bold;
  margin: 0 0 0.5rem;
}

/* Section description directly after h2 */
h2 + p {
  color: #666666;
  margin-bottom: 0;
}

h3 {
  font-size: 1.5em;
  line-height: 1.4;
  font-weight: bold;
  margin: 2rem 0 1rem;
}

/* Tighten spacing: h3 followed by blockquote */
h3 + blockquote {
  margin-top: 0.5rem;
}

/* --- Body text --- */

p {
  margin: 0 0 1rem;
}

small, .meta {
  font-size: 0.9em;
  line-height: 1.5;
  color: #666666;
}

/* --- Links --- */

a {
  color: #0066cc;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: #004499;
}

a:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Lists --- */

ul {
  list-style: disc;
  padding-left: 1.5em;
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.5rem;
}

li:last-child {
  margin-bottom: 0;
}

/* Sub-category label paragraphs (e.g. "Desktop Browsers:") */
p + ul {
  margin-top: -0.5rem;
}

/* --- Blockquote (introductory questions) --- */

blockquote {
  margin: 0 0 1rem;
  padding: 0.625rem 0 0.625rem 1.25rem;
  border-left: 3px solid #0066cc;
  color: #666666;
  font-style: italic;
  font-size: 1.05em;
}

blockquote p {
  margin: 0;
}

/* --- Aside (Important / Tip callouts) --- */

aside {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid #666666;
  background-color: #fafafa;
  border-radius: 0 4px 4px 0;
  color: #1a1a1a;
  font-size: 0.9em;
  line-height: 1.6;
}

aside p {
  margin: 0;
}

aside strong {
  color: #1a1a1a;
}

/* --- Sections — structural separation --- */

main {
  padding-top: 2rem;
}

main > section {
  padding: 2.5rem 0;
  background-color: #ffffff;
}

main > section:first-child {
  padding-top: 2rem;
}

main > section + section {
  border-top: 4px solid #e0e0e0;
  margin-top: 0;
}

/* Subsections get 2rem gap */
section > section + hr {
  margin: 2rem 0;
}

/* --- Horizontal rules (subsection separators) --- */

hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2rem 0;
}

/* --- Code (inline) --- */

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background-color: #f5f5f5;
  padding: 0.15em 0.4em;
  border-radius: 3px;
  word-break: break-word;
}

/* --- Sub-category headings (bold labels within lists) --- */

strong {
  font-weight: 600;
}

/* --- Selection highlight --- */

::selection {
  background-color: #0066cc;
  color: #ffffff;
}

/* --- Responsive: desktop (768px+) --- */

@media (min-width: 768px) {
  body {
    max-width: 750px;
    padding: 0 2rem 4rem;
  }

  main {
    padding-top: 3rem;
  }

  /* Hero — larger padding + spacing */
  .hero {
    padding: 3rem 2rem;
  }

  .hero-title {
    margin-bottom: 2rem;
  }

  h2 {
    font-size: 2.25em;
  }

  h3 {
    font-size: 1.625em;
  }

  blockquote {
    font-size: 1.1em;
  }
}

/* --- Responsive: large desktop (1200px+) --- */

@media (min-width: 1200px) {
  body {
    max-width: 900px;
  }

  .hero {
    padding: 4rem 2rem;
  }
}

/* --- Print --- */

@media print {
  html {
    background-color: #ffffff;
  }

  body {
    max-width: 100%;
    padding: 0;
    background-color: #ffffff;
  }

  /* Hero — collapse for print */
  .hero {
    min-height: auto;
    width: 100%;
    margin-left: 0;
    padding: 1rem 0 2rem;
    background-color: #ffffff;
  }

  .hero-title {
    font-size: 3rem;
  }

  main > section {
    background-color: transparent !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  main > section + section {
    border-top: 1px solid #1a1a1a;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666666;
  }

  aside {
    border-left-color: #1a1a1a;
    background: none;
  }
}
