:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #edf1f4;
  --ink: #111418;
  --muted: #65717d;
  --line: #d8dee4;
  --accent: #0071e3;
  --accent-strong: #0058b7;
  --coffee: #8b5e3c;
  --success: #128c7e;
  --shadow: 0 18px 50px rgba(17, 20, 24, 0.12);
}

body.dark {
  color-scheme: dark;
  --bg: #0e1013;
  --surface: #181c20;
  --surface-soft: #222930;
  --ink: #f5f7fa;
  --muted: #aab4bf;
  --line: #303942;
  --accent: #54a8ff;
  --accent-strong: #8cc4ff;
  --coffee: #c89b70;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 215px;
}

.social-icon {
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-weight: 900;
}

.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand-title,
.author-name,
.name-mark,
.footer-name,
.inline-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.inline-apple {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  object-fit: contain;
}

.brand small,
.post-meta,
.form-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-menu {
  position: relative;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.hamburger-button {
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
}

.hamburger-button span {
  display: block;
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.hamburger-button:hover {
  background: var(--surface-soft);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.menu-panel[hidden] {
  display: none;
}

.menu-panel a {
  padding: 13px 14px;
  color: var(--muted);
  font-weight: 900;
}

.menu-panel a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.install-button {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.install-button:hover {
  background: var(--accent-strong);
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 38px 0 26px;
}

.hero h1 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(2.7rem, 6.4vw, 5.8rem);
  line-height: 0.96;
}

.hero p {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.12rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coffee);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-action,
.secondary-action {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.primary-action {
  background: var(--accent);
  color: #fff;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
}

.secondary-action {
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-media {
  position: relative;
  margin: 0;
  min-height: 540px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 540px;
  display: block;
  object-fit: cover;
}

.hero-media figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #111418;
}

.hero-media span {
  display: block;
  color: #8b5e3c;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 315px;
  gap: 34px;
  padding: 30px 0 42px;
}

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

.section-heading h2,
.side-panel h2,
.channels h2 {
  margin: 0;
  font-size: 1.45rem;
}

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

.blog-redirect {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.post-card {
  display: grid;
  min-height: 392px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.post-card img {
  width: 100%;
  height: 184px;
  display: block;
  object-fit: cover;
}

.post-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
}

.post-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.post-card p,
.side-panel p,
.channel-card p,
.reader p {
  color: var(--muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 18px;
}

.side-panel section,
.reader,
.channels {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
}

.author-name {
  margin-bottom: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
  margin: 0;
}

.stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.stats dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.stats dd {
  margin: 2px 0 0;
  font-size: 1.35rem;
  font-weight: 900;
}

.reader {
  margin: 0 0 42px;
}

.reader article {
  max-width: 780px;
  margin: 0 auto;
}

.reader h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.reader img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 8px;
}

.reader-action {
  margin-top: 8px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
}

.channels {
  margin: 0 0 42px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.channel-card {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.social-icon {
  width: 42px;
  height: 42px;
  background: var(--ink);
  color: var(--surface);
}

.page-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.social-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.whatsapp-icon {
  background: #128c7e;
  color: #fff;
}

.telegram-icon {
  background: #2aabee;
  color: #fff;
}

.threads-icon {
  background: #111418;
  color: #fff;
}

.email-icon {
  background: var(--accent);
  color: #fff;
}

.channel-card:hover {
  border-color: var(--accent);
}

.empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.empty {
  border-style: dashed;
  color: var(--muted);
  text-align: center;
}

.footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-image {
  width: 96px;
  height: auto;
  display: block;
}

.footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .topbar,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: space-between;
    width: 100%;
  }

  .blog-menu {
    width: 100%;
  }

  .hamburger-button {
    margin-left: auto;
  }

  .install-button {
    width: 100%;
  }

  .menu-panel {
    right: auto;
    left: 0;
    width: 100%;
  }

  .hero,
  .content-layout,
  .channel-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media,
  .hero-media img {
    min-height: 360px;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  main,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
