:root {
  color-scheme: light;

  /* Faded daytime film sky */
  --sky-top: #a7c4dc;
  --sky-mid: #bcd2e0;
  --sky-haze: #d9dcd0;
  --sky-warm: #efe7d6;

  --ink: #1f2a38;
  --muted: #44505f;
  --dim: #74808f;

  --line: rgba(31, 42, 56, 0.14);
  --line-strong: rgba(31, 42, 56, 0.24);

  --paper: rgba(255, 255, 255, 0.55);
  --paper-strong: rgba(255, 255, 255, 0.72);
  --print: #fbf7ef;

  --accent: #2f7ec9;
  --accent-bright: #4f9bdf;
  --accent-soft: rgba(47, 126, 201, 0.14);
  --kite: #ef6a4d;

  --max-width: 1180px;
  --content-width: min(var(--max-width), calc(100% - clamp(48px, 12vw, 240px)));
  --header-height: 64px;

  --serif: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--sky-mid);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Fixed film sky: faded blue gradient, soft clouds, a warm light leak, vignette. */
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(130% 110% at 50% 38%, transparent 60%, rgba(70, 55, 40, 0.18) 100%),
    radial-gradient(55% 45% at 100% -5%, rgba(255, 176, 122, 0.42), transparent 60%),
    radial-gradient(34% 22% at 20% 26%, rgba(255, 255, 255, 0.72), transparent 62%),
    radial-gradient(30% 18% at 68% 18%, rgba(255, 255, 255, 0.58), transparent 62%),
    radial-gradient(26% 16% at 48% 47%, rgba(255, 255, 255, 0.48), transparent 64%),
    radial-gradient(32% 20% at 84% 62%, rgba(255, 255, 255, 0.42), transparent 64%),
    linear-gradient(
      180deg,
      var(--sky-top) 0%,
      var(--sky-mid) 34%,
      var(--sky-haze) 68%,
      var(--sky-warm) 100%
    );
  filter: saturate(0.92) contrast(0.98);
}

/* Film grain over everything, including the kite (non-interactive). */
body::after {
  position: fixed;
  inset: 0;
  z-index: 70;
  content: "";
  pointer-events: none;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Paper-kite cursor + flowing ribbon canvas. Drawn above content (a kite flies
   in front of the page). */
#fx {
  position: fixed;
  inset: 0;
  z-index: 65;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

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

/* On fine-pointer devices hide the native cursor; JS adds .custom-cursor. */
.custom-cursor,
.custom-cursor a,
.custom-cursor button {
  cursor: none;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 40;
  display: flex;
  width: var(--content-width);
  min-height: var(--header-height);
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.nav-links {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
}

.nav-mark {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.nav-say-hi {
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  backdrop-filter: blur(10px);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
  will-change: transform;
}

.nav-say-hi:hover,
.nav-say-hi:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

/* ---------- Layout ---------- */
main {
  width: 100%;
}

.hero {
  display: grid;
  min-height: 100svh;
  width: var(--content-width);
  margin: 0 auto;
  padding: clamp(150px, 22vh, 260px) 0 clamp(90px, 12vh, 150px);
  align-content: center;
}

.eyebrow,
.section-label {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 17vw, 13rem);
  line-height: 0.9;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.accent-mark {
  color: var(--kite);
}

.hero-copy {
  display: grid;
  max-width: 60ch;
  gap: 22px;
  margin: 44px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
}

.hero-copy p {
  margin: 0;
}

.hero-copy strong {
  color: var(--ink);
}

.scroll-cue {
  margin: 40px 0 0;
  color: var(--dim);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ---------- Callouts (paper notes) ---------- */
.callout {
  position: relative;
  margin: 6px 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 6px;
  background: var(--paper);
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px rgba(40, 46, 60, 0.12);
  will-change: transform;
}

.callout-tidbit {
  margin-top: 30px;
}

/* Dug from "Up" peeking in from behind the tidbit text — faded so the copy reads. */
.callout-dug {
  overflow: hidden;
  background-image:
    linear-gradient(rgba(251, 247, 239, 0.84), rgba(251, 247, 239, 0.84)),
    url("assets/dug.jpeg");
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: cover, cover;
}

.callout-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.callout-body {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.4vw, 1.04rem);
}

.callout-body strong {
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  will-change: transform;
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 36px rgba(47, 126, 201, 0.32);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-bright);
  box-shadow: 0 18px 50px rgba(47, 126, 201, 0.42);
  outline: none;
}

/* ---------- Story blocks ---------- */
.story {
  display: grid;
  width: var(--content-width);
  margin: 0 auto;
  gap: clamp(96px, 16vh, 200px);
  padding: clamp(60px, 12vh, 160px) 0 clamp(120px, 16vh, 200px);
}

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: center;
  gap: clamp(32px, 5vw, 76px);
}

.story-row-reverse {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

.story-row-reverse .photo-cluster {
  order: 2;
}

.photo-cluster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 1.1vw, 14px);
  align-content: start;
}

/* Two-image rows stack vertically so each print is larger. */
.photo-cluster.photo-stack {
  grid-template-columns: 1fr;
}

/* Photo cards look like warm film prints pinned to the sky. */
.photo-card {
  position: relative;
  margin: 0;
  /* min-* 0 stops the grid track from blowing out to the oversized particle
     canvas child while dispersing. */
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 5px solid var(--print);
  border-radius: 3px;
  background: var(--print);
  box-shadow: 0 16px 34px rgba(35, 42, 58, 0.22);
  aspect-ratio: 4 / 3;
}

.photo-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 1px;
  /* Faded film grade. */
  filter: saturate(0.9) contrast(0.95) brightness(1.04) sepia(0.06);
}

/* Centered sign-off photo above the contact section — shows the full frame
   (not cropped to 4/3) but keeps the print look and the page-dispersion. */
.bottom-photo {
  width: min(420px, 74%);
  margin: clamp(56px, 10vh, 120px) auto clamp(20px, 4vh, 40px);
  aspect-ratio: auto;
}

.bottom-photo img {
  height: auto;
}

/* A per-photo canvas that lives inside the card, so its particles scroll with
   the page natively (no lag). Hidden until the photo is scattering. */
.shred {
  position: absolute;
  z-index: 2;
  display: none;
  pointer-events: none;
}

/* While a print scatters into paper pages, hide the original image. The card
   stays clipped (overflow: hidden) so pages stay within the frame. */
.photo-card.is-dispersing img {
  opacity: 0;
}

.photo-card.is-dispersing .shred {
  display: block;
}

.story-copy {
  max-width: 56ch;
}

.story-copy h2,
.contact-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.2vw, 4.6rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.story-copy p:not(.section-label):not(.pull-quote),
.contact-section p:not(.section-label) {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.story-copy em,
.contact-section em {
  color: var(--ink);
  font-style: italic;
}

.pull-quote {
  margin: 28px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

/* ---------- Link bubbles ---------- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.link-bubbles .bubble {
  display: inline-flex;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: border-color 200ms ease, background 200ms ease, color 200ms ease;
  will-change: transform;
}

.link-bubbles .bubble:hover,
.link-bubbles .bubble:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

/* ---------- Contact ---------- */
.contact-section {
  width: min(820px, var(--content-width));
  margin: 0 auto clamp(120px, 16vh, 200px);
  padding: clamp(56px, 8vw, 96px) clamp(28px, 6vw, 80px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-strong);
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(35, 42, 58, 0.14);
  text-align: center;
}

.contact-section .section-label,
.contact-section h2 {
  margin-left: auto;
  margin-right: auto;
}

.contact-section .button {
  margin-top: 36px;
}

/* ---------- Footer ---------- */
.site-footer {
  width: var(--content-width);
  margin: 0 auto;
  padding: 0 0 clamp(60px, 12vh, 140px);
  color: var(--dim);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-align: center;
}

/* ---------- Scroll reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  body {
    font-size: 16px;
  }

  .hero {
    min-height: 92svh;
    padding-top: clamp(120px, 18vh, 180px);
  }

  .story {
    gap: clamp(72px, 12vh, 120px);
  }

  .story-row,
  .story-row-reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .story-row-reverse .photo-cluster {
    order: 0;
  }

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

  .story-copy {
    max-width: none;
  }
}

@media (max-width: 520px) {
  :root {
    --content-width: min(100% - 40px, var(--max-width));
  }

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

  .contact-section {
    text-align: left;
  }

  .contact-section .section-label,
  .contact-section h2 {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ---------- Reduced motion + touch fallbacks ---------- */
@media (hover: none), (pointer: coarse) {
  #fx {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  #fx {
    display: none;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
