/* ==========================================================================
   Potluck Improv — styles
   Everything here follows designsystem/potluck-improv-design-system.md.
   Palette sampled from the logo painting. Never pure white, never pure black.
   ========================================================================== */

:root {
  /* Primaries (the pot and the broth) */
  --pot-blue: #4A47B0;
  --broth-red: #A6370F;
  --pasta-cream: #E5A35D;

  /* Accents (the diced veg) */
  --carrot: #D98230;
  --tomato: #E8524A;
  --sweetcorn: #C7B23E;
  --pot-light: #7C79C9;

  /* Neutrals (the paper and the ink) */
  --broth-paper: #FBF7EF;
  --burnt-aubergine: #2A1A2E;
  --soup-shadow: #6B5B44;
  --rim-cream: #E5D9C5;

  --font-display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  /* One reusable grain: a faint cream noise laid over solid fills so colour
     feels pressed on like crayon rather than poured in like ink. */
  --crayon-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.88 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--broth-paper);
  color: var(--burnt-aubergine);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

h2 { font-size: clamp(28px, 5vw, 36px); color: var(--pot-blue); }
h3 { font-size: clamp(20px, 4vw, 24px); font-weight: 500; }

p { margin: 0 0 1rem; }

a { color: var(--pot-blue); text-decoration: underline; text-underline-offset: 3px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--pot-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pot-blue);
  color: var(--broth-paper);
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Eyebrow: the one place we use caps */
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--broth-red);
  margin: 0 0 0.6rem;
}
.on-blue .eyebrow { color: var(--pasta-cream); }

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 48px 0; }

.muted { color: var(--soup-shadow); }
.small { font-size: 14px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  padding: 14px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap; /* three links + brand fit at 320px by wrapping */
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--burnt-aubergine);
}
.brand img { width: 48px; height: 48px; }
.brand .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.05;
  color: var(--pot-blue);
}
.site-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.site-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  color: var(--burnt-aubergine);
  padding: 10px 12px; /* comfortable tap target */
  border-radius: 999px;
  white-space: nowrap;
}
.site-nav a[aria-current="page"] {
  color: var(--pot-blue);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
  text-decoration-color: var(--tomato);
}

/* --------------------------------------------------------------------------
   Buttons: pills, always
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  padding: 13px 28px;
  min-height: 44px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  background-image: var(--crayon-grain);
  transition: transform 120ms ease;
}
.btn:hover { transform: translateY(-1px) rotate(-0.5deg); }
.btn:active { transform: translateY(1px); }

.btn-primary { background-color: var(--pot-blue); color: var(--broth-paper); }
.btn-secondary { background-color: var(--broth-red); color: var(--broth-paper); }
.btn-outline {
  background-color: var(--broth-paper);
  background-image: none;
  color: var(--pot-blue);
  border: 2px solid var(--pot-blue);
}

/* --------------------------------------------------------------------------
   Hero — Mode B, full crayon, one dominant Pot Blue block
   -------------------------------------------------------------------------- */
.hero {
  background-color: var(--pot-blue);
  background-image: var(--crayon-grain);
  color: var(--broth-paper);
  padding: 40px 0 56px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }

.hero-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 10vw, 72px);
  line-height: 1.02;
  color: var(--pasta-cream);
  margin: 0 0 20px;
}
.hero-wordmark .line { display: block; }
.hero-letter { display: inline-block; }

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 5.4vw, 38px);
  line-height: 1.15;
  color: var(--broth-paper);
  margin: 0 0 14px;
  max-width: 21ch;
}
.hero-sub {
  max-width: 46ch;
  margin-bottom: 24px;
  font-size: 17px;
}

.hero-photo {
  margin: 28px 0 0;
  border-radius: 16px;
  overflow: hidden;
  transform: rotate(-1deg);
  border: 5px solid var(--broth-paper);
  box-shadow: 0 6px 24px rgba(42, 26, 46, 0.28);
}
.hero-photo img { width: 100%; }
.hero-photo figcaption {
  display: none; /* the alt carries the description; caption is for wide view */
}

/* floating veg in the broth, purely decorative */
.veg {
  position: absolute;
  border-radius: 4px;
  opacity: 0.5;
  z-index: 1;
}
.veg.carrot { width: 14px; height: 14px; background: var(--carrot); }
.veg.corn { width: 10px; height: 10px; background: var(--sweetcorn); border-radius: 999px; }
.veg.tomato { width: 12px; height: 12px; background: var(--tomato); }

/* The floating letters and drifting veg only move for people who have not
   asked for stillness. Stillness is the default; motion is the enhancement. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes bob {
    0%, 100% { transform: translateY(0) rotate(var(--tilt, 1deg)); }
    50% { transform: translateY(-6px) rotate(calc(var(--tilt, 1deg) * -1)); }
  }
  .hero-letter {
    animation: bob var(--dur, 4s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
  }
  @keyframes drift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(8deg); }
  }
  .veg { animation: drift var(--dur, 9s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
}

/* --------------------------------------------------------------------------
   Crayon marks
   -------------------------------------------------------------------------- */
.crayon-underline {
  display: block;
  width: 180px;
  max-width: 60%;
  height: 12px;
  margin: 2px 0 18px;
}
.center { text-align: center; }
.center .crayon-underline { margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   What happens — the wandering thread
   -------------------------------------------------------------------------- */
.night {
  position: relative;
}
.night-flow {
  position: relative;
  margin-top: 24px;
}
.night-beats {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.night-thread {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 13px;
  width: 26px;
  height: calc(100% - 16px);
  z-index: 0;
}
.night-beats li {
  position: relative;
  padding: 0 0 26px 52px;
  z-index: 1;
}
.night-beats li:last-child { padding-bottom: 0; }
.beat-dot {
  position: absolute;
  left: 6px;
  top: 2px;
  width: 22px;
  height: 22px;
}
.night-beats .beat-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  display: block;
  color: var(--broth-red);
}
.night-beats li:nth-child(odd) .beat-name { color: var(--pot-blue); }

/* --------------------------------------------------------------------------
   Small room cards
   -------------------------------------------------------------------------- */
.card-row {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.card {
  background: var(--broth-paper);
  border: 1px solid var(--rim-cream);
  border-radius: 16px;
  padding: 22px;
}
.card h3 { color: var(--broth-red); margin-bottom: 6px; }
.card:nth-child(odd) h3 { color: var(--pot-blue); }
.card p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Events
   -------------------------------------------------------------------------- */
.event-card {
  background-color: var(--broth-red);
  background-image: var(--crayon-grain);
  color: var(--broth-paper);
  border-radius: 16px;
  padding: 26px 24px;
  margin-top: 24px;
}
.event-poster {
  width: 100%;
  border-radius: 12px;
  border: 4px solid var(--broth-paper);
  margin-bottom: 16px;
  transform: rotate(-0.8deg);
}
.event-card h3 {
  font-weight: 600;
  font-size: 24px;
  color: var(--broth-paper);
}
.event-card .event-meta {
  margin: 8px 0 16px;
  font-size: 17px;
}
.event-card .event-meta span { display: block; }
.event-card .btn-primary {
  background-color: var(--broth-paper);
  background-image: none;
  color: var(--broth-red);
}
.event-card a { color: var(--broth-paper); }
.no-events {
  border: 1px solid var(--rim-cream);
  border-radius: 16px;
  padding: 26px 24px;
  margin-top: 24px;
}
.no-events p:last-child { margin-bottom: 0; }
.price-note { font-size: 14px; margin-top: 10px; }

/* --------------------------------------------------------------------------
   Photos — one 3-in-1 strip becomes three polaroid panels.
   Mobile: a clean single column, no overlap, no rotation.
   -------------------------------------------------------------------------- */
.polaroids {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}
.polaroid {
  background: var(--broth-paper);
  border: 1px solid var(--rim-cream);
  border-radius: 14px;
  padding: 10px 10px 12px;
  box-shadow: 0 3px 14px rgba(42, 26, 46, 0.10);
}
.jam-photo {
  /* each source file is three frames stacked vertically (720 x 1279),
     so one frame is 720 x ~426 */
  aspect-ratio: 720 / 426;
  background-size: 100% 300%;
  background-repeat: no-repeat;
  border-radius: 10px;
}
.jam-photo.top { background-position: center 1%; }
.jam-photo.middle { background-position: center 50%; }
.jam-photo.bottom { background-position: center 99%; }
.polaroid figcaption {
  font-size: 13px;
  color: var(--soup-shadow);
  padding-top: 8px;
}

/* --------------------------------------------------------------------------
   Invitation
   -------------------------------------------------------------------------- */
.invitation { text-align: center; padding-bottom: 64px; }
.invitation .btn { margin-top: 8px; }
.cta-point {
  display: block;
  width: 64px;
  height: 46px;
  margin: 0 auto 4px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rim-cream);
  padding: 32px 0 44px;
  color: var(--soup-shadow);
  font-size: 15px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.site-footer img { width: 42px; height: 42px; }
.site-footer p { margin: 0; }

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.founders {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}
.founder { text-align: left; }
.founder-photo {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--rim-cream);
}
.founder-photo::after {
  /* a very light warm overlay toward the palette; never hides a face */
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(217, 130, 48, 0.10);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.founder h3 {
  color: var(--pot-blue);
  font-weight: 600;
  margin: 14px 0 6px;
}
.fun-note {
  color: var(--soup-shadow);
  font-style: italic;
  min-height: 3.2em; /* holds shape whether the note is one line or three */
  margin: 0;
}

.mission-quote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.35;
  color: var(--broth-red);
  border-left: 5px solid var(--pasta-cream);
  border-radius: 3px;
  padding: 4px 0 4px 20px;
  margin: 20px 0 0;
}

.culture-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 8px;
  padding: 0;
  list-style: none;
}
.culture-tiles li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  padding: 10px 20px;
  border-radius: 14px;
  color: var(--broth-paper);
  background-image: var(--crayon-grain);
}
.culture-tiles li:nth-child(6n+1) { background-color: var(--pot-blue); }
.culture-tiles li:nth-child(6n+2) { background-color: var(--broth-red); }
.culture-tiles li:nth-child(6n+3) { background-color: var(--carrot); }
.culture-tiles li:nth-child(6n+4) { background-color: var(--pot-light); }
.culture-tiles li:nth-child(6n+5) { background-color: var(--tomato); }
.culture-tiles li:nth-child(6n+6) { background-color: var(--sweetcorn); color: var(--burnt-aubergine); }

.values-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.values-list li {
  position: relative;
  padding: 0 0 24px 34px;
}
.values-list .value-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--pot-blue);
}
.values-list li:nth-child(even) .value-name { color: var(--broth-red); }
.values-list .value-why {
  display: block;
  margin-top: 2px;
  max-width: 62ch;
}
.values-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--carrot);
  transform: rotate(6deg);
}
.values-list li:nth-child(3n+2)::before { background: var(--tomato); border-radius: 999px; }
.values-list li:nth-child(3n)::before { background: var(--sweetcorn); transform: rotate(-8deg); }

/* --------------------------------------------------------------------------
   Pledges
   -------------------------------------------------------------------------- */
.pledge-card {
  border: 1px solid var(--rim-cream);
  border-radius: 16px;
  background: var(--broth-paper);
  margin-top: 28px;
  box-shadow: 0 3px 14px rgba(42, 26, 46, 0.08);
}
.pledge-card summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  cursor: pointer;
  list-style: none;
  border-radius: 16px;
}
.pledge-card summary::-webkit-details-marker { display: none; }
.pledge-card summary:focus-visible {
  outline: 3px solid var(--pot-blue);
  outline-offset: 3px;
}
.pledge-logo {
  width: 220px;
  max-width: 100%;
  flex-shrink: 0;
}
.pledge-title h2 {
  font-size: clamp(22px, 4.5vw, 28px);
  color: var(--burnt-aubergine);
  margin-bottom: 4px;
}
.pledge-sub {
  display: block;
  color: var(--soup-shadow);
  font-size: 15px;
  margin-bottom: 10px;
}
.pledge-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--pot-blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.pledge-chevron { transition: transform 150ms ease; }
.pledge-card[open] .pledge-chevron { transform: rotate(180deg); }
.pledge-hint .hint-close { display: none; }
.pledge-card[open] .hint-open { display: none; }
.pledge-card[open] .hint-close { display: inline; }
.pledge-body {
  padding: 0 22px 28px;
  max-width: 68ch;
}
.pledge-body h3 {
  color: var(--broth-red);
  font-weight: 600;
  margin: 22px 0 8px;
}
.pledge-body h3:first-child { margin-top: 0; }
.statement-text {
  border-left: 5px solid var(--pasta-cream);
  border-radius: 3px;
  padding-left: 18px;
}
.statement-text p { margin-bottom: 0.9rem; }
.statement-text p:last-child { margin-bottom: 0; color: var(--soup-shadow); }
.signature-block { margin: 26px 0 22px; }
.signature {
  width: min(320px, 86%);
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   Booking dialog
   -------------------------------------------------------------------------- */
.booking-dialog {
  border: none;
  border-radius: 16px;
  background: var(--broth-paper);
  color: var(--burnt-aubergine);
  padding: 26px 22px;
  width: min(92vw, 420px);
  box-shadow: 0 10px 40px rgba(42, 26, 46, 0.35);
}
.booking-dialog::backdrop { background: rgba(42, 26, 46, 0.55); }
.booking-dialog h3 { color: var(--pot-blue); }
.booking-dialog form { display: grid; gap: 14px; margin-top: 12px; }
.booking-dialog label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}
.booking-dialog input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px 14px;
  border: 1.5px solid var(--rim-cream);
  border-radius: 12px;
  background: var(--broth-paper);
  color: var(--burnt-aubergine);
}
.booking-dialog input:focus { border-color: var(--pot-blue); }
.booking-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.booking-error { color: var(--broth-red); font-size: 15px; margin: 0; }

/* --------------------------------------------------------------------------
   Confirmation / cancelled pages
   -------------------------------------------------------------------------- */
.confirm-hero {
  padding: 64px 0 72px;
  text-align: center;
}
.confirm-hero h1 { font-size: clamp(36px, 8vw, 54px); color: var(--pot-blue); }
.confirm-hero .pot { width: 180px; margin: 0 auto 20px; }

/* --------------------------------------------------------------------------
   Wider screens. Designed at 375px first; this is the growth, not the base.
   -------------------------------------------------------------------------- */
@media (min-width: 700px) {
  section { padding: 64px 0; }

  .hero { padding: 56px 0 72px; }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 40px;
    align-items: center;
  }
  .hero-photo { margin-top: 0; }

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

  /* the polaroid cluster gets its scatter back on desktop */
  .polaroids {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    align-items: start;
  }
  .polaroid:nth-child(3n+1) { transform: rotate(-1.6deg); }
  .polaroid:nth-child(3n+2) { transform: rotate(1.2deg) translateY(14px); }
  .polaroid:nth-child(3n)   { transform: rotate(-0.8deg) translateY(4px); }

  .event-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
  }
  .event-poster {
    width: 230px;
    flex-shrink: 0;
    margin-bottom: 0;
  }
  .event-info { flex: 1; min-width: 260px; }

  .pledge-card summary {
    flex-direction: row;
    align-items: center;
    gap: 28px;
  }

  .site-footer .wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
