/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #555;
  background: #ffffff;
}

body {
  font-family: 'Inter', sans-serif;
  background: #ffffff;
  color: #111;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: #2563eb; }
a:hover { color: #1d4ed8; }

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  height: 56px;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #111;
}

.header-logo img { height: 32px; display: block; }

.header-logo .site-name {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav { display: flex; gap: 28px; }

.header-nav a {
  font-size: 14px;
  color: #888;
  text-decoration: none;
  transition: color 0.15s;
}

.header-nav a:hover { color: #111; }
.header-nav a.active { color: #111; font-weight: 500; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  display: block;
  transition: all 0.2s ease;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  padding: 20px 24px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left { display: flex; align-items: center; gap: 12px; }
.footer-logo img { height: 24px; display: block; }
.footer-copy { font-size: 13px; color: #888; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { font-size: 13px; color: #888; text-decoration: none; }
.footer-nav a:hover { color: #111; }

/* ============================================
   AUTH CARD
   ============================================ */

.auth-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 24px 96px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #ffffff;
}

.auth-title {
  font-size: 22px;
  font-weight: 600;
  color: #111;
  margin: 0 0 8px;
}

.auth-sub {
  font-size: 14px;
  color: #888;
  margin: 0 0 24px;
  line-height: 1.5;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 13px;
  font-weight: 500;
  color: #111;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #111;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus { border-color: #2563eb; }

.field-error {
  font-size: 13px;
  color: #dc2626;
  margin-top: 2px;
  min-height: 1em;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.checkbox-row input { margin-top: 2px; }

.btn-primary {
  display: inline-block;
  width: 100%;
  background: #2563eb;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }

.btn-secondary {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: #ffffff;
  color: #111;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 12px;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s;
}

.btn-secondary:hover { border-color: #111; }

.auth-links {
  margin-top: 20px;
  font-size: 14px;
  color: #555;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-links a { color: #2563eb; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

.form-banner {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}

.form-banner.visible { display: block; }
.form-banner.error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.form-banner.success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

.turnstile-wrap {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

/* ============================================
   STATIC PAGES
   ============================================ */

.page-content {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.page-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: #111;
  margin: 0 0 24px;
}

.page-content h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #111;
  margin: 32px 0 10px;
}

.page-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: #555;
  margin-bottom: 16px;
}

.page-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.page-content li {
  font-size: 1rem;
  line-height: 1.75;
  color: #555;
}

.last-updated {
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 32px;
}

/* ============================================
   404
   ============================================ */

.notfound-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 64px 24px;
  text-align: center;
}

.notfound-code {
  font-size: 96px;
  font-weight: 700;
  color: #e5e5e5;
  letter-spacing: -4px;
  margin-bottom: 8px;
}

.notfound-title {
  font-size: 28px;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
}

.notfound-desc {
  font-size: 16px;
  color: #555;
  margin: 0 0 24px;
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (max-width: 640px) {
  .hamburger { display: flex; }
  .header-nav { display: none; }
  .header-right { gap: 12px; }

  .site-header.nav-open .header-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 24px;
    gap: 16px;
  }

  .site-header.nav-open .header-nav a { font-size: 15px; color: #111; }

  .site-header.nav-open .hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .site-header.nav-open .hamburger span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-nav { gap: 12px; }

  .auth-wrap { padding: 32px 16px 64px; }
  .auth-card { padding: 24px; }
}
