:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --text: #16181d;
  --muted: #666d7a;
  --subtle: #8a92a1;
  --line: rgba(24, 28, 36, 0.1);
  --primary: #1877ff;
  --primary-strong: #0b5ed7;
  --green: #28b463;
  --shadow: 0 20px 60px rgba(18, 31, 52, 0.12);
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1117;
    --surface: rgba(25, 29, 38, 0.72);
    --surface-strong: #171b24;
    --text: #f4f7fb;
    --muted: #aab1bf;
    --subtle: #7f8796;
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 10%, rgba(24, 119, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 82% 20%, rgba(40, 180, 99, 0.12), transparent 24rem),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(22px);
}

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

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(17, 35, 67, 0.16);
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 17px;
  line-height: 1.15;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  outline: none;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100dvh - 76px));
  display: grid;
  align-items: end;
  padding: 82px max(24px, calc((100vw - 1180px) / 2)) 44px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 34px max(12px, calc((100vw - 1240px) / 2)) 20px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.34)),
    url("./assets/easymarkd-logo.png") right 8% center / min(36vw, 380px) auto no-repeat;
  box-shadow: var(--shadow);
  opacity: 0.94;
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    background:
      linear-gradient(145deg, rgba(20, 24, 33, 0.92), rgba(20, 24, 33, 0.52)),
      url("./assets/easymarkd-logo.png") right 8% center / min(36vw, 380px) auto no-repeat;
  }
}

.hero-content {
  position: relative;
  max-width: 720px;
  padding: 56px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 16%, transparent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 660px;
  margin-bottom: 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(18px, 2.1vw, 23px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 700;
}

.button.primary {
  border-color: transparent;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(24, 119, 255, 0.24);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.section {
  padding: 74px max(24px, calc((100vw - 1180px) / 2));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.section-heading p {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading span {
  color: var(--muted);
  font-size: 18px;
}

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

.feature {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.feature small {
  color: var(--primary);
  font-weight: 800;
}

.feature h3 {
  margin: 12px 0 8px;
  font-size: 22px;
}

.feature p,
.copy p,
.copy li {
  color: var(--muted);
}

.showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 28px;
  align-items: center;
}

.app-window {
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.traffic {
  display: flex;
  gap: 8px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.traffic span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.traffic span:nth-child(1) { background: #ff5f57; }
.traffic span:nth-child(2) { background: #ffbd2e; }
.traffic span:nth-child(3) { background: #28c840; }

.window-body {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 370px;
}

.sidebar-preview {
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 68%, var(--surface-strong));
}

.nav-line,
.file-line,
.text-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 18%, transparent);
}

.nav-line {
  margin-bottom: 14px;
}

.nav-line.active {
  height: 32px;
  background: color-mix(in srgb, var(--primary) 18%, transparent);
}

.editor-preview {
  padding: 28px;
}

.file-line {
  width: 46%;
  margin-bottom: 24px;
}

.preview-title {
  width: 68%;
  height: 30px;
  margin-bottom: 22px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--text) 18%, transparent);
}

.text-line {
  height: 13px;
  margin: 12px 0;
}

.text-line.short { width: 58%; }
.text-line.medium { width: 78%; }
.text-line.long { width: 94%; }

.code-preview {
  margin-top: 26px;
  border-radius: 16px;
  padding: 18px;
  background: #1f2430;
}

.code-preview span {
  display: block;
  height: 12px;
  margin: 11px 0;
  border-radius: 999px;
  background: #77819a;
}

.code-preview span:nth-child(2) {
  width: 72%;
  background: #7bd88f;
}

.code-preview span:nth-child(3) {
  width: 54%;
  background: #ff9ac1;
}

.copy {
  max-width: 850px;
}

.copy h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.copy h2 {
  margin-top: 42px;
  font-size: 28px;
}

.copy ul {
  padding-left: 22px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.info-list a,
.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.info-list strong {
  color: var(--text);
}

.info-list span {
  color: var(--muted);
  text-align: right;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 34px max(24px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--text);
  font-weight: 700;
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .hero::before {
    inset: 18px 12px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62)),
      url("./assets/easymarkd-logo.png") right 18px top 28px / 160px auto no-repeat;
  }

  .hero-content {
    padding: 34px 0 250px;
  }

  .feature-grid,
  .showcase {
    grid-template-columns: 1fr;
  }

  .window-body {
    grid-template-columns: 1fr;
  }

  .sidebar-preview {
    display: none;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button:hover,
  .button:focus-visible {
    transform: none;
  }
}
