:root {
  --background: #f7f7f5;
  --surface: #ffffff;
  --border: #e6e6e6;
  --border-strong: #d6d6d2;
  --text-primary: #111111;
  --text-secondary: #666666;
  --accent: #d97706;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text-primary);
  font-family: Inter, "PingFang SC", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

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

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

.home-page {
  font-size: 16px;
}

.site-shell {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(247, 247, 245, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
  transition: opacity 160ms ease;
}

.brand:hover {
  opacity: 0.64;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--text-secondary);
  font-size: 14px;
}

.nav-links a {
  position: relative;
  padding: 6px 0;
  transition:
    color 160ms ease,
    opacity 160ms ease;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: translateY(2px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  opacity: 0.28;
  transform: translateY(0);
}

.home-page main {
  padding: 56px 0 0;
}

.hero {
  display: grid;
  gap: 30px;
  padding: 72px 0 104px;
}

.eyebrow {
  color: var(--accent);
  font-size: clamp(17px, 2.5vw, 20px);
  font-weight: 700;
  line-height: 1.35;
  opacity: 0.92;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(44px, 14vw, 72px);
  font-weight: 780;
  line-height: 1.04;
}

.hero-subtitle {
  max-width: 780px;
  font-size: clamp(17px, 2.5vw, 20px);
  font-weight: 720;
  line-height: 1.12;
}

.hero-description {
  max-width: 540px;
  color: var(--text-secondary);
  font-size: clamp(17px, 2.5vw, 20px);
  line-height: 1.75;
}

.section {
  padding: 92px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 36px;
}

h2 {
  max-width: 620px;
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 740;
  line-height: 1.12;
}

.section-heading p {
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  gap: 16px;
}

.feature-card {
  min-height: 216px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition:
    border-color 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-card h3 {
  font-size: 23px;
  font-weight: 740;
  line-height: 1.18;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.72;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  color: var(--text-secondary);
  font-size: 13px;
  opacity: 0.78;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-inner a {
  color: var(--text-primary);
  opacity: 0.72;
  transition:
    color 160ms ease,
    opacity 160ms ease;
}

.footer-inner a:hover {
  color: var(--accent);
  opacity: 1;
}

.error-page {
  display: grid;
  place-items: center;
}

.error-page main {
  width: min(100% - 40px, 720px);
  padding: 96px 0;
  text-align: center;
}

.error-page h1 {
  font-size: clamp(84px, 24vw, 168px);
  font-weight: 780;
  line-height: 1;
}

.error-page p {
  margin-top: 26px;
  color: var(--text-secondary);
  font-size: clamp(18px, 4vw, 23px);
  line-height: 1.65;
}

.home-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.home-link:hover {
  border-color: var(--border-strong);
  color: var(--accent);
  transform: scale(1.02);
}

@media (min-width: 720px) {
  .site-shell {
    width: min(100% - 80px, var(--max-width));
  }

  .home-page main {
    padding-top: 64px;
  }

  .hero {
    min-height: calc(100vh - 140px);
    align-content: center;
    padding: 108px 0 148px;
  }

  .section-heading {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.58fr);
    align-items: end;
    margin-bottom: 44px;
  }

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

  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 420px) {
  .nav {
    min-height: 66px;
    gap: 16px;
  }

  .nav-links {
    gap: 12px;
    font-size: 13px;
  }

  .hero {
    justify-items: center;
    padding: 52px 0 84px;
    text-align: center;
  }

  .section {
    padding: 72px 0;
  }

  .section-heading {
    margin-bottom: 26px;
    text-align: center;
  }

  .feature-card {
    min-height: 176px;
    padding: 24px;
  }

  .error-page main {
    padding: 72px 0;
  }
}
