/* MVP Maker Space — "innovator's notebook with a mentor's red pen"
   paper white, ink navy, pencil grey, red pen for annotations only,
   amber accent for shapes, highlighter for one or two small marks. */

:root {
  --paper: #ffffff;
  --sheet: #ffffff;
  --ink: #0a3556;          /* brand navy: headings, buttons, links */
  --ink-2: #134a75;
  --text: #212529;
  --accent: #f5a524;       /* warm amber accent, shapes only */
  --accent-text: #a85a00;  /* amber dark enough for text */
  --tint: #f2f6fa;
  --pencil: #5d6677;
  --rule: #d5dde7;
  --red: #c8283a;
  --marker: #ffe14a;

  --f-display: "Sarabun", system-ui, sans-serif;
  --f-body: "Sarabun", system-ui, sans-serif;
  --f-hand: "Sriracha", "Sarabun", cursive;

  --wrap: 1120px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-tap-highlight-color: rgba(200, 40, 58, 0.15);
  touch-action: manipulation;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background-color: #ffffff;
}

::selection { background: var(--marker); color: var(--ink); }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h) + 16px);
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.22; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--ink-2); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
mark { background: linear-gradient(transparent 58%, var(--marker) 58%); color: inherit; padding: 0 2px; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.measure { max-width: 36rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip:focus { top: 12px; color: #fff; }

/* Sections: one spacing rule, set on the section element only */
.block { padding-block: clamp(56px, 8vw, 96px); }
.block + .block { border-top: 1px solid var(--rule); }
.block.tinted { background: var(--tint); border-top: 0; }
.block.tinted + .block { border-top: 0; }
.block-head { margin-bottom: 40px; }
.block-head p { color: var(--pencil); max-width: 36rem; }
.block-head h2::after { content: ""; display: block; width: 48px; height: 3px; background: var(--accent); margin-top: 14px; border-radius: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-body); font-weight: 600; font-size: 1rem; line-height: 1.4;
  padding: 13px 24px; border-radius: 8px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn:active { background: var(--ink); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); border-color: var(--ink); }
.btn-small { padding: 8px 16px; font-size: 0.95rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.site-header .wrap, .site-footer .wrap { padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px); }

/* KitLabb logo: K mark with an amber spark, then the wordmark (assets/logo.svg, logo-white.svg on navy) */
.brand { display: inline-flex; align-items: center; flex: none; border-radius: 6px; }
.brand img { height: 38px; width: auto; }
.site-footer .brand img { height: 42px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) {
  display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font-weight: 500;
}
.nav-links a:not(.btn):hover { color: var(--ink-2); }
.nav-links a:not(.btn)[aria-current="page"] {
  text-decoration: underline solid var(--accent); text-decoration-thickness: 3px; text-underline-offset: 0.5em;
}
.nav-links .btn { margin-left: 8px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--rule); border-radius: 8px;
  background: var(--sheet); color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule); padding: 8px 16px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--rule); }
  .nav-links .btn { margin: 16px 0 0; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(28px, 4vw, 48px) 0; }
/* text + values on the left, notebook on the right, problems band full width right under them */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  grid-template-areas: "text sheet" "values sheet" "pains pains";
  grid-template-rows: auto 1fr auto; /* values sit right under the text; spare height goes below them */
  column-gap: clamp(32px, 5vw, 72px); row-gap: 20px; align-items: start;
}
.hero-text { grid-area: text; }
.hero .tagline mark { white-space: nowrap; }
.hero-text .lead { margin-bottom: 0; }
/* the big name uses the logo's wide geometric face, with the logo's single-storey a */
.hero h1 { margin-bottom: 0.2em; font-family: "Lexend Exa", var(--f-display); font-weight: 400; letter-spacing: -0.02em; font-feature-settings: "ss01"; }

.hero-values { grid-area: values; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.hero-values li { position: relative; padding-left: 32px; line-height: 1.55; }
.hero-values li::before {
  content: ""; position: absolute; left: 6px; top: 4px; width: 9px; height: 16px;
  border-right: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(40deg);
}
.hero-values strong { display: block; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.hero-values span { color: var(--pencil); font-size: 0.95rem; }

.pains-band {
  grid-area: pains; margin-top: clamp(20px, 3vw, 36px); padding-block: clamp(36px, 5vw, 56px);
  background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax);
}
.pains-band .block-head { margin-bottom: 28px; }
.pains-band .block-head h2 { margin-bottom: 0.3em; }
.hero .tagline {
  font-family: var(--f-display); font-weight: 600; color: var(--ink);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.45; max-width: 22em; margin-bottom: 0.8em;
}
.hero .lead { font-size: 1.08rem; color: var(--text); max-width: 32rem; }
.hero-meta { margin-top: 28px; color: var(--pencil); font-size: 0.95rem; }
.hero-meta strong { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "pains" "values" "sheet"; grid-template-rows: none; }
  .pains-band { margin-block: 8px 12px; }
  .hero-reel { width: 100%; max-width: 30rem; }
  .reel { height: 520px; }
  .hero + .block { padding-top: clamp(40px, 8vw, 64px); }
}
@media (max-width: 540px) { .hero-values { grid-template-columns: minmax(0, 1fr); } }

/* Notebook sheet */
.sheet {
  position: relative; margin: 0; background: #fbfcfd;
  border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(26, 34, 56, 0.35);
  padding: 8px;
}
.sheet svg { width: 100%; height: auto; display: block; }
.sheet img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.sheet figcaption { font-size: 0.85rem; color: var(--pencil); padding: 4px 10px 8px; }

.sk-pencil { fill: none; stroke: var(--pencil); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sk-fill { fill: #eef2f7; }
.sk-water { fill: #dbe8f6; }
.sk-label { font-family: var(--f-hand); fill: var(--pencil); font-size: 15px; }
.sk-title { font-family: var(--f-hand); fill: var(--ink); font-size: 22px; }
.sk-red { fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sk-red-text { font-family: var(--f-hand); fill: var(--red); font-size: 16px; }
.sk-margin { stroke: #f2b8bf; stroke-width: 1.5; }
.sk-line { stroke: #e8edf3; stroke-width: 1; }
.sk-stamp { fill: var(--sheet); stroke: var(--ink); stroke-width: 2; }
.sk-stamp-now { fill: var(--marker); stroke: var(--ink); stroke-width: 2; }
.sk-stamp-text { font-family: var(--f-display); font-weight: 700; fill: var(--ink); font-size: 14px; }
.sk-stamp-cap { font-family: var(--f-body); fill: var(--pencil); font-size: 13px; }

/* The one orchestrated moment: the red pen draws in, then its notes appear */
@media (prefers-reduced-motion: no-preference) {
  .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.7s ease-out forwards; }
  .draw.d1 { animation-delay: 0.5s; }
  .draw.d2 { animation-delay: 1.3s; }
  .draw.d3 { animation-delay: 2.1s; }
  .note { opacity: 0; animation: appear 0.4s ease-out forwards; }
  .note.d1 { animation-delay: 1s; }
  .note.d2 { animation-delay: 1.8s; }
  .note.d3 { animation-delay: 2.6s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* ---------- Pain points (home) ---------- */
.pains { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pains li {
  position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px;
  padding: 20px 22px 20px 60px;
  font-family: var(--f-display); font-weight: 600; color: var(--ink); font-size: 1.12rem; line-height: 1.5;
}
.pains li::before {
  content: ""; position: absolute; left: 22px; top: 23px; width: 20px; height: 20px;
  border: 2px solid var(--ink); border-radius: 4px; background: #fff;
}
.pains li::after {
  content: ""; position: absolute; left: 28px; top: 23px; width: 8px; height: 14px;
  border-right: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(40deg);
}
@media (max-width: 760px) { .pains { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Project reel (home hero) ----------
   Two columns of project cards in the notebook frame where the hero photo was.
   Without JS, or with reduced motion: each column scrolls on its own.
   With JS (.is-looping): each list is cloned and the columns glide upward
   forever at different speeds; hover, focus or the pause button stops them. */
.hero-reel {
  grid-area: sheet; align-self: stretch; display: flex; flex-direction: column; margin: 0;
  background: #fbfcfd; border: 1px solid var(--rule); border-radius: 4px; padding: 8px;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(26, 34, 56, 0.35);
}
.reel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; height: clamp(440px, 58vh, 540px); flex: 1 0 auto; }
.reel-col { overflow-y: auto; scrollbar-width: none; border-radius: 2px; }
.reel-col::-webkit-scrollbar { display: none; }
.reel-list { list-style: none; margin: 0; padding: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.reel-list a {
  display: block; text-decoration: none; color: var(--text); background: #fff;
  border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reel-list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--tint); border-bottom: 1px solid var(--rule); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reel-body { display: block; padding: 8px 10px 10px; }
.reel-body strong { display: block; font-family: var(--f-display); font-weight: 700; color: var(--ink); font-size: 0.88rem; line-height: 1.35; letter-spacing: 0.01em; }
.reel-body span { display: block; font-size: 0.8rem; line-height: 1.45; color: var(--pencil); }
.reel-list a:hover, .reel-list a:focus-visible { border-color: var(--ink); color: var(--text); box-shadow: 0 12px 24px -18px rgba(10, 53, 86, 0.6); }
.reel-list a:hover img { transform: scale(1.05); }
.reel-list a:focus-visible { outline-offset: -2px; }

.reel-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px 0 10px; font-size: 0.9rem; }
.reel-foot a { font-weight: 600; color: var(--ink); }
.reel-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink); cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 6px; transition: border-color 0.15s;
}
.reel-toggle[hidden] { display: none; }
.reel-toggle:hover { border-color: var(--rule); }
.reel-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.reel-toggle .i-play { display: none; fill: currentColor; stroke-width: 1.5; }
.reel-toggle[aria-pressed="true"] .i-pause { display: none; }
.reel-toggle[aria-pressed="true"] .i-play { display: inline; }

@media (prefers-reduced-motion: no-preference) {
  .reel.is-looping {
    -webkit-mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(transparent, #000 9%, #000 91%, transparent);
  }
  .is-looping .reel-col { overflow: hidden; }
  .is-looping .reel-track { animation: reel-up var(--reel-duration, 40s) linear var(--reel-delay, 0s) infinite; }
  .is-looping:hover .reel-track, .is-looping:focus-within .reel-track, .is-looping.paused .reel-track { animation-play-state: paused; }

  /* on load the cards rise into the frame one after another */
  .reel.will-reveal .reel-list a { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) calc(min(var(--i, 0), 6) * 90ms + 150ms) both; }
}
@keyframes reel-up { to { transform: translateY(-50%); } }
@keyframes rise { from { opacity: 0; translate: 0 48px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .reel-list[aria-hidden="true"], .reel-toggle { display: none; } }

/* Closing CTA */
.closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.closing h2 { margin: 0 0 6px; }
.closing p { margin: 0; color: var(--pencil); }

/* ---------- About (home) ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 18rem); gap: clamp(32px, 6vw, 80px); align-items: start; }
.margin-note {
  font-family: var(--f-display); font-weight: 600; color: var(--ink); font-size: 1.3rem; line-height: 1.5;
  border-left: 3px solid var(--accent); padding-left: 20px; margin: 8px 0 0;
}
.margin-note footer { font-family: var(--f-body); color: var(--pencil); font-size: 0.9rem; margin-top: 10px; }
@media (max-width: 820px) { .story { grid-template-columns: minmax(0, 1fr); } }

.values { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.values li { padding: 18px 0; border-top: 1px solid var(--rule); }
.values strong { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; display: block; margin-bottom: 2px; color: var(--ink); }
.values span { color: var(--pencil); }
@media (max-width: 760px) { .values { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Inner page header ---------- */
.page-head { padding-block: clamp(40px, 6vw, 72px) 8px; }
.page-head p { font-size: 1.12rem; max-width: 38rem; }
.page-head + .block { padding-top: clamp(24px, 4vw, 40px); }

/* ---------- Process flowchart (services) ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.flow li {
  position: relative; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 10px;
  padding: 18px 20px; display: flex; flex-direction: column; justify-content: center;
}
.flow .step-num { font-family: var(--f-display); font-weight: 700; color: var(--accent-text); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.flow strong { font-family: var(--f-display); font-weight: 600; color: var(--ink); font-size: 1.15rem; line-height: 1.35; }
.flow li:not(:last-child)::after {
  content: ""; position: absolute; right: -27px; top: 50%; width: 13px; height: 13px;
  border-right: 3px solid var(--accent); border-top: 3px solid var(--accent);
  transform: translateY(-50%) rotate(45deg);
}
@media (max-width: 860px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .flow li:not(:last-child)::after { right: auto; left: 30px; top: auto; bottom: -23px; transform: rotate(135deg); }
}

/* ---------- Services ---------- */
.services { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.flow + .services { margin-top: clamp(28px, 4vw, 44px); }
.service {
  display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr) minmax(0, 12rem); gap: 32px;
  padding-block: 36px; border-bottom: 1px solid var(--rule);
}
.service .no { font-family: var(--f-display); font-weight: 700; color: var(--accent-text); font-size: 0.9rem; margin: 0 0 2px; }
.service h2 { font-size: 1.4rem; margin-bottom: 12px; }
.service .for { margin: 0; font-size: 0.95rem; color: var(--ink); }
.service .for strong { display: block; color: var(--pencil); font-weight: 600; font-size: 0.85rem; }
.service ul { margin: 0; padding-left: 1.1em; }
.service li { margin-bottom: 4px; }
.service .body p { margin-bottom: 10px; }
.service dl { margin: 0; font-size: 0.92rem; }
.service dt { color: var(--pencil); }
.service dd { margin: 0 0 10px; font-weight: 600; color: var(--ink); }

.covers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 16px 0 0; max-width: 18rem; }
.covers span {
  font-size: 0.75rem; text-align: center; padding: 3px 2px; border-radius: 4px; white-space: nowrap;
  background: var(--tint); color: var(--pencil); border: 1px solid var(--rule);
}
.covers .on { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .service { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .service dl { display: flex; flex-wrap: wrap; gap: 4px 24px; }
  .service dd { margin-bottom: 0; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--ink-2); }
.faq details p { margin: 0 0 18px; color: var(--text); max-width: 40rem; }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(30rem, 100%), 1fr)); gap: 56px 48px; list-style: none; padding: 0; margin: 0; }
.member { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); gap: 24px; align-items: start; }
.photo {
  aspect-ratio: 4 / 5; background: var(--sheet); border: 1px solid var(--rule); border-radius: 4px;
  display: grid; place-items: center; padding: 8px;
  box-shadow: 0 12px 28px -22px rgba(26, 34, 56, 0.4);
}
.photo span {
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 2px;
  background: #eef2f7; font-family: var(--f-display); font-weight: 700; font-size: 2.2rem; color: var(--pencil);
}
.member h2 { font-size: 1.25rem; margin-bottom: 10px; }
.bio { margin: 0 0 16px; font-size: 0.93rem; }
.bio div { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); }
.bio dt { color: var(--pencil); }
.bio dd { margin: 0; color: var(--ink); font-weight: 500; }
.bio dd.offers ul { margin: 0; padding-left: 1.1em; font-size: inherit; }
.bio dd.offers li { margin-bottom: 4px; line-height: 1.55; }
.member h3 { font-size: 0.98rem; margin: 0 0 6px; }
.member ul { margin: 0; padding-left: 1.1em; font-size: 0.93rem; }
.member li { margin-bottom: 4px; }
.member ul + h3 { margin-top: 18px; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.member-link { margin: 16px 0 0; font-size: 0.93rem; font-weight: 600; }
@media (max-width: 540px) {
  .member { grid-template-columns: minmax(0, 1fr); }
  .member .photo { max-width: 11rem; }
  .bio div { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
/* member awards grouped by project */
.member .project-list { list-style: none; padding-left: 0; margin-bottom: 20px; }
.project-list > li { margin-bottom: 14px; }
.project-list > li > strong { display: block; font-family: var(--f-display); font-weight: 700; color: var(--ink); font-size: 1rem; }
.project-list .proj-desc { display: block; color: var(--pencil); font-size: 0.9rem; line-height: 1.5; margin-bottom: 4px; }
.project-list ul { margin-top: 2px; }
.member h3 + ul, .member h3 + .project-list { margin-top: 0; }
.member ul + h3 { margin-top: 18px; }
.placeholder-note { margin-top: 32px; color: var(--pencil); font-size: 0.9rem; }

/* ---------- Works ---------- */
/* type filter: one row of toggles above the grid */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters button {
  font: inherit; font-size: 0.95rem; font-weight: 600; line-height: 1.4; cursor: pointer;
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--rule);
  background: var(--sheet); color: var(--ink); transition: border-color 0.15s, background-color 0.15s;
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-count { color: var(--pencil); font-size: 0.9rem; margin: 0 0 28px; min-height: 1.5em; }

/* three projects per row */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 960px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .projects { grid-template-columns: minmax(0, 1fr); } }
.project { background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.project[hidden] { display: none; }
.project-img { aspect-ratio: 4 / 3; background: var(--tint); border-bottom: 1px solid var(--rule); }
.project-img img { width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.project h3 { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: 0.01em; }
.project .meta { margin: 0 0 8px; color: var(--pencil); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.project-body > p { font-size: 0.93rem; line-height: 1.6; margin: 0; }
.project .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.project .tags span {
  font-size: 0.75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: var(--tint); color: var(--ink); border: 1px solid var(--rule);
}
/* awards as the mentor's red-pen note, pinned to the card's foot */
.project .award {
  margin-top: auto; padding-top: 14px; font-family: var(--f-hand); color: var(--red);
  font-size: 0.95rem; line-height: 1.5;
}
/* no photo yet: a lined notebook page with the project name written on it */
.project-img.sketch {
  display: grid; place-content: center; text-align: center; gap: 4px; padding: 16px;
  background-color: #fbfcfd;
  background-image:
    linear-gradient(90deg, transparent 38px, #f2b8bf 38px, #f2b8bf 39.5px, transparent 39.5px),
    repeating-linear-gradient(transparent 0 27px, #e8edf3 27px 28px);
}
.project-img.sketch span { font-family: var(--f-hand); color: var(--ink); font-size: 1.7rem; line-height: 1.2; }
.project-img.sketch small { font-family: var(--f-hand); color: var(--pencil); font-size: 0.95rem; }

.empty {
  border: 2px dashed var(--rule); border-radius: 12px; padding: clamp(32px, 6vw, 64px) 24px; text-align: center;
}
.empty .hand { font-family: var(--f-hand); color: var(--red); font-size: 1.5rem; margin-bottom: 8px; }
.empty p { color: var(--pencil); max-width: 30rem; margin-inline: auto; }
.empty p:last-child { margin-bottom: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.channels { margin: 0; }
.channels div { padding: 14px 0; border-top: 1px solid var(--rule); }
.channels dt { color: var(--pencil); font-size: 0.9rem; }
.channels dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.line-row dd { display: grid; justify-items: start; gap: 8px; }
.line-row small { font-weight: 400; color: var(--pencil); font-size: 0.85rem; }

/* LINE: QR + button */
.line-card { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: clamp(24px, 4vw, 40px); display: grid; justify-items: start; gap: 16px; }
.line-card h2 { margin: 0; font-size: 1.5rem; }
.line-card p { margin: 0; color: var(--pencil); max-width: 30rem; }
.line-card .line-qr { width: 220px; }
.line-logo { height: 44px; width: auto; }
.line-qr { width: 160px; height: auto; border: 1px solid var(--rule); border-radius: 8px; background: #fff; padding: 6px; }
.line-cta { display: flex; align-items: center; gap: 16px; }
.line-cta .line-qr { width: 112px; }
.btn-line { background: #00843d; border-color: #00843d; color: #fff; }
.btn-line:hover { background: #006e33; border-color: #006e33; color: #fff; }
@media (max-width: 540px) { .line-cta { flex-direction: column; align-items: flex-start; } }
/* LINE card comes first in the page (and first on phones); on wide screens it sits in the right column */
.contact .contact-info { grid-column: 1; grid-row: 1; }
.contact .line-card { grid-column: 2; grid-row: 1; }
@media (max-width: 860px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact .contact-info, .contact .line-card { grid-column: auto; grid-row: auto; }
}

.form-sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: clamp(24px, 4vw, 40px); }
.form-sheet h2 { font-size: 1.5rem; }
.field { margin-bottom: 18px; min-width: 0; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--pencil); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; line-height: 1.5; padding: 11px 14px;
  border: 1.5px solid var(--rule); border-radius: 8px; background-color: #fff; color: var(--ink);
  transition: border-color 0.15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--pencil); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 1px; border-color: var(--ink); }
.field textarea { min-height: 128px; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231a2238' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field [aria-invalid="true"] { border-color: var(--red); }
.field-error { color: var(--red); font-size: 0.88rem; margin: 6px 0 0; }
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 540px) { .field-pair { grid-template-columns: minmax(0, 1fr); } }
.form-sheet .btn { width: 100%; margin-top: 4px; }
.form-done { margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--ink); background: var(--tint); }
.form-done:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d6e3; padding-block: 56px 32px; }
.site-footer a { color: #ffffff; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.foot h2 { font-size: 1rem; margin-bottom: 10px; color: #ffffff; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 6px; }
.foot p { color: #c9d6e3; max-width: 22rem; margin-top: 10px; }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); color: #9fb3c8; font-size: 0.88rem; }
.site-footer :focus-visible { outline-color: var(--accent); }
@media (max-width: 760px) { .foot { grid-template-columns: minmax(0, 1fr); } }

/* good-luck charm in the footer: loaded on every page, never seen or clicked */
.luck { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
