:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f6f8;
  --color-text: #1c1f26;
  --color-muted: #5b6270;
  --color-border: #e2e5ea;
  --color-accent: #c0392b;
  --color-accent-hover: #a23023;
  --radius: 8px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #14161b;
    --color-bg-alt: #1c1f26;
    --color-text: #eceef2;
    --color-muted: #a0a7b4;
    --color-border: #2c303a;
    --color-accent: #e05a4b;
    --color-accent-hover: #ea7568;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

p {
  margin: 0 0 1em;
  color: var(--color-muted);
}

a {
  color: var(--color-accent);
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 640px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 500;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
}

/* Sections */
.hero {
  padding: 96px 0;
  text-align: center;
}

.hero p {
  max-width: 560px;
  margin: 0 auto 2em;
  font-size: 1.125rem;
}

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.card {
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.card p {
  margin: 0;
}

/* Buttons and forms */
.button {
  display: inline-block;
  padding: 12px 24px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: 0;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.contact-form label {
  font-weight: 500;
  margin-top: 8px;
}

.contact-form input,
.contact-form textarea {
  padding: 10px 12px;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.contact-form .button {
  align-self: flex-start;
  margin-top: 12px;
}

.form-status {
  min-height: 1.6em;
  margin: 8px 0 0;
}

/* Footer */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

/* Mobile */
@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
  }

  .hero {
    padding: 64px 0;
  }

  .section {
    padding: 48px 0;
  }
}
