/* Inside the studio */
.section {
  padding-block: clamp(4.5rem, 7.7vw, 7.6rem);
}
.section h2 {
  margin: 0;
  font-size: clamp(3.1rem, 5.9vw, 6.2rem);
  line-height: .97;
  letter-spacing: -.045em;
}
.section h3 {
  line-height: 1.04;
  letter-spacing: -.029em;
}
.section .eyebrow { margin: 0 0 1.35rem; }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, .85fr);
  align-items: end;
  gap: clamp(1.5rem, 6vw, 7rem);
  margin-bottom: clamp(2.4rem, 4vw, 4.4rem);
}
.section-heading > p, .section-aside > p:not(.eyebrow),
.about-copy > p:not(.eyebrow), .contact-copy > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.64;
}
.section-heading > p { margin: 0; max-width: 35ch; }
.services {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(2.5rem, 6.2vw, 7rem);
  align-items: start;
}
.section-aside h2 { font-size: clamp(2.85rem, 4.6vw, 5rem); }
.section-aside .muted { color: var(--purple); }
.section-aside > p:not(.eyebrow) {
  max-width: 42ch;
  margin: 1.6rem 0 1.1rem;
}
.service { --service-color: var(--emerald); --service-wash: #e7f3ec; border-top: 1px solid var(--line); }
.service:nth-child(2) { --service-color: var(--purple); --service-wash: #f2eaf7; }
.service:nth-child(3) { --service-color: var(--ruby); --service-wash: #fff1f2; }
.service:last-child { border-bottom: 1px solid var(--line); }
.service summary {
  display: flex;
  align-items: center;
  gap: clamp(.7rem, 1vw, 1.15rem);
  min-height: 5.1rem;
  padding: 1rem .15rem;
  cursor: pointer;
  list-style: none;
}
.service summary::-webkit-details-marker { display: none; }
.service summary::before {
  content: '';
  display: block;
  flex: none;
  width: clamp(1.5rem, 2.1vw, 2.1rem);
  aspect-ratio: 1;
  color: var(--service-color);
  transition: transform .3s ease;
}
.service:nth-child(1) summary::before { border: .48rem solid; border-radius: 50%; }
.service:nth-child(2) summary::before {
  background: radial-gradient(circle at 27% 27%, currentColor 26%, transparent 28%),
              radial-gradient(circle at 73% 27%, currentColor 26%, transparent 28%),
              radial-gradient(circle at 27% 73%, currentColor 26%, transparent 28%),
              radial-gradient(circle at 73% 73%, currentColor 26%, transparent 28%);
}
.service:nth-child(3) summary::before {
  background: currentColor;
  clip-path: polygon(39% 0, 62% 0, 62% 38%, 100% 38%, 100% 62%, 62% 62%, 62% 100%, 39% 100%, 39% 62%, 0 62%, 0 38%, 39% 38%);
  transform: rotate(-18deg);
}
.service summary h3 {
  flex: 1;
  margin: 0;
  font-size: clamp(1.65rem, 2.65vw, 2.75rem);
}
.service .plus {
  display: grid;
  position: relative;
  flex: none;
  place-items: center;
  width: 2.3rem;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--service-color);
  background: var(--service-wash);
}
.service .plus::before, .service .plus::after {
  content: '';
  position: absolute;
  width: .84rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s;
}
.service .plus::after { transform: rotate(90deg); }
.service[open] .plus::after { transform: none; }
.service summary:hover h3, .service[open] h3 { color: var(--service-color); }
.service-content { padding: 0 .7rem 1.75rem clamp(2.35rem, 3.35vw, 3.55rem); }
.service-content p { max-width: 56ch; margin: 0; color: var(--muted); line-height: 1.65; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.15rem; }
.tags span { font-size: .8rem; line-height: 1.4; padding: .26rem .65rem; border-radius: 2rem; background: var(--service-wash); color: var(--service-color); }
.service-cta, .project-link, .back-top {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: .28em;
}
.service-cta:hover { color: var(--service-color); }

.portfolio { padding-top: clamp(2.1rem, 4vw, 5rem); }
.project-grid, .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.9rem, 1.6vw, 1.8rem);
}
.project {
  --field: #e3f2e9;
  --accent: var(--emerald);
  min-width: 0;
}
.project:nth-child(2) { --field: #fbefcd; --accent: #745719; }
.project:nth-child(3) { --field: #f3e7f0; --accent: var(--plum); }
.project-image {
  display: block;
  position: relative;
  padding: clamp(1rem, 2.7vw, 3.05rem);
  border-radius: 1.15rem;
  background: var(--field);
}
.project-image > img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  transition: transform .45s cubic-bezier(.25,.7,.2,1);
}
.project-badge {
  --wordmark-width: 6.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: clamp(.65rem, 1.4vw, 1.5rem);
  bottom: clamp(.65rem, 1.4vw, 1.5rem);
  height: 2.6rem;
  max-width: calc(100% - 2rem);
  padding: .4rem .85rem;
  border-radius: 2rem;
  background: #fff;
  box-shadow: 0 2px 8px #22222211;
  pointer-events: none;
}
.project-badge img { display: block; width: var(--wordmark-width); max-width: 100%; height: auto; }
.project-badge-v img { transform: translateY(-8%); }
/* Match the lowercase letter height and account for the descender in the g. */
.project-badge-energy img { width: calc(var(--wordmark-width) * 1.21); transform: translateY(1%); }
.project-badge-vms { background: var(--vms-navy); }
.project-badge-vms img { width: 8rem; }
.project-meta {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 1.35rem 0 .55rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .09em;
  color: var(--accent);
}
.project-meta::before { content: ''; width: 1.15rem; height: 2px; background: currentColor; }
.project h3 { margin: 0; font-size: clamp(2rem, 3.1vw, 3.55rem); }
.project > p { max-width: 38ch; margin: .8rem 0 1rem; color: var(--muted); line-height: 1.65; }
.project-link { color: var(--accent); }
.project-link:hover { text-underline-offset: .43em; }

.approach {
  position: relative;
  background: #f1f5f8;
  color: var(--ink);
}
.approach .eyebrow { color: var(--blue); }
.approach .section-heading { margin-bottom: clamp(2.3rem, 4.3vw, 4.6rem); }
.steps { list-style: none; margin: 0; padding: 0; gap: clamp(1.5rem, 4vw, 4.3rem); }
.steps li { min-width: 0; padding-top: 1.05rem; border-top: 1px solid #babfc6; }
.step-number {
  display: grid;
  place-items: center;
  width: 3.7rem;
  height: 3.7rem;
  border-radius: 50%;
  background: #d4e3f4;
  color: var(--blue);
  font: 500 1.65rem/1 var(--display);
  letter-spacing: -.04em;
}
.steps li:nth-child(2) .step-number { border-radius: 1rem 1.9rem .25rem 1.9rem; background: #ead8ed; color: var(--purple); }
.steps li:nth-child(3) .step-number { border-radius: 1.9rem 1.9rem .4rem .4rem; background: #f5dfb5; color: #795b1d; }
.steps h3 { margin: 1.5rem 0 .65rem; font-size: clamp(1.98rem, 3vw, 3.2rem); }
.steps p { max-width: 37ch; margin: 0; line-height: 1.65; color: var(--muted); }

.about {
  display: grid;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.25rem, 7vw, 7.5rem);
}
.about-image { position: relative; isolation: isolate; min-width: 0; margin: 0; padding: 0 1rem 0 0; }
.about-image::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: .95rem 0 2.2rem 1rem;
  background: #e7cee1;
  border-radius: .8rem clamp(2.6rem, 7vw, 7.5rem);
  transform: rotate(2deg);
}
.about-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1.1;
  object-fit: cover;
  border-radius: .8rem clamp(2.6rem, 7vw, 7.5rem);
}
.about-image figcaption { margin-top: 1.25rem; color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .08em; }
.about-copy h2, .contact-copy h2 { font-size: clamp(3rem, 5.1vw, 5.7rem); }
.about-copy .eyebrow { color: var(--plum); }
.about-copy > .about-lead {
  margin-block: 1.5rem 1rem;
  max-width: 38ch;
  color: var(--ink);
  font-size: clamp(1.12rem, 1.55vw, 1.45rem);
  line-height: 1.42;
}
.about-copy > p { max-width: 54ch; }
.about-copy .text-link { margin-top: .4rem; }

.contact { background: #f0eaf7; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: clamp(2.25rem, 6.6vw, 7rem);
}
.contact-copy .eyebrow, .contact-copy .plum { color: var(--purple); }
.contact-copy > p:not(.eyebrow) { max-width: 35ch; margin: 1.5rem 0; }
.direct-contact { display: grid; justify-items: start; gap: .5rem; margin-top: clamp(2.3rem, 4.7vw, 4.5rem); }
.direct-contact > p { margin: 0 0 .18rem; color: #5c4966; font-size: .76rem; font-weight: 600; letter-spacing: .085em; }
.direct-contact > a { color: var(--ink); text-decoration: none; }
.direct-contact > a:hover { color: var(--purple); text-decoration: underline; text-underline-offset: .15em; }
.direct-contact a[href^='mailto'] { overflow-wrap: anywhere; font: 500 clamp(1.85rem, 3.2vw, 3.5rem)/1.14 var(--display); letter-spacing: -.033em; }
.phone { font-size: 1.07rem; }
.contact-note { margin-top: .3rem; color: var(--muted); font-size: .83rem; }
.form-card {
  min-width: 0;
  padding: clamp(1.4rem, 3.1vw, 3.3rem);
  border-radius: 1.5rem;
  background: #fff;
}
.form-card h3 { font-size: clamp(2.1rem, 3.4vw, 3.5rem); margin: 0 0 .55rem; }
.form-subtitle { color: var(--muted); margin: 0 0 1.55rem; font-size: .9rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-card label { display: grid; gap: .45rem; font-size: .875rem; line-height: 1.4; color: var(--ink); font-weight: 600; }
.form-card input, .form-card select, .form-card textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #a8a7ad;
  border-radius: .55rem;
  background: #fff;
  color: var(--ink);
  font: 400 max(1rem, 16px)/1.4 var(--body);
  padding: .75rem .85rem;
}
.form-card select {
  appearance: none;
  padding-right: 2.35rem;
  background: #fff 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 1.5 6 6.5l5-5' fill='none' stroke='%23222323' stroke-width='1.5'/%3E%3C/svg%3E") right .85rem center / .75rem auto no-repeat;
}
.form-card textarea { min-height: 6.5rem; resize: vertical; }
.form-card :is(input, textarea)::placeholder { color: #666369; opacity: 1; }
.form-card :is(input, select, textarea):focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.form-card :is(input, textarea)[aria-invalid='true'] { border-color: #992f46; }
.form-field, #inquiry-form > label { margin-bottom: 1.05rem; min-width: 0; }
.field-error { line-height: 1.45; font-size: .85rem; color: #962e45; margin: .45rem 0 0; }
.form-bottom { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: space-between; align-items: center; }
.form-bottom > span { color: var(--muted); font-size: .81rem; line-height: 1.5; }
.form-card .button { white-space: normal; }
.privacy-note { margin: 1.24rem 0 0; font-size: .81rem; line-height: 1.55; color: var(--muted); }
.plain-button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }
.plain-button:hover { color: var(--purple); }
#send-status { margin: 0; line-height: 1.5; }
#send-status:not(:empty) { margin-top: 1rem; }
#send-inquiry:disabled { opacity: .75; }
#send-inquiry[aria-busy='true'] { cursor: progress; }
#inquiry-success p { line-height: 1.58; }
.success-check { color: var(--emerald); font-size: 1.7rem; }
#sent-details { margin: 1rem 0; }
#sent-details summary { cursor: pointer; }
#sent-message { padding: 1.12rem; border-radius: .7rem; background: #f5f1f7; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 .92rem/1.6 var(--body); }
#copy-status { font-size: .85rem; color: var(--emerald); }
.color-line { display: flex; height: 4px; }
.color-line i { flex: 1; }
.color-line i:nth-child(1) { background: var(--emerald); }
.color-line i:nth-child(2) { background: var(--petrol); }
.color-line i:nth-child(3) { background: var(--blue); }
.color-line i:nth-child(4) { background: var(--purple); }
.color-line i:nth-child(5) { background: var(--plum); }
.color-line i:nth-child(6) { background: var(--ruby); }
.color-line i:nth-child(7) { background: var(--gold); }
.footer { padding-block: clamp(2.2rem, 4vw, 4.25rem) 1.55rem; }
.footer-top, .footer-bottom { display: flex; gap: 1.3rem; flex-wrap: wrap; align-items: center; }
.footer-top { padding-bottom: clamp(1.55rem, 2.8vw, 2.8rem); }
.footer-top .brand { min-width: 0; }
.footer-top .brand img { display: block; width: clamp(9rem, 21vw, 19rem); height: auto; }
.footer-top p { color: var(--muted); margin: 0; font-size: .9rem; }
.footer-top .back-top { margin-left: auto; }
.back-top:hover { color: var(--purple); }
.footer-bottom { align-items: baseline; border-top: 1px solid var(--line); padding-top: 1.2rem; font-size: .83rem; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: .55rem 1.35rem; margin-left: auto; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; text-underline-offset: .22em; color: var(--ink); }

#privacy-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  background: #fff;
  color: var(--ink);
  padding: clamp(1.4rem, 3.75vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  margin: auto;
}
#privacy-dialog::backdrop { background: rgb(29 22 35 / .55); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dialog-top .eyebrow { margin: 0; }
#close-privacy { width: 2.8rem; height: 2.8rem; border: 0; border-radius: 50%; color: var(--ink); background: #f0eaf7; font: 400 1.55rem/1 var(--body); cursor: pointer; }
#privacy-dialog h2 { margin: 1rem 0; font: 500 clamp(2.1rem, 4vw, 3rem)/1.04 var(--display); letter-spacing: -.03em; }
#privacy-dialog > p { line-height: 1.65; }
#privacy-dialog a { color: var(--purple); }
#privacy-dialog > p:last-child { margin-bottom: 0; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .service summary:hover::before { transform: rotate(14deg); }
  .service:nth-child(3) summary:hover::before { transform: rotate(3deg); }
  .project-image:hover > img { transform: scale(1.02); }
}
@media (max-width: 950px) and (min-width: 761px) {
  .services, .about, .contact-grid { gap: 2.25rem; }
  .project-image { padding: 1.05rem; }
  .project-badge { --wordmark-width: 5.3rem; height: 2.2rem; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 760px) {
  .section { padding-block: 4rem; }
  .section h2 { font-size: clamp(2.6rem, 8.4vw, 4.2rem); }
  .section-heading, .services, .about, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .section-heading { gap: 1.1rem; margin-bottom: 1.9rem; }
  .section-heading > p { max-width: 47ch; }
  .section .eyebrow { margin-bottom: .9rem; }
  .services { gap: 1.95rem; }
  .service summary { min-height: 4.35rem; }
  .service-content { padding-right: .1rem; }
  .portfolio { padding-top: 1.2rem; }
  .project-grid { gap: 2.55rem; grid-template-columns: minmax(0, 1fr); }
  .project-image { padding: clamp(1.4rem, 5.5vw, 2.5rem); }
  .project-badge { --wordmark-width: 5.7rem; bottom: .95rem; left: .95rem; height: 2.35rem; }
  .project h3 { font-size: clamp(2.05rem, 7vw, 3.15rem); }
  .project-meta { margin-top: .95rem; }
  .project > p { margin-block: .55rem .68rem; max-width: 46ch; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; }
  .steps li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .45rem .85rem; }
  .step-number { grid-row: span 2; width: 3rem; height: 3rem; font-size: 1.35rem; }
  .steps h3, .steps p { grid-column: 2; margin: 0; }
  .about { gap: 2.05rem; }
  .about-image img { aspect-ratio: 1.35; }
  .contact-grid { gap: 2rem; }
  .footer-top { align-items: center; justify-content: space-between; row-gap: .75rem; }
  .footer-top p { flex-basis: 100%; order: 2; }
  .footer-top .back-top { margin: 0; }
  .footer-bottom { gap: .75rem 1rem; }
  .footer-bottom nav { flex-basis: 100%; margin: 0; order: 2; }
  .footer-bottom > .plain-button { margin-left: auto; }
}
@media (max-width: 520px) {
  .service-content { padding-left: .15rem; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .form-card { border-radius: 1rem; padding: 1.2rem; }
}
