/* From Group Chat to Group Trip — case study
   Style: cut-paper collage on a fresh modern palette. */

:root {
  --paper: #f6f7f9;
  --paper-deep: #eceff4;
  --ink: #171923;
  --ink-soft: #5a6070;
  --coral: #f14a34;
  --mint: #0fa78a;
  --sun: #f5a524;
  --cobalt: #3560f0;
  --card: #ffffff;
  --line: #e2e6ee;
  --tape: rgba(168, 200, 246, 0.75);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.5; mix-blend-mode: multiply;
  background-image: 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.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.42 0 0 0 0 0.48 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hand { font-family: 'Caveat', cursive; }

/* ---------- hero ---------- */

.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 24px 8px;
  text-align: center;
}

h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero-sub {
  margin-top: 18px;
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 460px;
  margin-left: auto; margin-right: auto;
}

.polaroid {
  background: #ffffff;
  padding: 14px 14px 40px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(23,25,35,.06), 0 14px 34px rgba(23,25,35,.12);
  display: inline-block;
  position: relative;
  margin: 44px auto 0;
  transform: rotate(-1.2deg);
  max-width: 620px;
}

.polaroid img { display: block; width: 100%; height: auto; }

.polaroid figcaption {
  position: absolute;
  bottom: 8px; left: 0; right: 0;
  text-align: center;
  font-size: 21px;
  color: var(--ink-soft);
}

.tape {
  position: absolute;
  width: 92px; height: 28px;
  background: var(--tape);
  box-shadow: 0 1px 3px rgba(23,25,35,.12);
  opacity: .92;
}
.tape-tl { top: -12px; left: -26px; transform: rotate(-38deg); }
.tape-tr { top: -12px; right: -26px; transform: rotate(38deg); }
.tape-top { top: -13px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: 110px; }

.hero-meta {
  margin-top: 36px;
  font-size: 16px;
  color: var(--ink-soft);
}

/* ---------- layout ---------- */

main { max-width: 760px; margin: 0 auto; padding: 0 24px; }

section { padding: 72px 0 8px; }

h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(30px, 4.5vw, 38px);
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.num {
  font-family: 'Caveat', cursive;
  font-size: 30px;
  color: var(--coral);
  border: 2px solid var(--coral);
  border-radius: 50%;
  width: 44px; height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center; justify-content: center;
  transform: rotate(-6deg) translateY(4px);
}

section p { margin-bottom: 18px; max-width: 640px; }
section p:last-child { margin-bottom: 0; }

.brief p:first-of-type { font-size: 19px; }

.assumptions {
  background: var(--paper-deep);
  border: 1px dashed #b9c2d4;
  border-radius: 4px;
  padding: 14px 18px;
  font-size: 15.5px;
  color: var(--ink-soft);
}
.assumptions .hand { font-size: 22px; color: var(--cobalt); margin-right: 7px; }

/* ---------- insight callout ---------- */

.insight {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(23,25,35,.05), 0 12px 28px rgba(23,25,35,.09);
  padding: 34px 34px 30px;
  margin: 36px 0;
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.3;
  transform: rotate(-.6deg);
}
.insight.small {
  font-size: clamp(19px, 2.8vw, 23px);
  transform: rotate(.5deg);
}

/* ---------- screen rows ---------- */

.screen-row {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 44px;
  align-items: center;
  margin: 52px 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.screen-row.in { opacity: 1; transform: translateY(0); }

.screen-row.flip { grid-template-columns: 250px 1fr; }
.screen-row.flip .screen-text { order: 2; }
.screen-row.flip .phone { order: 1; }

.screen-text h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 25px;
  margin-bottom: 10px;
}
.screen-text p { font-size: 16px; color: var(--ink-soft); margin: 0; }

/* ---------- phone mockups ---------- */

.phone {
  background: #14161d;
  border-radius: 34px;
  padding: 9px;
  box-shadow: 0 2px 4px rgba(23,25,35,.14), 0 18px 40px rgba(23,25,35,.2);
}
.tilt-l { transform: rotate(-2deg); }
.tilt-r { transform: rotate(2deg); }

.phone-screen {
  background: #f4f6f9;
  border-radius: 26px;
  padding: 16px 14px 18px;
  min-height: 300px;
  font-size: 12.5px;
  line-height: 1.45;
}

.ps-head {
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  color: var(--ink-soft);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-bubble {
  max-width: 85%;
  padding: 7px 11px;
  border-radius: 15px;
  margin-bottom: 6px;
}
.chat-bubble.them { background: #e6eaf2; border-bottom-left-radius: 4px; }
.chat-bubble.me {
  background: var(--cobalt); color: #fff;
  margin-left: auto; border-bottom-right-radius: 4px;
}

.seed-card, .canvas-card, .opt-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  margin-top: 12px;
  box-shadow: 0 2px 6px rgba(23,25,35,.07);
}
.seed-title { font-weight: 700; margin-bottom: 5px; }
.seed-row { color: var(--ink-soft); margin-bottom: 2px; }
.seed-edit { margin-top: 7px; color: var(--cobalt); font-weight: 700; }

.opt-card { margin-top: 10px; border-left: 4px solid var(--coral); }
.opt-name { font-weight: 700; font-size: 13.5px; }
.opt-line { color: var(--ink-soft); margin: 2px 0 6px; }
.opt-trade {
  display: inline-block;
  background: var(--paper-deep);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0b6e5c;
}
.opt-why { margin-top: 12px; color: var(--ink-soft); font-style: italic; }

.itin { margin-top: 4px; }
.itin-day {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 7px;
  color: var(--ink-soft);
}
.itin-day b { color: var(--ink); margin-right: 8px; }

.canvas-note { margin-top: 12px; text-align: center; color: var(--ink-soft); font-style: italic; }

.commit-list { margin-top: 4px; }
.commit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 7px;
  font-weight: 600;
}
.commit-row span { font-size: 11.5px; font-weight: 700; }
.commit-row.in span { color: var(--mint); }
.commit-row.out span { color: var(--ink-soft); font-weight: 500; }
.commit-row.you { border: 1.5px dashed var(--coral); }
.commit-row .tap { color: var(--coral); }
.commit-note { margin-top: 10px; text-align: center; color: var(--ink-soft); font-style: italic; }

/* ---------- principles ---------- */

.principles {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(23,25,35,.05), 0 12px 26px rgba(23,25,35,.08);
  padding: 30px 34px 26px;
  margin-top: 56px;
  transform: rotate(.5deg);
  opacity: 0;
  transition: opacity .6s ease;
}
.principles.in { opacity: 1; }
.principles-lead { font-size: 24px; color: var(--coral); margin-bottom: 12px; }
.principles ul { list-style: none; }
.principles li { padding: 5px 0 5px 22px; position: relative; }
.principles li::before {
  content: '';
  position: absolute; left: 0; top: 14px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--sun);
}

/* ---------- lists ---------- */

.plain-list { margin: 0 0 8px 22px; }
.plain-list li { margin-bottom: 12px; padding-left: 6px; max-width: 600px; }

/* ---------- mid-page illustration ---------- */

.mid-img {
  display: block;
  margin: 36px auto;
  max-width: 460px;
  transform: rotate(1deg);
  opacity: 0;
  transition: opacity .6s ease;
}
.mid-img.in { opacity: 1; }

.divider-img {
  margin: 72px auto 0;
  max-width: 560px;
  opacity: 0;
  transition: opacity .6s ease;
}
.divider-img.in { opacity: 1; }
.divider-img img { display: block; width: 100%; height: auto; }

/* ---------- two columns ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 28px 0;
}
.col-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(23,25,35,.05), 0 10px 24px rgba(23,25,35,.08);
  padding: 24px 24px 20px;
  transform: rotate(-.7deg);
  opacity: 0;
  transition: opacity .6s ease;
}
.col-card.alt { transform: rotate(.7deg); }
.col-card.in { opacity: 1; }
.col-card h3 {
  font-family: 'Caveat', cursive;
  font-size: 27px;
  color: var(--cobalt);
  margin-bottom: 12px;
}
.col-card.alt h3 { color: var(--coral); }
.col-card ul { list-style: none; }
.col-card li {
  font-size: 15px;
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--ink-soft);
}
.col-card li::before {
  content: '';
  position: absolute; left: 0; top: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cobalt);
}
.col-card.alt li::before { background: var(--coral); }

/* ---------- metrics ---------- */

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.metric {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px 16px;
  box-shadow: 0 2px 4px rgba(23,25,35,.04), 0 8px 20px rgba(23,25,35,.07);
  opacity: 0;
  transition: opacity .6s ease;
}
.metric.in { opacity: 1; }
.metric:last-child { grid-column: 1 / -1; }
.metric h4 {
  font-family: 'Caveat', cursive;
  font-size: 25px;
  color: var(--mint);
  margin-bottom: 6px;
}
.metric p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ---------- days ---------- */

.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.day {
  background: var(--paper-deep);
  border: 1px dashed #b9c2d4;
  border-radius: 6px;
  padding: 20px 20px 18px;
  opacity: 0;
  transition: opacity .6s ease;
}
.day.in { opacity: 1; }
.day-num { font-size: 26px; color: var(--coral); display: block; margin-bottom: 8px; }
.day p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }

/* ---------- footer ---------- */

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  text-align: center;
  color: var(--ink-soft);
}
.squiggle { width: 120px; color: var(--coral); margin-bottom: 18px; }
footer p { font-weight: 700; color: var(--ink); }
.footer-sub { font-weight: 400 !important; color: var(--ink-soft) !important; font-size: 15px; margin-top: 4px; }

/* ---------- responsive ---------- */

@media (max-width: 680px) {
  .screen-row, .screen-row.flip {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 44px 0;
  }
  .screen-row.flip .screen-text { order: 1; }
  .screen-row.flip .phone { order: 2; }
  .phone { max-width: 300px; margin: 0 auto; }
  .two-col { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .days { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-row, .principles, .col-card, .day, .metric, .mid-img, .divider-img { opacity: 1; transform: none; transition: none; }
}
