/* ===========================================
   Design Tokens & Global Styles
   =========================================== */

:root {
  --color-bg: #FAFAF8;
  --color-surface: #F0EEEB;
  --color-text: #1C1917;
  --color-text-secondary: #78716C;
  --color-accent: #3B5998;
  --color-accent-hover: #2D4373;
  --color-border: #E7E5E4;
  --color-white: #FFFFFF;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --max-width: 1120px;
  --nav-height: 72px;
  /* Fixed nav + notch/status safe area (use with viewport-fit=cover) */
  --nav-offset: calc(var(--nav-height) + env(safe-area-inset-top, 0px));

  --transition-fast: 0.15s ease;
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* ===========================================
   Reset
   =========================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ===========================================
   Typography
   =========================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ===========================================
   Layout
   =========================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 max(var(--space-6), env(safe-area-inset-left, 0px))
    0 max(var(--space-6), env(safe-area-inset-right, 0px));
}

/* Wider reading width for photography highlight grid (and similar full-bleed galleries) */
.container--xwide {
  max-width: min(1440px, 100%);
}

.section {
  padding: var(--space-24) 0;
}

.section--surface {
  background-color: var(--color-surface);
}

/* ===========================================
   Utility Classes
   =========================================== */

.text-center { text-align: center; }
.text-secondary { color: var(--color-text-secondary); }
.text-accent { color: var(--color-accent); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

/* ===========================================
   Page Fade-In Animation
   =========================================== */

.page-content {
  animation: fadeInUp 0.5s ease both;
}

/* Homepage: tighter vertical rhythm (nav still primary for site links) */
.page-content--home .section {
  padding: var(--space-16) 0;
}

.page-content--home .home-about-grid {
  gap: var(--space-6);
}

.page-content--home .home-about-card {
  padding: var(--space-6);
}

.page-content--home .section--home-featured-tight {
  padding-bottom: var(--space-10);
}

.page-content--home .section--home-photography-tight {
  padding-top: var(--space-10);
}

@media (max-width: 768px) {
  .page-content--home .section--home-featured-tight {
    padding-bottom: var(--space-8);
  }

  .page-content--home .section--home-photography-tight {
    padding-top: var(--space-8);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================
   Responsive
   =========================================== */

@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-2xl); }
  .section { padding: var(--space-16) 0; }
  .page-content--home .section {
    padding: var(--space-12) 0;
  }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  .container {
    padding-left: max(var(--space-4), env(safe-area-inset-left, 0px));
    padding-right: max(var(--space-4), env(safe-area-inset-right, 0px));
  }
  .section { padding: var(--space-12) 0; }
  .page-content--home .section {
    padding: var(--space-10) 0;
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
}
