:root {
  color-scheme: light;
  --ink: #172a35;
  --muted: #64737b;
  --accent: #16735d;
  --accent-dark: #105b49;
  --surface: #edf5f1;
  --border: #dce7e1;
  --page-width: 1000px;
  --shadow-soft: 0 18px 48px rgb(23 42 53 / 8%);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse at 92% 3%, rgb(213 233 222 / 55%), transparent 27rem),
    #f5f7f5;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  padding-top: 1.25rem;
  padding-bottom: 4rem;
}

h1,
h2,
h3 {
  color: #172a35;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-weight: 780;
}

h2 {
  margin-bottom: 1rem;
  font-weight: 740;
}

p,
li {
  text-wrap: pretty;
}

a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible {
  outline: 3px solid #e4a957;
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 5;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgb(220 231 225 / 88%);
  border-radius: 1rem;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 8px 26px rgb(23 42 53 / 6%);
  backdrop-filter: blur(14px);
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}

.site-name::before {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, #21866a, #105b49);
  box-shadow: 0 5px 12px rgb(22 115 93 / 24%);
  color: #fff;
  content: "F";
  font-size: 1.1rem;
  font-weight: 800;
}

.primary-nav a,
.site-footer nav a {
  color: #43545b;
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-nav a:hover,
.site-footer nav a:hover {
  background: var(--surface);
  color: var(--accent-dark);
}

.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: none;
  margin: 0 0 3rem;
  padding: clamp(2rem, 7vw, 5rem);
  border: 1px solid #234a45;
  border-radius: 1.75rem;
  background:
    radial-gradient(circle at 83% 28%, rgb(123 191 152 / 28%), transparent 17rem),
    linear-gradient(125deg, #142f35 0%, #174d43 56%, #20614d 100%);
  box-shadow: 0 24px 60px rgb(23 57 49 / 18%);
}

.intro::after {
  position: absolute;
  z-index: -1;
  top: -4rem;
  right: -3rem;
  width: clamp(13rem, 38vw, 25rem);
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 43% 57% 62% 38% / 39% 40% 60% 61%;
  background:
    radial-gradient(circle at 35% 36%, rgb(255 255 255 / 15%) 0 0.4rem, transparent 0.48rem),
    radial-gradient(circle at 67% 62%, rgb(255 255 255 / 12%) 0 0.3rem, transparent 0.38rem),
    rgb(255 255 255 / 4%);
  content: "";
  transform: rotate(-17deg);
}

.intro::before {
  display: inline-block;
  margin-bottom: 1rem;
  color: #a7ddc1;
  content: "INDEPENDENT DIGITAL GUIDES";
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.intro h1,
.intro p {
  position: relative;
  z-index: 1;
  max-width: 690px;
  color: #fff;
}

.intro h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.35rem, 6vw, 4.4rem);
  line-height: 1.08;
}

.intro p {
  margin: 0;
  color: #d8e9e1;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

#categories,
#articles {
  scroll-margin-top: 6rem;
}

#categories > h2,
#articles > h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.category-links {
  margin: 0 0 3.25rem;
}

.category-links a {
  position: relative;
  overflow: hidden;
  min-height: 5.2rem;
  padding: 1.2rem 1.25rem;
  border-color: var(--border);
  border-radius: 0.9rem;
  background: linear-gradient(140deg, #fff, #f1f7f3);
  box-shadow: 0 8px 20px rgb(23 42 53 / 4%);
  color: #28443c;
  font-size: 1.05rem;
  font-weight: 720;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-links a:hover {
  border-color: #8db9a4;
  box-shadow: 0 12px 26px rgb(23 42 53 / 8%);
  color: var(--accent-dark);
  transform: translateY(-2px);
}

.article-card {
  position: relative;
  overflow: hidden;
  max-width: none;
  margin-top: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 12px 34px rgb(23 42 53 / 5%);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.article-card:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.article-card h3 {
  max-width: 760px;
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 3.3vw, 2rem);
}

.article-card p {
  max-width: 760px;
  color: var(--muted);
}

.article-category {
  margin-bottom: 0.9rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid #d6e9df;
  background: #edf7f1;
  color: #24674f;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 0.55rem;
  background: var(--accent);
  box-shadow: 0 5px 12px rgb(22 115 93 / 16%);
  color: #fff;
  font-size: 0.95rem;
  transition: background-color 160ms ease, transform 160ms ease;
}

.read-more::after {
  content: "  >";
}

.read-more:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

article[id="articles"] > header {
  margin-bottom: 1.5rem;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 92% 10%, rgb(142 201 165 / 22%), transparent 15rem),
    linear-gradient(135deg, #f0f7f2, #f8faf8);
}

article[id="articles"] > header h1 {
  max-width: 790px;
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

article[id="articles"] > header p {
  color: var(--muted);
}

.key-takeaways,
.note-box,
.draft-note {
  padding: 1.25rem 1.5rem;
  border: 1px solid #d8e9df;
  border-left: 5px solid var(--accent);
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #f0f8f3, #fbfdfb);
}

.key-takeaways h2 {
  color: #174e42;
}

.tool-review {
  margin: 2.25rem 0;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(23 42 53 / 4%);
}

.tool-review h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.tool-review ul {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1rem 1rem 2.25rem;
  border-radius: 0.7rem;
  background: #f6f9f7;
}

.tool-review li::marker {
  color: var(--accent);
}

.article-image {
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  background: #e8f1ec;
  object-fit: cover;
  box-shadow: 0 14px 36px rgb(23 42 53 / 10%);
}

.category-content {
  padding-top: 1.5rem;
}

.category-content > h1 {
  margin-bottom: 0.75rem;
}

.category-content > p {
  max-width: 720px;
  color: var(--muted);
}

.category-nav {
  gap: 0.65rem;
  margin: 1.75rem 0 2rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #fff;
}

.category-nav a {
  padding: 0.55rem 0.85rem;
  color: #43545b;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.category-nav a[aria-current="page"] {
  background: #e9f4ed;
  color: var(--accent-dark);
}

.category-content .article-card {
  margin: 1rem 0;
}

.category-content .article-card h2 {
  margin: 0 0 0.65rem;
}

.site-footer {
  margin-top: 4rem;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--border);
  background: transparent;
}

.site-footer nav {
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.8rem;
}

.site-footer p {
  margin-top: 1rem;
  color: #78868b;
  font-size: 0.88rem;
}

.contact-box {
  border-color: var(--border);
  border-radius: 1rem;
  background: linear-gradient(135deg, #f0f8f3, #fff);
  box-shadow: 0 10px 24px rgb(23 42 53 / 5%);
}

.contact-box a {
  font-weight: 700;
}

article:not([id="articles"]) > h1 {
  margin-bottom: 1.5rem;
}

article:not([id="articles"]) > h2 {
  padding-top: 0.25rem;
}

article:not([id="articles"]) > p,
article:not([id="articles"]) > ul,
article:not([id="articles"]) > ol {
  max-width: 78ch;
}

@media (max-width: 600px) {
  main {
    padding-top: 0.65rem;
    padding-bottom: 2rem;
  }

  .site-header {
    top: 0.4rem;
    gap: 0.45rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.85rem;
  }

  .site-name {
    font-size: 1rem;
  }

  .intro {
    margin-bottom: 2.25rem;
    padding: 2rem 1.4rem;
    border-radius: 1.25rem;
  }

  .intro h1 {
    font-size: clamp(2.15rem, 10vw, 3.2rem);
  }

  .category-links {
    gap: 0.6rem;
    margin-bottom: 2.5rem;
  }

  .category-links a {
    min-height: 4.3rem;
    padding: 0.95rem 1rem;
  }

  .article-card,
  .tool-review {
    border-radius: 0.85rem;
  }

  .article-card:hover {
    transform: none;
  }

  .key-takeaways,
  .note-box,
  .draft-note {
    padding: 1rem;
  }

  .tool-review ul {
    padding: 0.75rem 0.75rem 0.75rem 1.8rem;
  }

  .site-footer {
    margin-top: 2.75rem;
    padding-top: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
