/* --------------------------------------------------
   Peak Website - Base & Design System Tokens
   Strict Minimalist Monochrome iOS Aesthetics
   Reference: Hattrick (hattrick-pi.vercel.app)
   -------------------------------------------------- */

:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --foreground: #09090b;
  --foreground-muted: #71717a;
  --foreground-subtle: #a1a1aa;
  
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --card-border-hover: rgba(0, 0, 0, 0.16);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);

  --primary-bg: #09090b;
  --primary-fg: #ffffff;
  --primary-hover: #27272a;

  --secondary-bg: #f4f4f5;
  --secondary-fg: #09090b;
  --secondary-hover: #e4e4e7;

  --badge-bg: rgba(0, 0, 0, 0.04);
  --badge-border: rgba(0, 0, 0, 0.08);
  --accent-dot: #10b981;

  --mountain-color: #09090b;
  --mountain-snow: #ffffff;
  --mountain-ground: rgba(0, 0, 0, 0.03);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px -6px rgba(0, 0, 0, 0.06);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html.dark {
  --bg: #09090b;
  --bg-subtle: #121215;
  --foreground: #f4f4f5;
  --foreground-muted: #a1a1aa;
  --foreground-subtle: #71717a;
  
  --card-bg: #111114;
  --card-border: rgba(255, 255, 255, 0.1);
  --card-border-hover: rgba(255, 255, 255, 0.2);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);

  --primary-bg: #f4f4f5;
  --primary-fg: #09090b;
  --primary-hover: #e4e4e7;

  --secondary-bg: #1c1c20;
  --secondary-fg: #f4f4f5;
  --secondary-hover: #27272a;

  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-border: rgba(255, 255, 255, 0.12);
  --accent-dot: #34d399;

  --mountain-color: #f4f4f5;
  --mountain-snow: #111114;
  --mountain-ground: rgba(255, 255, 255, 0.03);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px -8px rgba(0, 0, 0, 0.4);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--bg);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Container */
.page-container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

@media (min-width: 640px) {
  .page-container {
    padding: 0 1.75rem;
  }
}

/* Header & Navigation */
.header {
  width: 100%;
}

.nav {
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--foreground);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

/* Theme Toggle Button */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-button:hover {
  background: var(--secondary-bg);
  border-color: var(--border-strong);
}

.icon-button:active {
  transform: scale(0.96);
}

html.light .sun-icon { display: none; }
html.light .moon-icon { display: block; }
html.dark .sun-icon { display: block; }
html.dark .moon-icon { display: none; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.84375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--foreground-muted);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--foreground);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-size: 0.84375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.5625rem 1.125rem;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: 1px solid transparent;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background-color: var(--primary-bg);
  color: var(--primary-fg);
}

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

.button-secondary {
  background-color: var(--secondary-bg);
  color: var(--secondary-fg);
  border-color: var(--border);
}

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

/* Hero Content */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 0 3.5rem;
  gap: 2.75rem;
}

@media (min-width: 640px) {
  .hero-section {
    padding: 4.5rem 0 4rem;
    gap: 3.25rem;
  }
}

.hero-content {
  max-width: 38rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.28125rem 0.75rem;
  background-color: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--foreground-muted);
  letter-spacing: 0.01em;
}

.badge-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 9999px;
  background-color: var(--accent-dot);
  box-shadow: 0 0 8px var(--accent-dot);
}

.hero-title {
  font-size: 2.25rem;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--foreground);
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 3.25rem;
  }
}

.hero-subtitle {
  font-size: 0.96875rem;
  line-height: 1.5;
  color: var(--foreground-muted);
  max-width: 28rem;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------------- Legal / Article Layout ---------------- */
.legal-container {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 0 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.legal-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.75rem;
}

.legal-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--foreground);
}

.legal-meta {
  font-size: 0.8125rem;
  color: var(--foreground-subtle);
  font-family: var(--font-mono);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--foreground-muted);
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-heading {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

.legal-content p {
  color: var(--foreground-muted);
}

.legal-content ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-content strong {
  color: var(--foreground);
  font-weight: 500;
}

.legal-content a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
}
