/* ═══════════════════════════════════════════════════════════════
   THOMAS MULLANEY — DESIGN SYSTEM
   Literary, Understated, Warm Intellectual
   ═══════════════════════════════════════════════════════════════ */

/* ═══ DESIGN TOKENS ═══ */
:root {
  /* PRIMARY NEUTRALS */
  --ink: hsl(30, 10%, 12%);           /* #211e1b - Primary text */
  --charcoal: hsl(30, 8%, 25%);       /* #423d38 - Secondary text */
  --stone: hsl(30, 10%, 55%);         /* #948a7d - Tertiary/muted text */
  --parchment: hsl(38, 25%, 92%);     /* #f2ede4 - Light background */
  --cream: hsl(42, 35%, 96%);         /* #faf8f3 - Off-white background */
  --white: hsl(40, 30%, 99%);         /* #fefdfb - Pure light surfaces */

  /* ACCENT COLOR - Deep Teal */
  --accent: hsl(192, 55%, 28%);       /* #20606e - Primary accent */
  --accent-hover: hsl(192, 55%, 22%); /* #194b56 - Hover state */
  --accent-light: hsl(192, 40%, 90%); /* #d9eef3 - Light tint */

  /* TYPOGRAPHY */
  --font-serif: "Source Serif 4", "Source Serif Pro", Charter, Georgia, serif;
  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Roboto Condensed", sans-serif;

  /* TYPE SCALE */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1.125rem;   /* 18px - generous body size */
  --text-lg: 1.25rem;      /* 20px */
  --text-xl: 1.5rem;       /* 24px */
  --text-2xl: 1.875rem;    /* 30px */
  --text-3xl: 2.25rem;     /* 36px */
  --text-4xl: 3rem;        /* 48px */
  --text-5xl: 3.75rem;     /* 60px */
  --text-6xl: 4.5rem;      /* 72px */

  /* SPACING */
  --space-xs: 0.5rem;      /* 8px */
  --space-sm: 0.75rem;     /* 12px */
  --space-base: 1rem;      /* 16px */
  --space-md: 1.5rem;      /* 24px */
  --space-lg: 2rem;        /* 32px */
  --space-xl: 3rem;        /* 48px */
  --space-2xl: 4rem;       /* 64px */
  --space-3xl: 6rem;       /* 96px */
  --space-4xl: 8rem;       /* 128px */

  /* LAYOUT */
  --max-width-text: 680px;
  --max-width-content: 1200px;
  --max-width-wide: 1440px;

  /* BORDERS */
  --border-radius: 0.25rem;
  --border-radius-lg: 0.5rem;

  /* SHADOWS */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* ═══ RESET & BASE STYLES ═══ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cream);
}

/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--ink);
}

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

p {
  margin-bottom: var(--space-base);
  max-width: var(--max-width-text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ═══ NAVIGATION ═══ */
.nav {
  position: sticky;
  top: 0;
  background-color: var(--white);
  border-bottom: 1px solid var(--parchment);
  padding: var(--space-base) var(--space-lg);
  z-index: 100;
}

.nav-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.5px;
  z-index: 1;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.nav-links a {
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ── Hamburger Toggle ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 102;
  width: 32px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.nav-toggle__bar:nth-child(1) { top: 2px; }
.nav-toggle__bar:nth-child(2) { top: 11px; }
.nav-toggle__bar:nth-child(3) { top: 20px; }

/* Hamburger → X when open */
.nav--open .nav-toggle__bar:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}
.nav--open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav--open .nav-toggle__bar:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

/* ── Overlay Backdrop ── */
.nav-overlay {
  display: none;
}

/* ── Mobile Styles ── */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    flex-direction: column;
    gap: 0;
    background-color: var(--white);
    padding: calc(var(--space-3xl) + var(--space-lg)) var(--space-xl) var(--space-xl);
    box-shadow: -8px 0 24px rgba(0,0,0,0.08);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 101;
    overflow-y: auto;
  }

  .nav-links li {
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links a {
    display: block;
    padding: var(--space-base) 0;
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--parchment);
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background-color: rgba(33, 30, 27, 0.4);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  /* Open state */
  .nav--open .nav-links {
    transform: translateX(0);
  }

  .nav--open .nav-links li {
    opacity: 1;
    transform: translateX(0);
  }

  /* Staggered entrance for each link */
  .nav--open .nav-links li:nth-child(1) { transition-delay: 0.08s; }
  .nav--open .nav-links li:nth-child(2) { transition-delay: 0.12s; }
  .nav--open .nav-links li:nth-child(3) { transition-delay: 0.16s; }
  .nav--open .nav-links li:nth-child(4) { transition-delay: 0.20s; }
  .nav--open .nav-links li:nth-child(5) { transition-delay: 0.24s; }

  .nav--open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--white);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background-color: var(--accent-light);
}

/* ═══ CARDS ═══ */
.card {
  background-color: var(--white);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ═══ SECTIONS ═══ */
.section {
  padding: var(--space-3xl) var(--space-lg);
}

.section-container {
  max-width: var(--max-width-content);
  margin: 0 auto;
}

/* ═══ GRID ═══ */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ═══ FOOTER ═══ */
.footer {
  background-color: var(--ink);
  color: var(--parchment);
  padding: var(--space-2xl) var(--space-lg);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.footer a {
  color: var(--parchment);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-column h4,
.footer-column h5 {
  color: var(--white);
  margin-bottom: var(--space-base);
}

.footer-column h5 {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: var(--space-xs);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-links {
  display: flex;
  gap: var(--space-lg);
}

/* ═══ FORMS ═══ */
input,
textarea {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  padding: var(--space-sm) var(--space-base);
  border: 1px solid var(--stone);
  border-radius: var(--border-radius);
  background-color: var(--white);
  color: var(--ink);
  width: 100%;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ═══ BLOCKQUOTES (PRAISE) ═══ */
blockquote {
  background-color: var(--parchment);
  border-left: 4px solid var(--accent);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: var(--space-base);
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--charcoal);
}

/* ═══ UTILITY CLASSES ═══ */
.text-center { text-align: center; }
.text-muted { color: var(--stone); }
.text-accent { color: var(--accent); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-base { margin-bottom: var(--space-base); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* ═══ MATERIAL ICONS ═══ */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
