/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --background: oklch(0.97 0.012 85);
  --foreground: oklch(0.14 0.008 80);
  --primary: oklch(0.56 0.13 58);
  --primary-foreground: oklch(0.99 0 0);
  --muted: oklch(0.93 0.01 85);
  --muted-foreground: oklch(0.5 0.02 80);
  --border: oklch(0.87 0.012 85);
  --card: oklch(1 0 0);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.1 0.008 80);
    --foreground: oklch(0.93 0.012 85);
    --primary: oklch(0.73 0.13 65);
    --primary-foreground: oklch(0.1 0.008 80);
    --muted: oklch(0.2 0.008 80);
    --muted-foreground: oklch(0.55 0.02 80);
    --border: oklch(0.22 0.008 80);
    --card: oklch(0.145 0.008 80);
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ── Grain texture overlay ── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── Ambient glow ── */
.ambient-glow {
  position: fixed;
  top: 30%;
  left: 50%;
  width: 700px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, oklch(0.73 0.13 65 / 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.site-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-content {
  position: relative;
  z-index: 10;
  flex: 1;
}

/* ── Header ── */
.site-header {
  position: relative;
  z-index: 10;
  padding: 1.25rem 1.5rem;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-brand img {
  width: 40px;
  height: 40px;
  border-radius: 0.625rem;
}

.header-brand span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-nav a {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

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

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

/* ── Hero ── */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero .subtitle {
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--muted-foreground);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* ── Sections ── */
.section {
  padding: 4rem 0;
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section p {
  color: var(--muted-foreground);
  font-weight: 300;
  max-width: 640px;
  line-height: 1.8;
}

.section p + p {
  margin-top: 1rem;
}

/* ── Card grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem 1.75rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 32px oklch(0 0 0 / 0.08);
}

@media (prefers-color-scheme: dark) {
  .card:hover {
    box-shadow: 0 8px 32px oklch(0 0 0 / 0.35);
  }
}

.card .card-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: oklch(from var(--primary) l c h / 0.08);
  color: var(--primary);
  margin-bottom: 1.25rem;
  font-size: 1.125rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  opacity: 0.4;
  margin: 0;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid oklch(from var(--border) l c h / 0.3);
  padding: 1.25rem 1.5rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .site-footer .container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copy {
  font-size: 0.6875rem;
  color: oklch(from var(--muted-foreground) l c h / 0.5);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-nav a {
  font-size: 0.6875rem;
  color: oklch(from var(--muted-foreground) l c h / 0.5);
  transition: color 0.2s ease;
}

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

/* ── Entrance animations ── */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fade-up 0.5s ease-out both;
}

.fade-in-1 {
  animation: fade-up 0.5s ease-out 0.1s both;
}

.fade-in-2 {
  animation: fade-up 0.5s ease-out 0.2s both;
}

.fade-in-3 {
  animation: fade-up 0.5s ease-out 0.3s both;
}

.fade-in-4 {
  animation: fade-up 0.5s ease-out 0.4s both;
}

/* ── Page-specific: About / Privacy ── */
.page-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.prose {
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.prose p {
  font-weight: 300;
  color: var(--muted-foreground);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.prose ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1rem;
}

.prose ul li {
  position: relative;
  padding-left: 1.25rem;
  font-weight: 300;
  color: var(--muted-foreground);
  line-height: 1.8;
  margin-bottom: 0.25rem;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  opacity: 0.8;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero {
    padding: 4rem 0 3rem;
  }

  .header-nav {
    gap: 1.25rem;
  }

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