/* ---------- shared ---------- */
:root {
  --paper: #fffdfb;
  --ink: #1e1c1c;
  --body-text: #434343;
  --rose: #BE8695;
  --rose-hover: #a56e7d;
  --muted: #A6A6A6;
  --flag-home: #BCABAB;
  --flag-projects: #DEA7A7;
  --flag-fun: #EBC1C1;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
}

a { color: inherit; }
a:hover { color: var(--rose-hover); }

/* ---------- doodle hover (sketch + handwritten tip) ---------- */
.sk .sk-tip {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.sk:hover .sk-tip, .sk.show .sk-tip { opacity: 1; transform: translateY(0); }
.sk:hover svg.doodle { transform: rotate(-3deg) scale(1.05); }
svg.doodle { transition: transform .3s ease; }

@keyframes wiggle {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg); }
}
.wig:hover svg.doodle { animation: wiggle .5s ease infinite; transform: none; }

.tip-text {
  font-family: Caveat, cursive;
  color: var(--rose);
  line-height: 1.1;
}

/* ---------- flag nav (home page) ---------- */
.flagnav a .fwave {
  transform-box: fill-box;
  transform-origin: var(--fo, left bottom);
}
.flagnav a:hover .fwave { animation: flagwave .7s ease-in-out infinite; }
@keyframes flagwave {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(4deg); }
  70% { transform: rotate(-3deg); }
}

/* ---------- circle nav (projects / fun pages) ---------- */
.circle-nav {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  padding-top: 56px;
}
.circle-nav a {
  display: block;
  cursor: pointer;
  text-decoration: none;
}

/* ---------- home page ---------- */
.home-stage {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}
.home-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 300px;
  text-align: center;
}
.home-center h1 {
  font-family: 'Instrument Serif', serif;
  font-weight: 300;
  font-size: 34px;
  margin: 0;
}
.home-center h1 .name { color: var(--rose); }
.home-tagline {
  font-family: Judson, serif;
  font-size: 22px;
  letter-spacing: .03em;
  margin-top: 14px;
}
.home-blurb {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 17.5px;
  line-height: 1.45;
  max-width: 550px;
  margin: 16px 0 0;
  font-weight: 300;
}
.home-blurb strong { color: var(--rose); font-weight: 600; }
.home-previously {
  font-family: 'Instrument Sans', sans-serif;
  text-align: left;
  max-width: 590px;
  margin-top: 18px;
  font-size: 14.5px;
  line-height: 1.4;
}
.home-previously .lede { font-style: italic; }
.home-previously ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-contact {
  font-family: 'Instrument Sans', sans-serif;
  text-align: center;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.home-contact-icons {
  display: flex;
  gap: 18px;
  align-items: center;
}
.home-contact-icons a {
  color: var(--rose);
  display: flex;
  transition: color 0.15s ease;
}
.home-contact-icons a:hover {
  color: var(--rose-hover);
}
.home-contact-note {
  font-style: italic;
  color: var(--rose);
  font-size: 15px;
  line-height: 1.4;
}
.doodle-spot { position: absolute; cursor: pointer; }

/* ---------- projects page ---------- */
.page-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 30px;
  margin: 26px 0 0;
  text-align: center;
  color: var(--ink);
}
.projects-grid {
  display: grid;
  grid-template-columns: 383px 383px;
  gap: 48px 84px;
  justify-content: center;
  margin: 44px auto 70px;
  padding: 0 20px;
  font-family: 'Instrument Sans', sans-serif;
  color: var(--body-text);
}
.project-card { display: flex; flex-direction: column; }
.project-media {
  width: 383px;
  max-width: 100%;
  height: 200px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px var(--rose);
  overflow: hidden;
  background-color: #fff;
  background-repeat: no-repeat;
}
.project-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    #fff, #fff 14px,
    #fdf7f8 14px, #fdf7f8 28px
  );
}
.project-media.placeholder span {
  font-family: Caveat, cursive;
  font-size: 24px;
  color: var(--rose);
}
.project-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
}
.project-title-row .title {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  color: var(--rose);
}
.project-title-row .year {
  font-family: 'Instrument Sans', sans-serif;
  font-style: italic;
  font-size: 10px;
  color: var(--muted);
}
.project-desc {
  font-size: 14px;
  line-height: 1.35;
  margin-top: 2px;
  max-width: 383px;
}

/* ---------- project cards that link to a detail page ---------- */
a.project-card {
  text-decoration: none;
  color: var(--body-text);
}
a.project-card:hover { color: var(--body-text); }
a.project-card:hover .title { color: var(--rose-hover); }
a.project-card .project-media { transition: transform .3s ease; }
a.project-card:hover .project-media { transform: rotate(-1deg) scale(1.015); }

/* ---------- project detail page ---------- */
.case-study {
  max-width: 760px;
  margin: 30px auto 90px;
  padding: 0 24px;
  font-family: 'Instrument Sans', sans-serif;
  color: var(--body-text);
}
.cs-back {
  display: inline-block;
  font-family: Caveat, cursive;
  font-size: 21px;
  color: var(--rose);
  text-decoration: none;
  margin-bottom: 20px;
}
.cs-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 42px;
  line-height: 1.08;
  color: var(--rose);
  margin: 0;
}
.cs-oneliner {
  font-family: Judson, serif;
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--ink);
  margin: 10px 0 0;
  max-width: 640px;
}
.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 20px 0 0;
}
.cs-meta > div { min-width: 0; }
.cs-meta dt {
  font-style: italic;
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
}
.cs-meta dd {
  margin: 3px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
.cs-meta .cs-meta-wide { flex-basis: 100%; max-width: 640px; }
.cs-hero-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 22px;
  margin-top: 26px;
}
.cs-hero-pair figure {
  display: flex;
  flex-direction: column;
}
.cs-hero-pair img,
.cs-hero-pair video {
  flex: 1;
  min-height: 0;
  object-fit: cover;
}
@media (max-width: 700px) {
  .cs-hero-pair { grid-template-columns: 1fr; }
}

/* framed media: same rose ring as the project cards */
.case-study img,
.case-study video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  outline: 2px solid var(--rose);
  outline-offset: -2px;
  background: #fff;
}
.case-study figure { margin: 0; }
.case-study figcaption {
  font-family: Caveat, cursive;
  font-size: 18px;
  line-height: 1.2;
  color: var(--rose);
  text-align: center;
  margin-top: 8px;
}

.cs-section { margin-top: 48px; }
.cs-section h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 27px;
  color: var(--rose);
  margin: 0 0 12px;
}
.cs-section p {
  font-size: 15.5px;
  line-height: 1.55;
  margin: 0 0 12px;
  max-width: 640px;
}
.cs-section p:last-child { margin-bottom: 0; }

/* demo reel: portrait video centered under the section header */
.cs-reel {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.cs-reel figure { width: min(100%, 300px); }
.cs-reel video { aspect-ratio: 9 / 16; }

/* how-it-works flow diagram */
.cs-flow {
  list-style: none;
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 0;
  margin: 20px 0 4px;
}
.cs-flow .step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  border: 1.5px solid var(--rose);
  border-radius: 12px;
  padding: 12px 12px 14px;
  background: #fff;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.4;
}
.cs-flow .step-label {
  font-family: Caveat, cursive;
  font-size: 20px;
  line-height: 1;
  color: var(--rose);
}
.cs-flow .arrow {
  flex: 0 0 auto;
  align-self: center;
  color: var(--rose);
  font-size: 22px;
  line-height: 1;
}

/* process gallery */
.cs-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 22px;
  margin-top: 22px;
}
.cs-gallery .wide { grid-column: 1 / -1; }
/* side-by-side figures: stretch media to equal heights so captions line up */
.cs-gallery figure:not(.wide):not(.closing) {
  display: flex;
  flex-direction: column;
}
.cs-gallery figure:not(.wide):not(.closing) img,
.cs-gallery figure:not(.wide):not(.closing) video {
  flex: 1;
  min-height: 0;
  object-fit: cover;
}
.cs-gallery .closing {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 430px);
}

/* single centered figure between paragraphs */
.case-study .cs-solo {
  width: min(100%, 430px);
  margin: 22px auto 26px;
}

/* smaller centered reference image (e.g. the marble answering machine sketch) */
.case-study .cs-reference {
  width: min(100%, 280px);
  margin: 22px auto 0;
}

/* small row of thumbnails sharing one caption (e.g. failed prints) */
.case-study .cs-gallery-row { margin: 22px 0 26px; }
.cs-gallery-row-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 700px) {
  .cs-title { font-size: 34px; }
  .cs-gallery-row-items { gap: 8px; }
  .cs-flow { flex-direction: column; align-items: stretch; }
  .cs-flow .arrow { transform: rotate(90deg); }
  .cs-gallery { grid-template-columns: 1fr; }
  .cs-gallery .closing { width: 100%; }
}

/* ---------- longer case studies (bloom) ---------- */
/* single hero image (portrait) centered above a full-width video */
.case-study .cs-hero {
  width: min(100%, 460px);
  margin: 26px auto 0;
}
.case-study .cs-video { margin-top: 26px; }
.case-study .cs-video video { aspect-ratio: 16 / 9; }

/* "my role" note under a section header */
.cs-section .cs-role {
  font-family: Caveat, cursive;
  font-size: 19px;
  color: var(--rose);
  margin: -4px 0 12px;
}

/* how-might-we callout */
.cs-section .cs-hmw {
  font-family: Judson, serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
  border-left: 2px solid var(--rose);
  padding: 4px 0 4px 18px;
  margin: 18px 0;
}

/* plain bulleted list */
.cs-section .cs-list {
  margin: 0 0 12px;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 640px;
}
.cs-section .cs-list li { margin-bottom: 4px; }

/* row of small numbered cards (no arrows) */
.cs-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0;
  margin: 16px 0 4px;
}
.cs-cards li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--rose);
  border-radius: 12px;
  padding: 12px 12px 14px;
  background: #fff;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.4;
}
.cs-card-num {
  font-family: Caveat, cursive;
  font-size: 20px;
  line-height: 1;
  color: var(--rose);
}

/* research session counts */
.cs-stats {
  list-style: none;
  padding: 0;
  margin: 12px 0 22px;
  max-width: 640px;
}
.cs-stats li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid #efdfe3;
  font-size: 15px;
  line-height: 1.5;
}
.cs-stats li:last-child { border-bottom: 1px solid #efdfe3; }
.cs-stat-num {
  font-family: 'Instrument Serif', serif;
  font-size: 34px;
  line-height: 1;
  color: var(--rose);
  text-align: right;
}

/* numbered insight cards */
.cs-insights {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0;
  margin: 16px 0 4px;
}
.cs-insights li {
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--rose);
  border-radius: 12px;
  padding: 16px 16px 14px;
  background: #fff;
}
.cs-insight-num {
  font-family: Caveat, cursive;
  font-size: 26px;
  line-height: 1;
  color: var(--rose);
  margin-bottom: 8px;
}
.cs-insights h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 8px;
}
.cs-insights p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 10px;
}
.cs-insights .cs-implication {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed #e6c9d0;
  font-size: 13.5px;
  margin-bottom: 0;
}
.cs-implication span {
  display: block;
  font-style: italic;
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 2px;
}

/* competitor comparison table */
.cs-table-wrap { overflow-x: auto; margin-top: 16px; }
.cs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}
.cs-table th, .cs-table td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid #efdfe3;
}
.cs-table thead th {
  font-style: italic;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--rose);
}
.cs-table tbody th {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: 17px;
  color: var(--ink);
  white-space: nowrap;
}
.cs-tag {
  display: inline-block;
  font-family: Caveat, cursive;
  font-size: 16px;
  line-height: 1;
  color: var(--rose);
  border: 1px solid var(--rose);
  border-radius: 999px;
  padding: 3px 9px 4px;
  white-space: nowrap;
}

/* two flower states side by side */
.cs-states {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 22px;
  margin-top: 18px;
}
.cs-states figure { display: flex; flex-direction: column; }
.cs-states img { flex: 1; min-height: 0; object-fit: cover; }
.cs-state-name {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

/* numbered, scannable steps */
.cs-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  max-width: 640px;
}
.cs-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px solid #efdfe3;
  font-size: 15px;
  line-height: 1.5;
}
.cs-steps li:last-child { border-bottom: 1px solid #efdfe3; }
.cs-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--rose);
  border-radius: 50%;
  font-family: Caveat, cursive;
  font-size: 20px;
  color: var(--rose);
  background: #fff;
}

/* AI features: numbered rows, with chat-bubble mockups */
.cs-features li { align-items: start; }
.cs-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  max-width: 360px;
}
.cs-chat-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  max-width: 100%;
}
.cs-chat-who {
  font-style: italic;
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 3px;
  margin-right: 4px;
}
.cs-section .cs-bubble {
  margin: 0;
  padding: 8px 14px;
  background: var(--rose);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  border-radius: 16px 16px 4px 16px;
  max-width: 100%;
}
.cs-chat-status {
  font-family: Caveat, cursive;
  font-size: 16px;
  line-height: 1.1;
  color: var(--rose);
  margin-top: 4px;
  margin-right: 4px;
}

/* full-width poster, click to open */
.case-study .cs-poster { margin-top: 16px; }
.cs-poster a { display: block; }

@media (max-width: 700px) {
  .cs-cards { grid-template-columns: 1fr; }
  .cs-insights { grid-template-columns: 1fr; }
  .cs-states { grid-template-columns: 1fr; }
  .cs-table th, .cs-table td { padding-right: 8px; }
  .cs-table tbody th { white-space: normal; }
}

/* ---------- fun page ---------- */
.fun-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 60px 20px 100px;
  text-align: center;
}
.coming-soon {
  font-family: Caveat, cursive;
  font-size: 30px;
  color: var(--rose);
  margin-top: 8px;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .home-center { padding: 48px 60px; }
  .doodle-spot { display: none; }
}
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: minmax(0, 383px); }
}
