/* ============================================================
   SCOTT RAMSEY — scottramsey.com
   Design System & Styles
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Brand Colors */
  --blue: #1e6a9e;
  --blue-dark: #1c6697;
  --blue-deeper: #144e75;
  --blue-darkest: #0d3a58;
  --peach: #fea771;
  --peach-light: #ffbd8e;
  --peach-dim: rgba(254, 167, 113, 0.15);

  /* Neutral Palette */
  --cream: #f7f1e8;
  --cream-dark: #ede4d3;
  --sand: #c8b99a;
  --text: #1a1514;
  --text-medium: #3e3a37;
  --text-muted: #6b6461;
  --white: #ffffff;

  /* Typography */
  --font-display: 'Fjalla One', 'Arial Narrow', sans-serif;
  --font-condensed: 'Barlow Condensed', sans-serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Spacing Scale */
  --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;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 760px;
  --nav-height: 72px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 0.18s var(--ease);
  --t: 0.32s var(--ease);
  --t-slow: 0.6s var(--ease-out);

  /* Border */
  --border-cream: 1px solid var(--cream-dark);
  --border-blue: 1px solid rgba(255, 255, 255, 0.12);
  --border-peach: 1px solid rgba(254, 167, 113, 0.3);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

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

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.display-xl {
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.display-lg {
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.0;
}

.display-md {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.display-sm {
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
}

.label {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.body-lg {
  font-size: 1.1875rem;
  line-height: 1.75;
}

.body-sm {
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section {
  padding-block: clamp(4rem, 8vw, 8rem);
}

.section-sm {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

/* Blue section variant */
.section-blue {
  background-color: var(--blue);
  background-image: url('../assets/topo-texture.svg');
  background-repeat: repeat;
  color: var(--white);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background var(--t), box-shadow var(--t), border-bottom var(--t);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--white);
  transition: color var(--t-fast);
}

.nav.nav-scrolled .nav-logo-text {
  color: var(--blue);
}

/* Nav scrolled state */
.nav.nav-scrolled {
  background-color: rgba(247, 241, 232, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-cream);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

/* Nav over dark hero - transparent with white text */
.nav:not(.nav-scrolled) {
  background-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.nav-links a {
  font-family: var(--font-condensed);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  transition: color var(--t-fast);
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--peach);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

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

/* Scrolled nav — dark links */
.nav.nav-scrolled .nav-links a {
  color: var(--text-medium);
}

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

.nav.nav-scrolled .nav-links a::after {
  background: var(--blue);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

.nav.nav-scrolled .nav-hamburger span {
  background: var(--text);
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  background-color: var(--blue);
  background-image: url('../assets/topo-texture.svg');
  background-repeat: repeat;
  position: relative;
  overflow: hidden;
}

.hero::before {
  /* Vignette to deepen the corners */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(12, 36, 56, 0.35) 100%);
  pointer-events: none;
}

.hero-body {
  display: grid;
  align-items: end;
  padding-top: calc(var(--nav-height) + clamp(3rem, 8vw, 7rem));
  padding-bottom: clamp(3rem, 6vw, 6rem);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.025em;
  color: var(--peach);
  position: relative;
}

.hero-name::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--peach);
  margin-top: var(--space-6);
  opacity: 0.5;
}

.hero-content {
  padding-bottom: 0.5em;
  /* Aligns with baseline of hero-name */
}

.hero-tagline {
  font-family: var(--font-condensed);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--space-5);
  letter-spacing: 0.01em;
}

.hero-description {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: var(--space-8);
  max-width: 42ch;
}

/* Scroll indicator */
.hero-scroll {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-scroll-line {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}

.hero-scroll-text {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* ============================================================
   BUTTONS & CTAs
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-condensed);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75em 1.5em;
  min-height: 44px;
  border-radius: 2px;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--peach);
  color: var(--blue-darkest);
}

.btn-primary:hover {
  background: var(--peach-light);
  box-shadow: 0 4px 20px rgba(254, 167, 113, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.75);
}

.btn-outline-dark {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-outline-dark:hover {
  background: var(--blue);
  color: var(--white);
}

.btn--muted {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.btn-ghost-peach {
  background: transparent;
  color: var(--peach);
  border: 1.5px solid rgba(254, 167, 113, 0.4);
}

.btn-ghost-peach:hover {
  background: rgba(254, 167, 113, 0.1);
  border-color: var(--peach);
}

.btn-lg {
  font-size: 1rem;
  padding: 0.875em 2em;
}

/* ============================================================
   SUBSTACK FEATURE SECTION
   ============================================================ */
.substack-feature {
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

.substack-feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--blue);
}

.substack-card {
  background: var(--blue);
  background-image: url('../assets/topo-texture.svg');
  background-repeat: repeat;
  border-radius: 4px;
  padding: clamp(2.5rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  position: relative;
  overflow: hidden;
}

.substack-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(254, 167, 113, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.substack-label {
  color: var(--peach);
  margin-bottom: var(--space-4);
}

.substack-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.75rem);
  line-height: 0.95;
  color: var(--white);
  margin-bottom: var(--space-5);
}

.substack-description {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
  margin-bottom: var(--space-8);
  font-size: 1.0625rem;
}

.substack-cta-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: center;
}

.substack-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.substack-issue-preview {
  border-left: 2px solid var(--peach);
  padding-left: var(--space-5);
}

.substack-issue-label {
  color: var(--peach);
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.substack-issue-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: var(--space-3);
}

.substack-issue-excerpt {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.substack-topics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.substack-topic-tag {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.3em 0.75em;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
}

/* ============================================================
   WORK PREVIEW GRID (HOME)
   ============================================================ */
.work-preview {
  background: var(--cream-dark);
  position: relative;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: var(--space-5);
  border-bottom: var(--border-cream);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text);
}

.section-link {
  font-family: var(--font-condensed);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: gap var(--t-fast), color var(--t-fast);
}

.section-link:hover {
  gap: var(--space-3);
  color: var(--blue-deeper);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.preview-card {
  background: var(--cream);
  border: var(--border-cream);
  border-radius: 3px;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
  overflow: hidden;
}

.preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}

.preview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
  border-color: var(--sand);
}

.preview-card:hover::before {
  transform: scaleX(1);
}

.preview-card-icon {
  font-family: var(--font-condensed);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.7;
}

.preview-card-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--text);
  line-height: 1.15;
}

.preview-card-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.preview-card-arrow {
  font-family: var(--font-condensed);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-transform: uppercase;
  margin-top: var(--space-2);
  transition: gap var(--t-fast);
}

.preview-card:hover .preview-card-arrow {
  gap: var(--space-3);
}

/* ============================================================
   ABOUT TEASER (HOME)
   ============================================================ */
.about-teaser {
  background: var(--cream);
}

.about-teaser-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.about-photo {
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 3px;
}

.about-teaser-eyebrow {
  color: var(--blue);
  margin-bottom: var(--space-4);
}

.about-teaser-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--text);
  line-height: 1.05;
  margin-bottom: var(--space-6);
}

.about-teaser-body {
  color: var(--text-medium);
  line-height: 1.8;
  font-size: 1.0625rem;
  margin-bottom: var(--space-4);
}

/* ============================================================
   PAGE HERO (Interior Pages)
   ============================================================ */
.page-hero {
  background-color: var(--blue);
  background-image: url('../assets/topo-texture.svg');
  background-repeat: repeat;
  padding-top: calc(var(--nav-height) + clamp(3rem, 6vw, 5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, transparent 60%, rgba(12, 36, 56, 0.3) 100%);
  pointer-events: none;
}

.page-hero-eyebrow {
  color: var(--peach);
  margin-bottom: var(--space-4);
  position: relative;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 6rem);
  line-height: 0.95;
  color: var(--white);
  margin-bottom: var(--space-6);
  position: relative;
}

.page-hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  max-width: 52ch;
  position: relative;
}

/* ============================================================
   RESPONSIVE TWO-COLUMN GRID UTILITY
   ============================================================ */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.two-col-grid--start {
  align-items: start;
}

@media (max-width: 900px) {
  .two-col-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SECTION DIVIDER
   ============================================================ */
.section-rule {
  display: block;
  border: none;
  height: 1px;
  background: var(--cream-dark);
  margin: 0;
}

.section-rule-peach {
  height: 3px;
  background: linear-gradient(to right, var(--peach) 0%, transparent 100%);
  width: 80px;
  margin-bottom: var(--space-8);
}

/* ============================================================
   FILM PAGE
   ============================================================ */
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.film-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: var(--border-cream);
  border-radius: 3px;
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}

.film-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.film-card-poster {
  aspect-ratio: 16/9;
  background: var(--blue-deeper);
  position: relative;
  overflow: hidden;
}

.film-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-card-body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.film-card-year {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--space-2);
}

.film-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.film-card-description {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: var(--space-5);
}

.film-card-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.film-card-link {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  transition: color var(--t-fast);
  text-decoration: none;
}

.film-card-link:hover {
  color: var(--blue-dark);
}

.film-card-link--muted {
  color: var(--text-muted);
  cursor: default;
}

/* ============================================================
   WRITING PAGE
   ============================================================ */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-16);
}

.book-card {
  display: flex;
  gap: var(--space-6);
  align-items: start;
}


.book-info {
  flex: 1;
}

.book-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: var(--space-2);
}

.book-meta {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.book-description {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-medium);
  margin-bottom: var(--space-5);
}

/* ============================================================
   WORK / GROUNDWORK PAGE
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-12);
}

.service-card {
  padding: var(--space-8);
  border: var(--border-cream);
  border-radius: 3px;
  background: var(--cream);
  position: relative;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--space-8);
  right: var(--space-8);
  height: 2px;
  background: var(--blue);
  opacity: 0.5;
}

.service-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--cream-dark);
  line-height: 1;
  margin-bottom: var(--space-4);
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.service-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.groundwork-cta-block {
  background: var(--blue);
  background-image: url('../assets/topo-texture.svg');
  background-repeat: repeat;
  padding: clamp(2.5rem, 5vw, 4rem);
  border-radius: 3px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: center;
}

.groundwork-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--white);
  margin-bottom: var(--space-3);
}

.groundwork-cta-text {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.about-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--text);
  margin-top: var(--space-10);
  margin-bottom: var(--space-5);
}

.about-body h2:first-child {
  margin-top: 0;
}

.about-body p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-medium);
  margin-bottom: var(--space-5);
  max-width: 65ch;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-sidebar-photo {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

.about-sidebar-headshot {
  width: 100%;
  height: auto;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: var(--space-6);
}

.about-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.about-sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-condensed);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border: var(--border-cream);
  border-radius: 2px;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.about-sidebar-link:hover {
  background: var(--cream-dark);
  border-color: var(--sand);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}

.contact-info-block {
  margin-bottom: var(--space-8);
}

.contact-info-label {
  color: var(--blue);
  margin-bottom: var(--space-2);
}

.contact-info-value {
  font-family: var(--font-condensed);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: color var(--t-fast);
}

.contact-info-value:hover {
  color: var(--blue);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-condensed);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-medium);
  text-decoration: none;
  padding: var(--space-4) var(--space-5);
  border: var(--border-cream);
  border-radius: 2px;
  background: var(--cream);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.social-link:hover {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.social-link-platform {
  color: var(--blue);
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--t-fast);
}

.social-link:hover .social-link-platform {
  color: var(--peach);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-family: var(--font-condensed);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: 2px;
  padding: 0.75em 1em;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.form-input {
  min-height: 44px;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30, 106, 158, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.65;
}

/* ============================================================
   PAGE UTILITIES & COMPONENT MODIFIERS
   ============================================================ */

/* --- Backgrounds --- */
.section-cream { background: var(--cream); }

/* --- Inline links --- */
.text-link { color: var(--blue); text-decoration: underline; }
.link-blue  { color: var(--blue); }

/* --- Button groups --- */
.btn-group    { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.btn-group--sm { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.btn-submit-full { width: 100%; justify-content: center; }

/* --- Spacing utilities --- */
.mt-sm { margin-top: 0.5rem; }
.mb-0  { margin-bottom: 0; }
.mb-16 { margin-bottom: var(--space-16); }

/* --- Section rule modifier --- */
.section-rule-peach--center { margin-inline: auto; }


/* --- About page: press bio block --- */
.press-bio-section {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: var(--border-cream);
}

.press-bio-label { color: var(--blue); margin-bottom: var(--space-4); }

.press-bio-text {
  background: var(--cream-dark);
  padding: var(--space-6);
  border-left: 3px solid var(--blue);
  border-radius: 2px;
  font-size: 0.9375rem;
  color: var(--text-medium);
}

/* --- Film page --- */
.film-card--pending { opacity: 0.65; pointer-events: none; }
.film-card-title--muted { color: var(--text-muted); }

.film-note { margin-top: var(--space-16); max-width: 640px; }
.film-note-quote { color: var(--text-medium); font-style: italic; }
.film-note-meta  { margin-top: var(--space-5); color: var(--text-muted); }

/* --- Work page --- */
.work-intro-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--text);
  margin-bottom: var(--space-6);
  line-height: 1.05;
}

.prose-p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-medium);
  margin-bottom: var(--space-5);
}

.work-image-col { padding-top: var(--space-6); }

.groundwork-logo {
  width: 100%;
  height: auto;
  margin-bottom: var(--space-6);
}

.page-hero-title-link {
  color: inherit;
  text-decoration: none;
}

.page-hero-title-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--peach);
  text-underline-offset: 6px;
  text-decoration-thickness: 3px;
}

.services-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--text);
  margin-bottom: var(--space-8);
}

/* --- Contact page --- */
.contact-info-body { font-size: 1.0625rem; color: var(--text-medium); line-height: 1.7; }
.contact-section-label { color: var(--blue); margin-bottom: var(--space-5); }

.avail-section {
  border-top: var(--border-cream);
  padding-top: var(--space-8);
  margin-top: var(--space-2);
}

.elsewhere-section {
  border-top: var(--border-cream);
  padding-top: var(--space-8);
  margin-top: var(--space-8);
}

.avail-list { display: flex; flex-direction: column; gap: var(--space-3); }
.avail-item { display: flex; gap: var(--space-3); align-items: flex-start; }
.avail-bullet { color: var(--peach); font-size: 0.75rem; margin-top: 0.35em; }
.avail-text  { font-size: 0.9375rem; color: var(--text-medium); line-height: 1.5; }

.form-note {
  margin-top: var(--space-4);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  font-family: var(--font-condensed);
  letter-spacing: 0.03em;
}

.form-message {
  font-family: var(--font-condensed);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.75em 1em;
  border-radius: 2px;
  margin-top: 0.5rem;
}

.form-message--success {
  background: rgba(30, 106, 158, 0.08);
  border-left: 3px solid var(--blue);
  color: var(--blue);
}

.form-message--error {
  background: rgba(200, 60, 60, 0.08);
  border-left: 3px solid #c83c3c;
  color: #c83c3c;
}

/* --- Writing page: newsletter section --- */
.newsletter-label { color: var(--peach); margin-bottom: var(--space-4); }
.newsletter-title { color: var(--white); margin-bottom: var(--space-5); }

.newsletter-body {
  color: rgba(255,255,255,0.75);
  line-height: 1.75;
  font-size: 1.0625rem;
  margin-bottom: var(--space-5);
}

.newsletter-note {
  color: rgba(255,255,255,0.6);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: var(--space-8);
}

.newsletter-accent {
  border-left: 2px solid var(--peach);
  padding-left: var(--space-6);
  margin-bottom: var(--space-8);
}

.newsletter-accent-label { color: var(--peach); margin-bottom: var(--space-3); }

.newsletter-topic-list { display: flex; flex-direction: column; gap: var(--space-3); }
.newsletter-topic-item { color: rgba(255,255,255,0.72); font-size: 1rem; line-height: 1.6; }

.newsletter-url {
  color: rgba(255,255,255,0.4);
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Writing page: pull quote --- */
.writing-pullquote-wrap { text-align: center; padding-block: var(--space-8); }

.writing-pullquote {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
  font-style: italic;
  max-width: 52ch;
  margin-inline: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background-color: var(--blue-darkest);
  background-image: url('../assets/topo-texture.svg');
  background-repeat: repeat;
  padding-block: clamp(3rem, 6vw, 5rem);
  padding-bottom: max(clamp(3rem, 6vw, 5rem), calc(clamp(3rem, 6vw, 5rem) + env(safe-area-inset-bottom, 0px)));
  border-top: 3px solid var(--peach);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: end;
  margin-bottom: var(--space-10);
}

.footer-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--white);
  display: block;
  margin-bottom: var(--space-3);
  letter-spacing: 0.03em;
}

.footer-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  max-width: 36ch;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: flex-end;
}

.footer-links a {
  font-family: var(--font-condensed);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color var(--t-fast);
}

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

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copy {
  font-family: var(--font-condensed);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.animate-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-in-delay-1 { transition-delay: 0.1s; }
.animate-in-delay-2 { transition-delay: 0.2s; }
.animate-in-delay-3 { transition-delay: 0.3s; }
.animate-in-delay-4 { transition-delay: 0.4s; }
.animate-in-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .hero-name::after {
    display: none;
  }

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

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-sidebar-photo {
    position: static;
    max-width: 280px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .groundwork-cta-block {
    grid-template-columns: 1fr;
  }

  .about-teaser-layout {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 240px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--blue-darkest);
    padding: var(--space-6) clamp(1.25rem, 5vw, 3rem);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t), opacity var(--t);
    border-top: 2px solid var(--peach);
  }

  .nav-links.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.125rem;
    color: var(--white);
  }

  .nav-hamburger {
    display: flex;
  }

  .nav.nav-scrolled .nav-links {
    background: var(--blue-darkest);
  }

  .hero-name {
    font-size: clamp(3.5rem, 15vw, 6rem);
  }

  .substack-cta-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .book-card {
    flex-direction: column;
  }


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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   TOUCH DEVICE OVERRIDES
   Prevents hover transforms from "sticking" after a tap on iOS.
   Color/opacity hover changes are fine — only transforms and
   prominent box-shadows need resetting.
   ============================================================ */
@media (hover: none) {
  .btn:hover { transform: none; }
  .btn-primary:hover { box-shadow: none; }
  .preview-card:hover { transform: none; box-shadow: none; }
  .preview-card:hover::before { transform: scaleX(0); }
  .film-card:hover { transform: none; box-shadow: none; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--peach);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-in {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Visually hidden (screen reader only) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--peach);
  color: var(--blue-darkest);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  border-radius: 2px;
  text-decoration: none;
  z-index: 999;
  transition: top 0.1s;
}

.skip-link:focus {
  top: var(--space-4);
}
