/* ============================================
   Flowstance — CSS
   Balance. Adaptability. Deliberate Control.
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Palette */
  --color-bg: #f8f6f3;
  --color-bg-alt: #f0ede8;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6560;
  --color-accent: #7a8c6e;
  --color-accent-light: #a3b496;
  --color-border: #ddd8d0;
  --color-nav-bg: rgba(248, 246, 243, 0.92);

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", Times, serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  /* Layout */
  --max-width: 42rem;
  --nav-height: 3.5rem;
}

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

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

/* --- Base --- */
body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded {
  opacity: 1;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-md);
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-xs) 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

nav a:hover {
  color: var(--color-text);
}

nav a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* --- Main Content --- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-md) var(--space-xl);
}

/* --- Hero Section --- */
.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  font-weight: 300;
  line-height: 1.6;
  max-width: 28rem;
  margin: 0 auto var(--space-lg);
}

.hero .cta {
  display: inline-block;
  text-decoration: none;
  color: var(--color-accent);
  font-size: 0.9375rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--color-accent-light);
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.hero .cta:hover {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* --- Page Header --- */
.page-header {
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.page-header .subtitle {
  margin-top: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

/* --- Sections --- */
section {
  padding: var(--space-lg) 0;
}

section + section {
  border-top: 1px solid var(--color-border);
}

section h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}

section h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

section p {
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

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

/* --- Pillar Cards --- */
.pillar {
  padding: var(--space-lg) 0;
}

.pillar-number {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.pillar h2 {
  margin-bottom: var(--space-sm);
}

.pillar p {
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* --- Principle List --- */
.principle {
  padding: var(--space-lg) 0;
}

.principle-marker {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.principle h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.principle p {
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* --- Blockquote --- */
blockquote {
  border-left: 2px solid var(--color-accent-light);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-style: italic;
}

/* --- Intro Block --- */
.intro {
  padding: var(--space-lg) 0 var(--space-md);
  font-size: 1.1875rem;
  line-height: 1.8;
  color: var(--color-text-muted);
}

/* --- Divider --- */
.divider {
  width: 2rem;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-lg) 0;
}

/* --- Footer --- */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }

  body {
    font-size: 1rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

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

  nav ul {
    gap: var(--space-sm);
  }

  nav a {
    font-size: 0.75rem;
  }

  blockquote {
    font-size: 1.0625rem;
  }

  main {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
}
