:root {
  --muted: #5a687d;
  --blue: #5a687d;
  --lavender: #f7f8fa;
}

header nav a { line-height: 1.3; }
header nav a:hover, .text-link { color: #5a687d; }
.hero { gap: 22px; padding-bottom: 48px; }
.hero-copy { text-align: center; }
.hero-copy p { max-width: 38rem; margin: 12px auto 0; color: var(--muted); text-wrap: pretty; }
.hero-services { margin-top: 4px; }

#viewer-help, .motion-credit { font-size: 12px; }
.model-thumbs { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; overflow-x: auto; padding: 6px 4px 9px; }
.model-thumbs button { flex: 1 0 82px; min-width: 0; padding: 6px 4px; font-size: 11px; }
.model-thumbs button > span { width: 60px; height: 55px; }
.model-thumbs button img { width: 100%; height: 100%; transform: none; object-fit: cover; }
.model-thumbs button[data-model=tanya] img { height: 100%; transform: none; object-position: center; }
.model-thumbs button:focus-visible { outline-offset: 1px; }
.portfolio-caption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 12px; margin: 8px 4px 0; }
.portfolio-caption p { color: #5a687d; font-size: 13px; margin: 0; }
.portfolio-caption button { font-size: 13px; }

.price-section { padding-top: 20px; padding-bottom: 0; }
.price-intro { font-size: 15px; }
.price-draft { font-size: 12px; }
.price-group { border-top: 2px solid #8993a4; padding-top: 14px; margin-top: 16px; }
.group-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: 12px; }
.group-heading h3 { font-size: 23px; }
.group-heading a { font-size: 13px; }
.price-row h4 { font-size: 17px; margin: 0; }
.price-row > div > p, .price-note, .steps p { font-size: 14px; }
.catalogue-link { text-align: left; margin-top: 13px; }
.catalogue-link .text-link { color: #5a687d; font-size: 14px; }

.request-section { padding-top: 68px; }
.request-copy .demo-label, .form-note { font-size: 13px; }
#brief .field, #brief legend, #brief .choices label { font-size: 14px; }
#brief :is(textarea, input:not([type=radio]), select) { font-size: 16px; }
#brief small { font-size: 12px; font-weight: 400; }
.about-section { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 22px; margin-top: 64px; }
.about-section img { border-radius: 14px; object-fit: cover; background: var(--lavender); }
.about-section .about-text { margin-top: 12px; }
#sample-clip { display: block; width: 100%; max-height: 62vh; background: var(--lavender); margin: 18px 0; }

@media (max-width: 760px) {
  header nav { gap: 4px 18px; flex-wrap: wrap; }
  header nav a { padding: 7px 0; }
  .hero-copy p { font-size: 15px; }
  .model-thumbs button { flex: 0 0 84px; }
  #viewer-stage { height: clamp(260px, 86vw, 370px); }
  .request-section { padding-top: 48px; }
  .about-section { gap: 15px; margin-top: 52px; }
  .about-section img { width: 72px; height: 72px; }
}

@media (max-width: 400px) {
  .group-heading { display: block; }
  .group-heading a { display: inline-block; margin-top: 7px; }
}

/* Keep the viewer chrome to controls and navigation. */
#portfolio .viewer-heading{justify-content:flex-end}
#portfolio .portfolio-caption{justify-content:flex-end}
#portfolio .portfolio-caption:has(button[hidden]){display:none}
.about-animation-credit{font-size:.75rem;color:var(--muted,#5a687d);margin:8px 0 0}

/* Centered viewer controls, with stable dimensions in both motion states. */
#portfolio #model-canvas{height:calc(100% - 54px)}
#portfolio .viewer-toolbar{
  left:0;right:0;bottom:5px;display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr)) repeat(2,28px);
  gap:6px;width:min(calc(100% - 8px),234px);margin-inline:auto;
}
#portfolio .viewer-toolbar button{
  display:grid;place-items:center;min-width:0;width:100%;height:28px;margin:0;padding:0 4px;
  border:1px solid var(--kitz-button-edge,#e1def0);border-radius:999px;
  background:transparent;color:#5d536b;
  font:600 11px/1.1 system-ui,sans-serif;white-space:nowrap;
}
#portfolio .viewer-toolbar button:not(:disabled):hover{background:transparent;border-color:var(--kitz-control-selected,#8278a2);color:var(--kitz-button-ink,#303744)}
#portfolio .viewer-toolbar button:focus-visible{outline:2px solid #8278a2;outline-offset:2px}
#portfolio .viewer-toolbar #view-zoom-in,#portfolio .viewer-toolbar #view-zoom-out{font-size:15px}
@media(max-width:360px){
  #portfolio .viewer-toolbar{gap:4px}
  #portfolio .viewer-toolbar button{font-size:10px}
}

/* Centre the full character selection without stretching each card. */
#portfolio .model-thumbs{
  display:flex;flex-wrap:wrap;justify-content:center;
  gap:6px;padding:6px 2px 9px;overflow:visible;
}
#portfolio .model-thumbs button{
  flex:0 0 clamp(60px,calc((100% - 34px)/6),80px);min-width:0;
  white-space:nowrap;
}
#portfolio .model-thumbs button>span{width:min(100%,56px)}
@media(max-width:480px){
  #portfolio .model-thumbs{width:min(100%,258px);margin-inline:auto}
  #portfolio .model-thumbs button{flex-basis:calc((100% - 12px) / 3)}
}

#portfolio #viewer-mode{color:#727272;font-style:italic}

/* Logo | centred navigation | quote. At phone widths only the menu links wrap. */
header.wrap{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:clamp(8px,2vw,24px)}
header.wrap>nav{display:flex;order:0;width:auto;min-width:0;justify-content:center;align-items:center;text-align:center}
header.wrap>nav a{white-space:nowrap}
header.wrap>.header-end{margin-left:0;justify-self:end}
@media(max-width:760px){
  header.wrap{min-height:78px}
  header.wrap>nav{column-gap:clamp(6px,2vw,18px);row-gap:4px}
  header.wrap>nav a{padding:4px 0}
}

.animation-footer{height:auto;display:block;padding:0 0 24px;text-align:center;color:#727272;font-size:11px}
