/* ============================================================
   Marilu Garbi — typewriter editorial portfolio
   Inspired by mindynguyen.me · entirely set in Courier Prime
   ============================================================ */

:root {
  --paper: #f5eee0;          /* warm cream like aged manuscript paper */
  --paper-soft: #ebe3d2;
  /* Soft, low-contrast off-white family with distinct HUES per section. */
  /* All sit at ~92-95% luminance so transitions feel gentle, but each carries
     a different undertone (warm cream / sage / blush / lavender / peach). */
  --paper-hero:    #f5eee0; /* warm cream (paper) */
  --paper-work:    #ecede0; /* sage cream */
  --paper-earlier: #f1e6df; /* blush cream */
  --paper-current: #e8e6ee; /* soft lavender grey */
  --paper-essays:  #f3ebd9; /* honey cream */
  --paper-app:     #e5ebe5; /* mist green */
  --paper-about:   #f1e7e0; /* warm rose paper */
  --ink: #1c1a16;             /* warm near-black */
  --ink-body: rgba(28, 26, 22, 0.78);
  --ink-mute: rgba(28, 26, 22, 0.58);
  --rule: rgba(28, 26, 22, 0.18);
  --ember: #8a3a1f;
  --ember-ink: #6a2c17;

  --font: 'Courier Prime', 'Courier New', Courier, ui-monospace, monospace;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 1280px;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-md: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --hero: clamp(1.25rem, 0.95rem + 1.45vw, 2.25rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--ember);
}

em {
  font-style: italic;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.visually-hidden {
  position: absolute !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  font-size: var(--text-sm);
  text-decoration: none;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 100;
}

/* Top bar — sparse, uppercase, sticky */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(245, 238, 224, 0.86);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
}
.topbar.is-scrolled {
  border-bottom-color: var(--rule);
  background: rgba(245, 238, 224, 0.96);
}
.brand {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.1em;
}
.brand:hover {
  color: var(--ember);
}
.topbar nav ul {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.topbar nav a {
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.08em;
}
.topbar nav a:hover {
  color: var(--ember);
}
@media (max-width: 520px) {
  .topbar {
    padding: 0.85rem var(--gutter);
  }
  .topbar nav ul {
    gap: 1rem;
  }
}

/* HERO — typewriter statement, centered */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) var(--gutter) clamp(2.5rem, 5vw, 4.5rem);
  background: var(--paper-hero);
}
.hero-statement {
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.4rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 auto;
  max-width: 68ch;
  letter-spacing: -0.005em;
  text-wrap: pretty;
  text-align: center;
}
.hero-statement em {
  font-style: italic;
  color: var(--ember-ink);
}
@media (max-width: 560px) {
  .hero-statement {
    font-size: clamp(1.15rem, 0.9rem + 2vw, 1.5rem);
    line-height: 1.55;
  }
}

/* ============================================================
   Inline pills (illustrated keywords in the hero statement)
   ============================================================ */
/* All pills share a uniform square shape & size. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  border-radius: 7px;
  overflow: hidden;
  margin: 0 0.05em 0 0.2em; /* small space BEFORE pill (placed after the word) */
  vertical-align: -0.32em;
  background: var(--paper-soft);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.1);
  flex-shrink: 0;
  line-height: 0;
}
.pill svg,
.pill img {
  display: block;
  width: 100%;
  height: 100%;
}
.pill img {
  object-fit: cover;
  object-position: center 30%;
}

/* Portrait pill: same square footprint but rounded into a circle */
.pill-portrait {
  border-radius: 999px;
}

/* Subtle border on the cream arts chip so it doesn't disappear into paper */
.pill-arts { border: 1px solid var(--rule); }

@media (max-width: 560px) {
  .pill {
    width: 1.3em;
    height: 1.3em;
    margin: 0 0.05em 0 0.18em;
    vertical-align: -0.3em;
  }
}

/* Sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) var(--gutter) clamp(3rem, 6vw, 6rem);
}

.section-head {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  max-width: 760px;
}

.kicker {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ember);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.lede {
  font-size: var(--text-md);
  color: var(--ink-body);
  max-width: 56ch;
  margin: 0.5rem 0 0;
}

/* Projects (Mindy-style 60/40 rows) */
.project {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(3rem, 6vw, 6rem) 0;
  border-bottom: 1px solid var(--rule);
}
.project:last-of-type {
  border-bottom: 0;
}
.project.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
}
.project.reverse .project-media {
  order: 2;
}
.project.reverse .project-text {
  order: 1;
}
@media (max-width: 820px) {
  .project,
  .project.reverse {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2.5rem 0;
  }
  .project.reverse .project-media,
  .project.reverse .project-text {
    order: initial;
  }
}

.project-media img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 20px 40px -24px rgba(28, 26, 22, 0.3);
  transition: transform 0.35s ease;
}
.project-media a:hover img,
.project:hover .project-media img {
  transform: translateY(-2px);
}
.project-media a {
  display: block;
  text-decoration: none;
}

/* Chaos Coordinator logo: centered round badge, no shadow stretching it */
.chaos-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}
.chaos-logo-wrap img.chaos-logo {
  width: clamp(180px, 28vw, 280px);
  height: auto;
  border-radius: 24px;
  box-shadow: 0 20px 40px -24px rgba(28, 26, 22, 0.3);
  transition: transform 0.35s ease;
}
.chaos-logo-wrap a:hover img.chaos-logo,
.project:hover .chaos-logo-wrap img.chaos-logo {
  transform: translateY(-3px) rotate(-1.5deg);
}

.project-text {
  max-width: 44ch;
}

.project-tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  margin: 0 0 0.85rem;
  font-weight: 400;
}

.project-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 1rem;
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.project-text p {
  margin: 0 0 1rem;
  color: var(--ink-body);
  font-size: var(--text-base);
  line-height: 1.6;
}

.project-link {
  margin-top: 1.25rem !important;
  font-size: var(--text-sm);
}
.project-link a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.project-link a:hover {
  color: var(--ember);
}

.more-films {
  max-width: var(--max);
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: var(--text-sm);
  color: var(--ink-mute);
  line-height: 1.7;
}
.more-films em {
  color: var(--ink-body);
  font-style: italic;
}
.more-films a {
  color: var(--ink);
  text-decoration: underline;
}
.more-films a:hover {
  color: var(--ember);
}

/* ============================================================
   Section background palette (soft off-white family)
   ============================================================ */
#work { background: var(--paper-work); }
.earlier { background: var(--paper-earlier); }
.essays { background: var(--paper-essays); }
.app { background: var(--paper-app); }
.about { background: var(--paper-about); }

/* Sections that should bleed full width with a tinted background */
#work, .earlier, .essays, .app, .about, .current {
  max-width: none;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  border-top: 1px solid var(--rule);
}
#work > *, .earlier > *, .essays > *, .app > *, .about > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

/* Centered section heads (used by Earlier, Essays) */
.section-head-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Current — Facebook feed */
.current {
  background: var(--paper-current);
  border-bottom: 1px solid var(--rule);
}
.current > .section-head,
.current > .fb-wrap,
.current > .fb-cta {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.fb-wrap {
  display: flex;
  justify-content: center;
}
.fb-page {
  width: 100%;
  max-width: 560px;
  min-height: 680px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}
.fb-cta {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}
.fb-page blockquote {
  margin: 0;
  padding: 2rem 1.5rem;
  font-size: var(--text-sm);
  text-align: center;
  color: var(--ink-mute);
}
.fb-fallback-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.fb-card-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ember);
  margin: 0;
  font-weight: 700;
}
.fb-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.005em;
}
.fb-card-body {
  font-size: var(--text-base);
  color: var(--ink-body);
  margin: 0;
  line-height: 1.6;
}
.btn {
  display: inline-block;
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover {
  background: var(--ember-ink);
  color: var(--paper);
  transform: translateY(-1px);
}

/* Chaos Coordinator section uses .project styles already */
.app {
  border-top: 1px solid var(--rule);
}

/* ============================================================
   Earlier work, compact poster grid
   ============================================================ */
.earlier-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
@media (max-width: 900px) {
  .earlier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .earlier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}
.earlier-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.earlier-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: 2px;
  filter: saturate(0.95);
  transition: transform 0.4s ease, filter 0.4s ease;
}
.earlier-card a:hover img {
  transform: translateY(-2px);
  filter: saturate(1.05);
}
.earlier-title {
  margin: 0.75rem 0 0.15rem;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.earlier-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--ink-mute);
  line-height: 1.5;
}
.earlier-foot {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  text-align: center;
  font-size: var(--text-sm);
}
.earlier-foot a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.earlier-foot a:hover { color: var(--ember); }

/* ============================================================
   Essays, Substack feed cards
   ============================================================ */
.essays-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
@media (max-width: 720px) {
  .essays-list { grid-template-columns: 1fr; }
}
.essay-card,
.essay-skeleton {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}
.essay-skeleton {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.essay-card a {
  color: inherit;
  text-decoration: none;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0;
  height: 100%;
}
@media (max-width: 480px) {
  .essay-card a { grid-template-columns: 84px 1fr; }
}
.essay-thumb {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 140px;
  overflow: hidden;
  background: var(--paper-soft);
  border-right: 1px solid var(--rule);
}
.essay-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.essay-card a:hover .essay-thumb img { transform: scale(1.04); }
.essay-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: clamp(1rem, 2vw, 1.4rem) clamp(1rem, 2vw, 1.4rem);
  min-width: 0;
}
/* If the thumbnail span is hidden (load failed), let the body take full width */
.essay-card a:has(.essay-thumb[style*="display: none"]),
.essay-card a:has(> .essay-body:only-child) {
  grid-template-columns: 1fr;
}
.essay-date {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 700;
}
.essay-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.essay-excerpt {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-body);
  line-height: 1.55;
  flex: 1;
}
.essay-link {
  margin: 0.25rem 0 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.essay-card a:hover .essay-title { color: var(--ember); }
.essay-card a:hover .essay-link { color: var(--ember); }
.essay-skeleton {
  gap: 0.75rem;
}
.essay-skeleton span {
  display: block;
  height: 0.85rem;
  background: var(--paper-soft);
  border-radius: 2px;
  animation: pulse 1.6s ease-in-out infinite;
}
.essay-skeleton span:nth-child(1) { width: 30%; }
.essay-skeleton span:nth-child(2) { width: 90%; height: 1.2rem; }
.essay-skeleton span:nth-child(3) { width: 70%; }
@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.essays-cta {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

/* About + contact */
.about {
  border-top: 1px solid var(--rule);
}
.about-portrait {
  margin: 0.5rem 0 1.25rem;
}
.about-portrait img {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 30%;
  border: 1px solid var(--rule);
  display: block;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}
.about-prose p {
  font-size: var(--text-md);
  color: var(--ink-body);
  margin: 0 0 1.1rem;
  max-width: 56ch;
  line-height: 1.65;
}
.contact-card {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: clamp(1.5rem, 2.5vw, 2rem);
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.contact-list li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  align-items: baseline;
  gap: 0.75rem;
  font-size: var(--text-sm);
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--rule);
}
.contact-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.contact-list span {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--ink-mute);
}
.contact-list a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  word-break: break-word;
}
.contact-list a:hover {
  color: var(--ember);
}
@media (max-width: 420px) {
  .contact-list li {
    grid-template-columns: 5rem 1fr;
    gap: 0.5rem;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem var(--gutter);
  text-align: center;
  font-size: var(--text-xs);
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.7;
}
.site-footer p {
  margin: 0;
}
.site-footer .footer-meta {
  text-transform: none;
  letter-spacing: normal;
  margin-top: 0.4rem;
}
.site-footer a {
  color: var(--ink-mute);
  text-decoration: underline;
}
.site-footer a:hover {
  color: var(--ember);
}

/* focus */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Movie posters (portrait, 2:3)
   ============================================================ */

.project-media.poster {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.project-media.poster img {
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(28, 26, 22, 0.06),
    0 10px 28px rgba(28, 26, 22, 0.18),
    0 24px 60px rgba(28, 26, 22, 0.14);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}
.project:hover .project-media.poster img {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(28, 26, 22, 0.08),
    0 14px 32px rgba(28, 26, 22, 0.22),
    0 30px 72px rgba(28, 26, 22, 0.18);
}
@media (max-width: 720px) {
  .project-media.poster img {
    max-width: 260px;
  }
}

/* ============================================================
   Screener request CTA + modal
   ============================================================ */

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--font);
}
.btn-primary:hover {
  background: var(--ember-ink);
  border-color: var(--ember-ink);
}
.btn-ghost {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: var(--font);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.screener-cta {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}
.screener-cta-text {
  min-width: 0;
}
.screener-blurb {
  margin: 0.5rem 0 0;
  font-size: var(--text-base);
  color: var(--ink-body);
  max-width: 56ch;
  line-height: 1.6;
}
.screener-cta .btn-primary {
  white-space: nowrap;
  margin-top: 0;
}
@media (max-width: 640px) {
  .screener-cta {
    grid-template-columns: 1fr;
  }
  .screener-cta .btn-primary {
    justify-self: start;
  }
}

/* Modal */
body.modal-open {
  overflow: hidden;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
}
.modal[hidden] {
  display: none;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 22, 0.55);
  backdrop-filter: blur(2px);
}
.modal-panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 6px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(28, 26, 22, 0.35);
}
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  background: transparent;
  border: 0;
  font-family: var(--font);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
}
.modal-close:hover {
  background: var(--paper-soft);
}
.modal-title {
  font-family: var(--font);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0.25rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.modal-lede {
  margin: 0 0 1.5rem;
  color: var(--ink-body);
  font-size: var(--text-base);
  line-height: 1.6;
}

/* Form */
.screener-form .hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.form-row label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--ink);
}
.form-row .opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
}
.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-row textarea {
  resize: vertical;
  min-height: 5rem;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(138, 58, 31, 0.18);
}
.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.form-fineprint {
  margin: 1rem 0 0;
  font-size: var(--text-xs);
  color: var(--ink-mute);
  line-height: 1.5;
}
.screener-success p {
  color: var(--ink-body);
  font-size: var(--text-base);
  margin: 0 0 1rem;
}
.screener-success .btn-ghost {
  margin-top: 0.5rem;
}

/* ============================================================
   Contact page
   ============================================================ */

.contact-section {
  max-width: 1080px;
  margin: 0 auto;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.contact-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.75rem, 1rem + 2.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0.5rem 0 1rem;
}
.contact-lede {
  max-width: 60ch;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink-body);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-form {
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.contact-side .kicker {
  margin-top: 0;
}
.contact-side .contact-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
}
.contact-side .contact-list li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--rule);
  font-size: var(--text-sm);
}
.contact-side .contact-list li:last-child {
  border-bottom: 0;
}
.contact-side .contact-list span {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--text-xs);
  color: var(--ink-mute);
  font-weight: 700;
  align-self: center;
}
.contact-side .contact-list a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule);
}
.contact-side .contact-list a:hover {
  text-decoration-color: var(--ink);
}
.contact-note {
  font-size: var(--text-sm);
  color: var(--ink-body);
  line-height: 1.6;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  margin: 0;
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* contact button needs proper sizing on contact page */
.contact-form .btn-primary {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
