:root,
[data-theme="light"] {
  --font-body: Inter, system-ui, sans-serif;
  --font-display: Inter, system-ui, sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.2rem);

  --background: #f8f6f2;
  --foreground: #2a2726;
  --muted: #6b645f;
  --surface: #ffffff;
  --surface-soft: #fbf7f2;
  --surface-2: #f4eee8;
  --line: #efe6dd;
  --border: #e7ded5;
  --primary: #9c5f3a;
  --primary-dark: #7f4b2c;
  --inverse: #fff7f0;
  --success-bg: #eef6ef;
  --success-fg: #305a34;

  --shadow-sm: 0 1px 2px rgba(42, 39, 38, 0.05);
  --shadow-md: 0 10px 30px rgba(42, 39, 38, 0.08);
  --shadow-lg: 0 20px 50px rgba(42, 39, 38, 0.12);

  --content: 1180px;
}

[data-theme="dark"] {
  --background: #1e1a17;
  --foreground: #f2ece7;
  --muted: #c4b8ae;
  --surface: #26211e;
  --surface-soft: #2d2723;
  --surface-2: #352d28;
  --line: #3c332d;
  --border: #4c423b;
  --primary: #d08a5e;
  --primary-dark: #ebb28c;
  --inverse: #1e1a17;
  --success-bg: #283128;
  --success-fg: #d8ecd6;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.42);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 0.375rem;
}

.container {
  width: min(calc(100% - 2rem), var(--content));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  transform: translateY(-140%);
  padding: 0.7rem 0.9rem;
  background: var(--foreground);
  color: var(--background);
  border-radius: 0.5rem;
  font-size: var(--text-sm);
  z-index: 100;
  text-decoration: none;
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0.75rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: var(--space-8) 0;
}

.footer-note {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.footer-note strong {
  color: var(--color-text);
}

.footer-note a {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-note a:hover {
  color: var(--color-primary-hover);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
}

.footer-links a {
  color: var(--color-text-muted);
}

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

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-sm);
  border-top: 1px solid color-mix(in oklab, var(--color-text) 8%, transparent);
  padding-top: var(--space-4);
  margin-top: auto;
}

.footer-legal a {
  color: var(--color-text-faint);
}

.footer-legal a:hover {
  color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  .footer-legal {
    justify-content: center;
  }
}

.content-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1.5px;
  font-weight: 500;
}

.content-link:hover {
  color: var(--primary-dark);
}