:root {
  --background: #F9FAFB;
  --surface: #FFFFFF;
  --foreground: #111827;
  --muted: #F3F4F6;
  --muted-foreground: #6B7280;
  --border: #E5E7EB;
  --border-hover: #D1D5DB;
  --max-width: 640px;
  --transition-fast: 150ms ease-out;
  --transition-base: 200ms ease-out;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(17, 24, 39, 0.1);
}

body {
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--foreground);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: opacity var(--transition-fast);
}

.logo:hover {
  opacity: 0.7;
}

nav {
  display: flex;
  gap: 1.75rem;
}

nav a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 450;
  transition: color var(--transition-fast);
}

nav a:hover,
nav a.active {
  color: var(--foreground);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: opacity var(--transition-fast);
}

.menu-toggle:hover {
  opacity: 0.7;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--foreground);
  margin: 3.5px 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* Main */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.page-header .subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

section {
  margin-bottom: 2.5rem;
}

section:last-child {
  margin-bottom: 0;
}

h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.875rem;
}

h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}

p {
  margin-bottom: 0.75rem;
  color: var(--foreground);
}

ul, ol {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.25rem;
}

a {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--transition-fast);
}

a:hover {
  text-decoration-color: var(--muted-foreground);
}

strong {
  font-weight: 600;
}

code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 0.8125rem;
  background: var(--muted);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

/* Go to links (external) */
.goto-links {
  display: flex;
  gap: 0.5rem;
}

.goto-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--foreground);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.goto-link:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.goto-link:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.goto-link span {
  color: var(--muted-foreground);
  font-weight: 400;
  transition: transform var(--transition-fast);
}

.goto-link:hover span {
  transform: translateX(2px);
}

/* Navigation links (internal) */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-links a {
  display: block;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 500;
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.nav-links a:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.nav-links a:active {
  transform: translateY(0);
}

.nav-links .label {
  display: block;
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  font-weight: 400;
  margin-top: 0.125rem;
}

/* Contact form */
.contact-form {
  margin-top: 1.25rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--foreground);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-hover);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.04);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--surface);
  background: var(--foreground);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast);
}

.form-submit:hover {
  background: #374151;
}

.form-submit:active {
  transform: scale(0.98);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--muted);
}

.faq-question::after {
  content: '+';
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted-foreground);
  transition: transform var(--transition-base);
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0 1rem 0.875rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-answer p:last-child,
.faq-answer ul:last-child,
.faq-answer ol:last-child {
  margin-bottom: 0;
}

/* Info box */
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.info-box h3 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.info-box p {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* Terms */
.terms-content {
  font-size: 0.875rem;
}

.terms-content > p:first-child {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.terms-content h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  text-transform: none;
  letter-spacing: -0.01em;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.terms-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.terms-content h3 {
  font-size: 0.875rem;
  margin-top: 1.25rem;
  margin-bottom: 0.375rem;
}

/* Privacy highlights */
.highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.highlight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-base);
}

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

.highlight-card h3 {
  font-size: 0.8125rem;
  margin-bottom: 0.125rem;
}

.highlight-card p {
  color: var(--muted-foreground);
  font-size: 0.8125rem;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Footer */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.footer-goto {
  display: flex;
  gap: 1.5rem;
}

.footer-goto a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 450;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition-fast);
}

.footer-goto a:hover {
  color: var(--foreground);
}

.footer-goto a span {
  font-size: 0.625rem;
  transition: transform var(--transition-fast);
}

.footer-goto a:hover span {
  transform: translateX(1px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--foreground);
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--foreground);
}

/* Responsive */
@media (max-width: 640px) {
  main {
    padding: 2rem 1rem;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 0.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  nav a {
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
  }

  nav a:hover {
    background: var(--muted);
  }

  nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .goto-links {
    flex-direction: column;
  }

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

  .footer-top {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer-goto {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

@media print {
  header, footer, .menu-toggle {
    display: none;
  }

  main {
    max-width: 100%;
    padding: 0;
  }

  .faq-answer {
    display: block;
  }
}
