/* ---------- Color scheme: Red & Sage ---------- */
:root {
  --red: #D54757;
  --white: #FFFFFF;
  --porcelain: #F7F3F0;
  --sage: #6F7F62;
  --charcoal: #2B2224;

  --bg: var(--white);
  --surface: var(--porcelain);
  --surface-strong: #EAE3DE;
  --text: var(--charcoal);
  --muted: #7A6F71;
  --border: #E6DED9;
  --accent: var(--red);
  --on-accent: var(--white);

  --container-w: 1040px;
  --radius: 18px;
  --radius-pill: 999px;
  --font: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background: faint rectangle grid, grain and vignette ---------- */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.92) 100%),
    linear-gradient(rgba(43, 34, 36, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 34, 36, 0.05) 1px, transparent 1px),
    radial-gradient(ellipse 85% 75% at 50% 45%, #efe9e4 0%, #f6f2ee 55%, #ffffff 100%);
  background-size: auto, 84px 56px, 84px 56px, auto;
}

body::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: 0.07;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2 { line-height: 1.05; letter-spacing: -0.03em; }

/* ---------- Floating pill ---------- */
.site-pill {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 0 16px;
  pointer-events: none;
}

.nav-link {
  pointer-events: auto;
  appearance: none;
  background: none;
  border: 0;
  padding: 12px 20px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  background: rgba(238, 234, 230, 0.72);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: 0 14px 34px -18px rgba(43, 34, 36, 0.35);
}
.nav-link:hover { color: var(--red); }
.nav-link:focus-visible { outline: 2px solid var(--sage); outline-offset: 4px; border-radius: 6px; }

.pill {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  width: min(380px, 100%);
  flex: 0 1 380px;
  padding: 11px 16px;
  background: rgba(238, 234, 230, 0.72);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: 0 14px 34px -18px rgba(43, 34, 36, 0.35);
}

.pill-logo { display: flex; align-items: center; }
.pill-logo img { width: 40px; height: 40px; object-fit: cover; border-radius: 11px; }

.pill-name {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.pill-name strong { font-weight: 400; }

.pill-mail { display: flex; align-items: center; justify-content: flex-end; color: var(--text); }
.pill-mail:hover { color: var(--red); }
.pill-mail svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

main { padding-top: 84px; }

/* ---------- Work ---------- */
.work { padding: 20px 0 56px; }

.intro {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--muted);
  margin-bottom: 36px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--red);
  margin-bottom: 28px;
}

.intro-hero {
  font-size: clamp(2rem, 7.2vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text);
  text-align: center;
  text-wrap: balance;
  margin: 72px 0 56px;
  padding-bottom: 36px;
  border-bottom: 2px solid var(--red);
}
.featured { margin-bottom: 0; }

.feature-list { display: flex; flex-direction: column; gap: 84px; }

.feature { display: block; }

.feature-media {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
}
.feature-media { aspect-ratio: 2 / 1; }
.feature-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.feature:hover .feature-media img { transform: scale(1.015); }

.feature-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title tags"
    "desc  desc";
  gap: 10px 32px;
  align-items: start;
  margin-top: 26px;
}

.feature-title { grid-area: title; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.feature-info .tags { grid-area: tags; justify-content: flex-end; padding-top: 3px; }
.feature-desc { grid-area: desc; max-width: 560px; color: var(--muted); font-size: 1rem; line-height: 1.55; }

.featured-more { margin-top: 56px; text-align: center; }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 36px;
}

.card { display: block; }

.card-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface), var(--surface-strong));
  transition: transform 0.3s ease;
}
.card:hover .card-media { transform: scale(1.015); }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* Work cards: title and tags share one line on desktop; they wrap on narrower screens */
@media (min-width: 1001px) {
  .card-meta { flex-wrap: nowrap; }
  .card .tags { flex-wrap: nowrap; flex-shrink: 0; gap: 6px; }
  .card .tag { padding: 8px; }
  .card-title { white-space: nowrap; }
}

.tag {
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.tag-design {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  font-weight: 600;
}

.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.card-title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- Project page ---------- */
.project-page, .work-page { padding: 112px 0 90px; }

.back-link { display: inline-block; font-size: 0.9rem; color: var(--muted); margin-bottom: 28px; }
.back-link:hover { color: var(--red); }

.project-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--red);
  margin-bottom: 18px;
}

/* ---------- Case study header ---------- */
.case-head { margin-bottom: 56px; }

.case-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}

.case-title {
  font-size: clamp(3rem, 11vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--text);
}

.case-lede {
  max-width: none;
  margin-top: 28px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
  padding-top: 26px;
  border-top: 2px solid var(--red);
}

.case-meta div { padding: 0 24px; border-left: 2px solid var(--red); }
.case-meta div:first-child { padding-left: 0; border-left: 0; }

.case-meta dt {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.case-meta dd { font-size: 1.05rem; line-height: 1.35; min-height: 1.35em; }

.case-section { max-width: 920px; margin-bottom: 64px; }

.case-label {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.case-text {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.case-text-follow { margin-top: 18px; }

.case-group-label {
  width: 100%;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--white);
  background: var(--red);
  border-radius: 4px;
  padding: 7px 16px;
  margin: 64px 0 18px;
}
.todo { background: rgba(213, 71, 87, 0.12); border-radius: 4px; padding: 0 4px; font-style: normal; }
.case-note { max-width: 920px; margin: 22px 0 0; color: #665c5e; font-size: 1.05rem; line-height: 1.6; }
.case-note .todo, .nb { white-space: nowrap; }
.case-note-wide { max-width: none; text-wrap: wrap; }
.sent { display: block; text-wrap: pretty; }
.sent + .sent { margin-top: 6px; }
.keep { white-space: nowrap; }
/* even line lengths: no stranded last-line words */
.case-note, .case-lede, .case-intro, .case-steps li { text-wrap: balance; }
.case-text { text-wrap: pretty; }
.label-link { color: inherit; text-decoration: none; padding: 4px 6px; margin-left: -2px; }
.case-intro { max-width: 680px; margin: -2px 0 22px; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }

.case-after { margin-top: 72px; margin-bottom: 0; }

.case-steps { list-style: none; counter-reset: step; }
.case-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.case-steps li:last-child { border-bottom: 1px solid var(--border); }
.case-steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--red);
  padding-top: 0.5em;
}

.case-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 2px solid var(--red);
}
.case-next span {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.case-next strong { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; }
.case-next:hover strong { color: var(--red); }

.ext-link {
  font-size: 1.1rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 26px;
}
.ext-link:hover { border-color: var(--red); color: var(--red); }

.gallery { display: block; }
.mural-wall .g-row { margin-bottom: 4px; }
.mural-wall .g-row:last-child { margin-bottom: 0; }
.gallery-continued { margin-top: 48px; }
.gallery-closer { margin-top: 64px; }

.g-row { display: flex; gap: 4px; margin-bottom: 10px; }
.g-row:last-child { margin-bottom: 0; }
.g-row.g-tight { margin-bottom: 4px; }
.g-row.g-tight:last-child { margin-bottom: 0; }

.g-row img {
  flex-basis: 0;
  flex-shrink: 1;
  min-width: 0;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--surface);
}

/* ---------- Filter bar (sliding highlight) ---------- */
.filter {
  position: relative;
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 44px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter::-webkit-scrollbar { display: none; }

.filter-indicator {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 0;
  background: var(--red);
  border-radius: 8px;
  transition: transform 0.35s cubic-bezier(0.5, 0, 0.2, 1), width 0.35s cubic-bezier(0.5, 0, 0.2, 1);
}

.filter-btn {
  position: relative;
  z-index: 1;
  flex: none;
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: 6px 22px;
  border-radius: 8px;
  white-space: nowrap;
}
.filter-btn:hover { color: var(--red); }
.filter-btn.is-active, .filter-btn.is-active:hover { color: var(--white); }
.filter-btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 2px; }

.card[hidden] { display: none; }
.work-empty { color: var(--muted); padding: 40px 0; }

/* ---------- Reviews ---------- */
.section-title-star { display: flex; align-items: center; gap: 12px; }
.section-title-star::before { content: ""; flex: none; width: 0.8em; height: 0.8em; background: url("images/star.png") center / contain no-repeat; }
.reviews { padding: 40px 0 20px; }
.review { display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.review-quote { margin: 0; font-size: 1rem; line-height: 1.55; letter-spacing: -0.01em; }
.review-by { display: grid; gap: 2px; font-size: 0.9rem; }
.review { position: relative; }
.review-date { position: absolute; top: 24px; right: 28px; font-size: 0.9rem; line-height: 1.4; color: var(--muted); white-space: nowrap; }
.review-name { font-weight: 600; }
.review-role { color: var(--muted); }
@media (max-width: 640px) {
  .review-date { position: static; order: -1; align-self: flex-end; }
  .review:has(.review-date) .review-quote { padding-right: 0; }
}
.review-link { margin-top: auto; font-size: 0.9rem; color: var(--red); text-decoration: none; }
.review-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.case-review { max-width: none; margin: 48px 0 0; }
.case-review + .case-review { margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 36px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
}

.footer-cta {
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  text-align: center;
}

.footer-cta-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: var(--text);
  cursor: pointer;
}
.footer-cta-btn {
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.12em;
  text-decoration-color: var(--red);
}
.footer-cta-btn:hover { color: var(--red); }
.footer-cta-btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 6px; border-radius: 6px; }

.contact-dialog {
  margin: auto;
  width: min(560px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: var(--text);
}
.contact-dialog::backdrop {
  background: rgba(43, 34, 36, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-close:hover { color: var(--red); }

.contact-card {
  position: relative;
  width: 100%;
  padding: 48px 32px 44px;
  text-align: center;
  background: var(--white);
  border: 2px solid var(--text);
  border-radius: 30px;
  box-shadow: 0 26px 34px -20px rgba(43, 34, 36, 0.5);
}

.contact-avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 22px;
  border-radius: 50%;
  object-fit: cover;
}

.contact-name { font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.contact-email { margin-top: 6px; color: var(--muted); font-size: 1.05rem; }

.contact-btn {
  display: inline-block;
  margin-top: 30px;
  min-width: 240px;
  padding: 16px 40px;
  background: var(--red);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: 999px;
}
.contact-btn:hover { background: #c23a49; }

.contact-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 26px;
  font-size: 0.95rem;
  color: var(--red);
}
.contact-social a:hover { text-decoration: underline; text-underline-offset: 4px; }

.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .container { padding: 0 20px; }
  .work { padding: 28px 0 40px; }
  .work-grid { grid-template-columns: 1fr; gap: 44px; }
  .featured { margin-bottom: 0; }
  .feature-list { gap: 56px; }
  .feature-info {
    grid-template-columns: 1fr;
    grid-template-areas: "title" "tags" "desc";
    gap: 12px;
    margin-top: 18px;
  }
  .feature-info .tags { justify-content: flex-start; }
  .feature-media { border-radius: 16px; }
  .filter-btn { padding: 6px 14px; font-size: 0.82rem; }
  .case-meta { grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .case-meta div { padding: 0 16px; }
  .case-meta div:nth-child(odd) { padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card-media, .filter-indicator, .feature-media img { transition: none; }
}

@media (max-width: 640px) {
  .case-note .todo, .nb { white-space: normal; }
  /* Phones (fallback if the script did not regroup the gallery): galleries wrap into pairs. min-width forces two per line; flex-grow (set inline from each image's aspect ratio) keeps pairs level, and align-items stops the browser from stretching images to match a taller neighbour. */
  .gallery:not(.is-regrouped) .g-row { flex-wrap: wrap; align-items: flex-start; justify-content: center; max-width: none !important; }
  .gallery:not(.is-regrouped) .g-row img { flex-basis: 0; min-width: calc(40% - 2px); }
}

/* Tablets: three per line instead of five or six squeezed into one row. */
@media (min-width: 641px) and (max-width: 900px) {
  .gallery:not(.is-regrouped) .g-row { flex-wrap: wrap; align-items: flex-start; justify-content: center; }
  .gallery:not(.is-regrouped) .g-row img { flex-basis: 0; min-width: calc(30% - 3px); }
}

/* Very small phones: let the no-break phrases wrap so nothing pushes the page sideways. */
@media (max-width: 360px) {
  .keep, .nb, .nw, .case-note .todo { white-space: normal; }
}

/* ---------- Mural image viewer ---------- */
.mural-wall img { cursor: zoom-in; position: relative; transition: transform 0.3s ease; }
@media (hover: hover) { .mural-wall img:hover { transform: scale(1.015); z-index: 1; } }
@media (prefers-reduced-motion: reduce) { .mural-wall img { transition: none; } }
.mural-wall img:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.work-dialog { margin: auto; width: min(1040px, calc(100% - 24px)); max-width: none; max-height: calc(100vh - 24px); padding: 0; border: 0; background: transparent; overflow: visible; color: var(--text); }
.work-dialog::backdrop { background: rgba(43, 34, 36, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.work-card { position: relative; background: var(--white); border-radius: 22px; padding: 18px 18px 22px; box-shadow: 0 26px 34px -20px rgba(43, 34, 36, 0.5); }
.work-stage { position: relative; display: grid; place-items: center; background: var(--surface); border-radius: 14px; overflow: hidden; }
.work-stage img { display: block; max-width: 100%; max-height: calc(100vh - 220px); width: auto; height: auto; object-fit: contain; }
.work-info { padding: 18px 8px 0; }
.work-head { display: flex; align-items: baseline; gap: 6px; }
.work-head a { font-size: 1.2rem; }
.work-info h2 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); letter-spacing: -0.02em; }
.work-info p { margin-top: 8px; color: var(--muted); line-height: 1.55; max-width: 720px; }
.work-close, .work-nav { position: absolute; display: grid; place-items: center; appearance: none; border: 0; border-radius: 50%; background: var(--white); color: var(--text); line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(43, 34, 36, 0.25); }
.work-close { z-index: 2; top: 26px; right: 26px; width: 38px; height: 38px; font-size: 1.5rem; }
.work-nav { top: 50%; transform: translateY(-50%); width: 42px; height: 42px; font-size: 1.8rem; padding-bottom: 3px; }
.work-prev { left: 8px; }
.work-next { right: 8px; }
.work-close:hover, .work-nav:hover { color: var(--red); }

@media (max-width: 720px) {
  .site-pill { gap: 8px; padding: 0 10px; }
  .nav-link { font-size: 0.82rem; padding: 10px 11px; border-radius: 18px; }
  .pill { grid-template-columns: 34px 1fr 28px; padding: 9px 12px; flex: 0 1 auto; }
  .pill-logo img { width: 34px; height: 34px; border-radius: 9px; }
  .pill-name { font-size: 0.95rem; padding: 0 8px; }
  .pill-mail svg { width: 24px; height: 24px; }
}
@media (max-width: 380px) {
  .site-pill { gap: 6px; padding: 0 8px; }
  .nav-link { font-size: 0.78rem; padding: 9px 9px; }
  .pill { padding: 8px 9px; }
  .pill-name { font-size: 0.85rem; padding: 0 4px; }
}

/* Wider, larger case-study notes (trial on Patchwork) */
.notes-wide .case-note { max-width: none; font-size: 1.2rem; line-height: 1.6; text-wrap: pretty; }
.notes-wide .case-note .sent { text-wrap: pretty; }

.review-tag { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); line-height: 1.3; }

/* ---------- Testimonials: arrows ---------- */
.review-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; outline-offset: 4px; }
.review-track::-webkit-scrollbar { display: none; }
.review-track .review { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
@media (min-width: 900px) { .review-track .review { flex-basis: calc((100% - 20px) / 2); } }
.review-track .review-quote { padding-right: 0; flex-grow: 1; }
.review-track .review-by { min-height: calc(3 * 1.6em + 4px); align-content: start; }
.review-track .review:not(:has(.review-link)) .review-by { margin-bottom: calc(0.9rem * 1.6 + 18px); }
.review-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.review-arrow { width: 42px; height: 42px; display: grid; place-items: center; appearance: none; border: 1px solid var(--border); border-radius: 50%; background: var(--white); color: var(--text); font-size: 1.6rem; line-height: 1; padding-bottom: 3px; cursor: pointer; }
.review-arrow:hover { color: var(--red); border-color: var(--red); }
.review-arrow[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.review-arrow[aria-disabled="true"]:hover { color: var(--text); border-color: var(--border); }
.review-dots { display: flex; gap: 8px; }
.review-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.review-dot.is-active { background: var(--red); }
.role-link { color: var(--red); text-decoration: none; padding: 2px 4px; }
.role-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) {
  .review-track .review-by { min-height: calc(4 * 1.6em + 6px); }
  .review-track .review:not(:has(.review-link)) .review-by { margin-bottom: 0; }
}

/* ---------- About page ---------- */
.about-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: center; min-height: calc(100vh - 260px); }
.about-pfp img { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; border-radius: 32px; }
.about-title { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; color: var(--text); padding-bottom: 28px; border-bottom: 2px solid var(--red); }
.about-text { margin-top: 36px; display: grid; gap: 22px; font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.65; }
.about-text p { text-wrap: balance; max-width: 36em; }
.hl { background: rgba(213, 71, 87, 0.12); border-radius: 4px; padding: 0 4px; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (max-width: 800px) {
  .about-layout { grid-template-columns: 1fr; gap: 36px; min-height: 0; }
  .about-pfp img { max-width: 240px; }
}
.about-text .keep { white-space: normal; }
@media (max-width: 600px) {
  .about-text .keep { white-space: nowrap; }
}
.nw { white-space: nowrap; }
