/* ============================================================================
   Where Is Kierstead — the whole surface lives inside Alex's painting:
   a warm acrylic wash of butter yellow and apricot, sage mottling at the
   edges, lavender-grey undertones, and a deep plum calligraphic line —
   the giraffe's impossible tongue — as the signature accent.
   ============================================================================ */

:root {
  /* pulled from the canvas */
  --butter:     #f7d67c;
  --apricot:    #efa95e;
  --apricot-2:  #e8994d;
  --cream:      #f8eed6;
  --canvas:     #f6e9cd;
  --sage:       #8b9169;
  --sage-deep:  #5e664a;
  --lavender:   #b3aac6;
  --plum:       #5c3a6e;   /* the tongue */
  --plum-soft:  #7d55a0;
  --ink:        #3f2d4e;   /* deep plum-brown ink for text */
  --ink-muted:  #6c5b78;
  --ink-faint:  #8f7f99;
  --paper:      rgba(253, 248, 236, 0.86);
  --spoon:      #b7bbc6;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Karla", system-ui, -apple-system, sans-serif;

  --maxw: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 2rem; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--plum); color: var(--cream); }

a { color: var(--plum); text-decoration: none; }
a:hover { color: var(--ink); }

:focus-visible { outline: 2px dashed var(--plum); outline-offset: 3px; }

/* ---- The wash: his background, in soft blurred acrylic pools ---- */
.wash {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--canvas);
  overflow: hidden;
}
.wash .blob {
  position: absolute;
  /* soft acrylic pools via gradient falloff — no filter, cheap to composite */
}
.b1 { width: 90vw; height: 85vh; left: -26%; top: -30%; background: radial-gradient(closest-side, var(--butter) 0%, rgba(247,214,124,0) 70%);    opacity: 0.95; }
.b2 { width: 80vw; height: 90vh; left: 38%;  top: -12%; background: radial-gradient(closest-side, var(--apricot) 0%, rgba(239,169,94,0) 70%);    opacity: 0.8;  }
.b3 { width: 85vw; height: 70vh; left: 4%;   top: 52%;  background: radial-gradient(closest-side, var(--apricot-2) 0%, rgba(232,153,77,0) 70%);  opacity: 0.5;  }
.b4 { width: 62vw; height: 72vh; left: 70%;  top: -26%; background: radial-gradient(closest-side, var(--sage) 0%, rgba(139,145,105,0) 70%);      opacity: 0.6;  }
.b5 { width: 70vw; height: 66vh; left: -28%; top: 60%;  background: radial-gradient(closest-side, var(--sage-deep) 0%, rgba(94,102,74,0) 70%);   opacity: 0.5;  }
.b6 { width: 42vw; height: 48vh; left: -2%;  top: 26%;  background: radial-gradient(closest-side, var(--lavender) 0%, rgba(179,170,198,0) 70%);  opacity: 0.45; }

/* the wash breathes, very slowly */
@media (prefers-reduced-motion: no-preference) {
  .b1 { animation: drift 34s ease-in-out infinite alternate; }
  .b2 { animation: drift 41s ease-in-out infinite alternate-reverse; }
  .b3 { animation: drift 37s ease-in-out infinite alternate; }
  .b4 { animation: drift 45s ease-in-out infinite alternate-reverse; }
  .b5 { animation: drift 39s ease-in-out infinite alternate; }
  .b6 { animation: drift 43s ease-in-out infinite alternate-reverse; }
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(4vw, -3vh) scale(1.08); }
}

/* canvas tooth over everything */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Hero ---- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5rem, 14vh, 9rem) 1.5rem 3rem;
  text-align: center;
}

.hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-weight: 560;
  font-variation-settings: "SOFT" 55, "WONK" 1;
  font-size: clamp(3rem, 9.5vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.years {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-muted);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  margin: 1rem 0 0;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}
.years:empty { display: none; }

.intro {
  position: relative;
  z-index: 1;
  max-width: 44ch;
  margin: 1.9rem auto 0;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 70;
  color: var(--ink-muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

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

/* ---- The flourish: his tongue-and-spoon, drawing itself ---- */
.flourish {
  position: absolute;
  right: clamp(-70px, -3vw, 0px);
  top: clamp(10px, 4vh, 60px);
  width: clamp(240px, 34vw, 430px);
  z-index: 0;
  pointer-events: none;
}
.flourish svg { width: 100%; height: auto; display: block; }

.tongue {
  fill: none;
  stroke: var(--plum);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}
.tongue.over {
  stroke-width: 12;
  animation-delay: 2.3s;
  animation-duration: 0.5s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.spoon { opacity: 0; animation: appear 0.9s ease 1.7s forwards; }
.spoon path    { fill: var(--spoon); stroke: #979caa; stroke-width: 2; }
.spoon ellipse { fill: #c6cad4; stroke: #979caa; stroke-width: 2; }
@keyframes appear { to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .float { animation: bob 8s ease-in-out 2.8s infinite alternate; transform-origin: 60% 40%; }
}
@keyframes bob {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-9px) rotate(-1.2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .tongue { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
  .spoon  { opacity: 1; animation: none; }
}

@media (max-width: 760px) {
  .flourish { opacity: 0.4; width: 250px; right: -80px; top: 0; }
}

/* ---- Section nav ---- */
.nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin-top: 2.7rem;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
}
.nav a {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--plum);
  padding: 0.45rem 1.05rem;
  border: 1.5px solid rgba(92, 58, 110, 0.4);
  border-radius: 999px 999px 999px 999px / 850px 999px 900px 999px; /* slightly hand-drawn */
  background: rgba(253, 248, 236, 0.45);
  transition: background 0.25s, color 0.25s, transform 0.25s, border-color 0.25s;
}
.nav a:hover {
  background: var(--plum);
  border-color: var(--plum);
  color: var(--cream);
  transform: translateY(-2px) rotate(-0.6deg);
}

/* ---- Collection ---- */
.collection {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.section { margin-top: 4rem; }
.section:first-child { margin-top: 1rem; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  margin-bottom: 0.4rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-variation-settings: "SOFT" 50;
  font-size: clamp(2rem, 5vw, 2.9rem);
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-head .count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--sage-deep);
  letter-spacing: 0.03em;
}

/* a plum brushstroke under every section title */
.section .squiggle {
  display: block;
  width: 130px;
  height: 14px;
  margin: 0 0 2rem 0.2rem;
}
.squiggle path {
  fill: none;
  stroke: var(--plum);
  stroke-width: 3.5;
  stroke-linecap: round;
  opacity: 0.75;
}

/* ---- Cards: cream paper laid on the wash, each with a sage giraffe-spot ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.6rem;
  align-items: start; /* each card sits at its natural height, like papers laid on a table */
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(92, 58, 110, 0.16);
  border-radius: 22px 18px 24px 17px / 18px 24px 17px 23px; /* organic, hand-cut */
  padding: 1.5rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 12px 34px rgba(122, 84, 44, 0.13);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-5px) rotate(-0.4deg);
  box-shadow: 0 20px 44px rgba(92, 58, 110, 0.18);
}

/* the giraffe spot */
.card::before {
  content: "";
  position: absolute;
  top: -34px;
  right: -30px;
  width: 110px;
  height: 96px;
  background: var(--sage);
  opacity: 0.17;
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.card:hover::before { transform: scale(1.25) rotate(14deg); }

/* ---- Featured artwork: his paintings hang like they're in a gallery ---- */
.card--art {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(640px, 100%);
  text-align: center;
  padding: 2rem 2rem 1.6rem;
}
.card--art .role { align-self: center; }
.card--art .card-top { justify-content: center; }
.artwork {
  margin-top: 0.6rem;
  padding: 14px;                      /* the cream mat */
  background: #fdfaf1;
  border: 1px solid rgba(92, 58, 110, 0.18);
  border-radius: 10px 12px 9px 13px / 12px 9px 13px 10px;
  box-shadow: 0 16px 42px rgba(92, 58, 110, 0.2);
  transform: rotate(-0.5deg);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.card--art:hover .artwork { transform: rotate(0.3deg) scale(1.012); }
.artwork img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.card--art .card-foot { justify-content: center; gap: 1.4rem; }

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}
.card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-variation-settings: "SOFT" 45, "WONK" 1;
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.15;
  color: var(--ink);
}
.card .year {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--sage-deep);
  white-space: nowrap;
}

.role {
  align-self: flex-start;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: rgba(139, 145, 105, 0.18);
  border: 1px solid rgba(94, 102, 74, 0.32);
  padding: 0.28rem 0.7rem;
  border-radius: 999px 999px 999px 999px / 800px 999px 850px 999px;
}

.card p.desc {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1rem;
}

.embed {
  margin-top: 0.4rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(92, 58, 110, 0.2);
  box-shadow: 0 6px 18px rgba(122, 84, 44, 0.1);
  line-height: 0;
}
.embed iframe { width: 100%; display: block; border: 0; }

.card-foot {
  margin-top: auto;
  padding-top: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.link-out {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--plum);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.link-out:hover { color: var(--ink); }
.link-out .arrow { transition: transform 0.25s; }
.card:hover .link-out .arrow { transform: translateX(4px) rotate(-8deg); }

.by {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--ink-faint);
}
.by span { color: var(--ink-muted); }

/* ---- Empty state ---- */
.empty {
  text-align: center;
  color: var(--ink-muted);
  font-family: var(--serif);
  font-style: italic;
  padding: 5rem 1rem;
  font-size: 1.2rem;
}

/* ---- Footer ---- */
.footer {
  max-width: var(--maxw);
  margin: 3rem auto 0;
  padding: 2.5rem 1.5rem 5rem;
  text-align: center;
}
.footer .squiggle {
  width: 110px;
  height: 14px;
  margin: 0 auto 1.4rem;
  display: block;
}
.footer-line {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 60;
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0;
}

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