/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --surface: #ffffff;
  --text: #1a1f2b;
  --muted: #5b6474;
  --border: #e2e6ec;
  --primary: #0b6e4f;
  --primary-hover: #095a41;
  --primary-contrast: #ffffff;
  --accent: #f2b134;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(20, 30, 50, 0.08);
  --container: 1100px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --bg-alt: #161b24;
    --surface: #1b212c;
    --text: #e8ecf2;
    --muted: #9aa5b5;
    --border: #2a3240;
    --primary: #2fbf8a;
    --primary-hover: #27a877;
    --primary-contrast: #0b1a14;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); }
.center { text-align: center; }

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
.container.narrow { max-width: 720px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 0.5rem 1rem;
}
.skip-link:focus { left: 0; z-index: 100; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-nav a {
  color: var(--muted);
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  text-decoration: none;
  border-bottom-color: var(--primary);
}

.logout-form { margin: 0; }
.logout-btn {
  font: inherit;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.2rem 0.75rem;
  cursor: pointer;
}
.logout-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }
  .site-nav a.active { border-left: 3px solid var(--primary); }
  .logout-form { padding: 0.9rem 1.25rem; }
}

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); }

.hero {
  padding: 6rem 0 5rem;
  background:
    radial-gradient(60% 80% at 85% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(50% 70% at 10% 90%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
    var(--bg-alt);
}
.hero h1 { max-width: 720px; }
.hero .lead { max-width: 600px; }

.page-title {
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.page-title .lead { margin-bottom: 0; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- Grid & cards ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }
.price {
  font-weight: 600;
  color: var(--primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface); }

/* ---------- Forms ---------- */
.form label {
  display: block;
  font-weight: 500;
  margin-bottom: 1rem;
}
.form input,
.form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.form .hp {
  position: absolute;
  left: -9999px;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success {
  background: color-mix(in srgb, var(--primary) 15%, var(--surface));
  border: 1px solid var(--primary);
}
.alert-error {
  background: color-mix(in srgb, #d64545 12%, var(--surface));
  border: 1px solid #d64545;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 3rem 0 1.5rem;
  font-size: 0.95rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.footer-inner p { margin: 0 0 0.4em; }
.copyright {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}
