:root {
  --bg: #f6f1e8;
  --bg-accent: #e7dcc7;
  --surface: rgba(255, 252, 247, 0.9);
  --surface-strong: #fffaf2;
  --text: #2c241b;
  --muted: #6c6152;
  --line: rgba(77, 58, 35, 0.14);
  --brand: #24594b;
  --brand-strong: #173d33;
  --warm: #bf6c2f;
  --shadow: 0 18px 45px rgba(51, 39, 24, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --sidebar-width: 300px;
  --content-width: 1160px;
  --heading-font: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body-font: "Segoe UI Variable", "Trebuchet MS", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body-font);
  background:
    radial-gradient(circle at top left, rgba(191, 108, 47, 0.16), transparent 24rem),
    radial-gradient(circle at bottom right, rgba(36, 89, 75, 0.22), transparent 26rem),
    linear-gradient(180deg, #faf4ea 0%, #f2ebde 100%);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

.page-shell {
  width: min(100%, 1520px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 24px;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
}

.sidebar__inner {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 250, 242, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.sidebar__brand {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--heading-font);
  font-size: 1.75rem;
  font-weight: 700;
  text-decoration: none;
}

.sidebar__title {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

.sidebar__text {
  margin: 0 0 24px;
  line-height: 1.65;
  color: var(--muted);
}

.sidebar__nav,
.sidebar__panel {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.sidebar__nav a {
  display: block;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  text-decoration: none;
  background: transparent;
  transition: background-color 180ms ease, transform 180ms ease;
}

.sidebar__nav a:hover,
.sidebar__nav a:focus-visible,
.sidebar__nav a.is-active {
  background: rgba(36, 89, 75, 0.09);
  transform: translateX(2px);
}

.content {
  max-width: var(--content-width);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.72);
  backdrop-filter: blur(8px);
}

.topbar__menu {
  display: none;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.topbar__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.topbar__nav a {
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--brand-strong);
  background: rgba(36, 89, 75, 0.08);
}

.hero,
.overview,
.app-section,
.articles-preview,
.article-list-page,
.article-page {
  margin-bottom: 24px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -30px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 108, 47, 0.26), transparent 65%);
  pointer-events: none;
}

.hero__badge,
.overview-card__eyebrow,
.section-heading__eyebrow,
.article-card__label,
.article-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(191, 108, 47, 0.12);
  color: #804617;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1,
.section-heading h1,
.section-heading h2,
.app-section h2,
.overview-card h2,
.prose h1,
.prose h2 {
  margin: 18px 0 16px;
  font-family: var(--heading-font);
  line-height: 1.08;
}

.hero h1,
.section-heading h1,
.prose h1 {
  font-size: clamp(2.5rem, 5vw, 4.6rem);
}

.section-heading h2,
.app-section h2,
.overview-card h2,
.prose h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.hero__lead,
.section-intro,
.overview-card p,
.app-card p,
.article-card p,
.prose p {
  line-height: 1.75;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.button--primary {
  background: var(--brand);
  color: #fff;
}

.button--ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.download-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.download-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid rgba(36, 89, 75, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 89, 75, 0.12), rgba(255, 250, 242, 0.92));
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.download-card:hover,
.download-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(36, 89, 75, 0.12);
}

.download-card__title {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--brand-strong);
}

.download-card__meta {
  color: var(--warm);
  font-size: 0.92rem;
  font-weight: 700;
}

.overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.overview-card,
.app-card,
.article-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
}

.app-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card--highlight {
  background:
    linear-gradient(180deg, rgba(36, 89, 75, 0.14), rgba(255, 250, 242, 0.85)),
    var(--surface-strong);
}

.section-heading {
  margin-bottom: 20px;
}

.article-card a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.store-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--warm);
  font-weight: 700;
  text-decoration: none;
}

.article-stack {
  display: grid;
  gap: 18px;
}

.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.screenshot-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.85);
  box-shadow: var(--shadow);
}

.article-card--wide h2 {
  margin: 12px 0 10px;
  font-family: var(--heading-font);
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
}

.prose {
  max-width: 880px;
}

.prose p {
  margin: 0 0 18px;
}

.prose h2 {
  margin-top: 34px;
}

@media (max-width: 1120px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: none;
  }

  .sidebar.is-open {
    display: block;
  }

  .topbar {
    border-radius: 24px;
  }

  .topbar__menu {
    display: inline-flex;
  }

  .overview,
  .app-grid,
  .article-grid,
  .download-strip,
  .screenshot-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px;
    gap: 14px;
  }

  .topbar,
  .hero,
  .overview,
  .app-section,
  .articles-preview,
  .article-list-page,
  .article-page {
    padding: 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 20px;
  }

  .topbar__nav,
  .overview,
  .app-grid,
  .article-grid,
  .download-strip,
  .screenshot-gallery {
    grid-template-columns: 1fr;
  }

  .topbar__nav {
    width: 100%;
  }

  .topbar__nav a {
    width: 100%;
    text-align: center;
  }
}
