/*
 * Studio Dolci V20 — Elisa review / ORIGEN∞ proofing pass.
 * The viewport must reveal a complete idea before it asks for another gesture.
 */

html {
  scroll-padding-top: calc(var(--sd-header) + 12px);
}

.v20-home [data-chapter] {
  scroll-margin-top: calc(var(--sd-header) + 12px);
}

/* A calm, complete opening: the mark and sentence remain protected while the
   outer works supply motion and choice. */
.v20-home .v7-hero {
  min-height: max(720px, 100svh);
}

.v20-home .v13-hero-lockup {
  width: min(48vw, 720px, 78svh);
}

.v20-home .v13-hero-intro {
  max-width: 47ch;
  text-wrap: balance;
}

.v20-home .v13-hero-axis {
  justify-content: center;
  text-wrap: balance;
}

/* Rail controls behave as a miniature instrument panel: direction, progress
   and an exact current/total position. */
.v20-home .v12-rail-controls {
  grid-template-columns: 42px minmax(100px, 240px) 66px 42px;
}

.v20-home .v12-rail-controls output {
  justify-self: center;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  white-space: nowrap;
}

.v20-home .v12-carousel {
  scroll-padding-inline: 1px var(--sd-pad);
}

.v20-home .v12-carousel > * > * {
  scroll-snap-stop: always;
}

/* Project cards once again explain what they contain. Image is a portfolio
   chapter, not an unlabeled moodboard. */
.v20-home .v7-image .v7-project-button {
  color: #fff;
}

.v20-home .v7-image .v7-project-meta {
  border-color: rgba(255, 255, 255, .3);
}

.v20-home .v7-project-meta strong,
.v20-home .v7-book-copy h3 {
  text-wrap: balance;
}

.v20-home .v11-case-dialog h2 {
  max-width: 10ch;
  font-size: clamp(40px, min(4.35vw, 7.2svh), 68px);
  line-height: .82;
}

.v20-home .v11-case-lead {
  margin-bottom: 16px;
  padding: 14px 0 16px;
  font-size: clamp(16px, 1.18vw, 20px);
  line-height: 1.42;
}

.v20-home .v11-case-dialog dl div {
  padding: clamp(10px, 1.45svh, 14px) 0;
}

.v20-home .v11-case-dialog > button {
  outline: 1px solid #151212;
  outline-offset: -4px;
}

/* Services become compact visual systems. The first three deliverables are
   visible before the flip; the reverse face carries the complete scope. */
.v20-home .v10-service-card,
.v20-home .v10-service-card:nth-child(n) {
  overflow: hidden;
  border-radius: 28px 6px 28px 6px;
}

.v20-home .v10-service-card:nth-child(3n + 2) {
  border-radius: 70px 6px 6px 6px;
}

.v20-home .v10-service-card:nth-child(4n) {
  border-radius: 6px 6px 70px 6px;
}

.v20-home .v10-service-front {
  background:
    linear-gradient(125deg, transparent 0 62%, color-mix(in srgb, var(--sd-blue) 12%, transparent) 62% 100%),
    color-mix(in srgb, var(--sd-paper) 88%, var(--sd-yellow));
}

.v20-home .v10-service-card:nth-child(even) .v10-service-front {
  background:
    linear-gradient(145deg, transparent 0 67%, color-mix(in srgb, var(--sd-yellow) 45%, transparent) 67% 100%),
    color-mix(in srgb, var(--sd-paper) 84%, var(--sd-blue));
}

.v20-home .v10-service-face b {
  margin: auto 0 10px;
}

.v20-home .v10-service-face > span:not(.v10-service-points, .v11-service-glyph, .v20-service-signal) {
  min-height: 0;
}

.v20-service-signal {
  display: grid;
  min-height: 0 !important;
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}

.v20-service-signal > span {
  display: grid;
  min-width: 0;
  padding: 9px 7px 10px 0;
  gap: 5px;
  border-right: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1.35;
  text-transform: uppercase;
}

.v20-service-signal > span:last-child {
  padding-left: 7px;
  border-right: 0;
}

.v20-service-signal > span:nth-child(2) {
  padding-left: 7px;
}

.v20-service-signal i {
  color: var(--sd-blue);
  font-size: 7px;
  font-style: normal;
}

.v20-home .v10-service-face > em {
  margin-top: 13px;
}

/* Sustainability is integrated into the collaboration chapter: one concise
   proof of method, not a repeated promotional section. */
.v20-responsible-practice {
  display: grid;
  width: min(100%, 1440px);
  margin: clamp(54px, 7vw, 92px) auto 0;
  padding-top: clamp(34px, 4vw, 56px);
  grid-template-columns: minmax(280px, .8fr) minmax(520px, 1.2fr);
  gap: clamp(30px, 5vw, 86px);
  border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}

.v20-responsible-practice header > span {
  color: var(--sd-blue);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.v20-responsible-practice h2 {
  max-width: 12ch;
  margin: 13px 0 18px;
  font-family: var(--wide);
  font-size: clamp(32px, 4vw, 64px);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .88;
  text-transform: uppercase;
  text-wrap: balance;
}

.v20-responsible-practice header p {
  max-width: 50ch;
  margin: 0;
  font-size: 11px;
  line-height: 1.72;
}

.v20-responsible-practice > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v20-responsible-practice article {
  min-height: 250px;
  padding: clamp(20px, 2.3vw, 34px);
  border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  border-right: 0;
}

.v20-responsible-practice article:last-child {
  border-right: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}

.v20-responsible-practice article > i {
  color: var(--sd-blue);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .14em;
}

.v20-responsible-practice article h3 {
  margin: clamp(48px, 5vw, 78px) 0 14px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.6vw, 27px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
}

.v20-responsible-practice article p {
  margin: 0;
  font-size: 9px;
  line-height: 1.65;
}

.v20-home .v7-service-cta {
  margin-top: clamp(38px, 5vw, 70px);
}

/* Dark mode is a true colourway, not a filter over the light interface. */
html[data-color-mode="dark"] .v20-home .v20-responsible-practice,
html[data-color-mode="dark"] .v20-home .v12-rail-controls {
  color: #fff3b7;
}

html[data-color-mode="dark"] {
  color-scheme: dark;
}

html[data-color-mode="dark"] .v20-home {
  background: #151212;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v7-header {
  border-color: rgba(143, 212, 255, .28);
  background: rgba(21, 18, 18, .94);
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v7-header .v7-brandmark-brown {
  opacity: 0;
}

html[data-color-mode="dark"] .v20-home .v7-header .v7-brandmark-cream {
  opacity: 1;
}

html[data-color-mode="dark"] .v20-home .v7-theme-toggle,
html[data-color-mode="dark"] .v20-home .v7-menu-button {
  border-color: #fff3b7;
  background: #fff3b7;
  color: #151212;
}

html[data-color-mode="dark"] .v20-home .v7-word,
html[data-color-mode="dark"] .v20-home .v7-object {
  background: #151212;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v7-experience {
  background: #1d1919;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v7-identity {
  background: #242024;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v7-services {
  background: #191717;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v7-about {
  background: #211c1c;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v7-section-head > span,
html[data-color-mode="dark"] .v20-home .v7-about-copy > span,
html[data-color-mode="dark"] .v20-home .v12-responsible-note span,
html[data-color-mode="dark"] .v20-home .v20-responsible-practice header > span,
html[data-color-mode="dark"] .v20-home .v20-responsible-practice article > i {
  color: #8fd4ff;
}

html[data-color-mode="dark"] .v20-home .v7-book-copy a:hover,
html[data-color-mode="dark"] .v20-home .v7-book-copy a:focus-visible,
html[data-color-mode="dark"] .v20-home .v12-rail-controls button:hover,
html[data-color-mode="dark"] .v20-home .v12-rail-controls button:focus-visible {
  background: #fff3b7;
  color: #151212;
}

html[data-color-mode="dark"] .v20-home .v7-project-meta,
html[data-color-mode="dark"] .v20-home .v12-contact-directory,
html[data-color-mode="dark"] .v20-home .v12-contact-directory a,
html[data-color-mode="dark"] .v20-home .v12-responsible-note {
  border-color: rgba(255, 243, 183, .23);
}

html[data-color-mode="dark"] .v20-home .v12-contact-directory a:hover,
html[data-color-mode="dark"] .v20-home .v12-contact-directory a:focus-visible {
  background: #fff19c;
  color: #151212;
}

html[data-color-mode="dark"] .v20-home .v12-email-cta {
  background: #fff3b7;
  color: #151212;
}

html[data-color-mode="dark"] .v20-home .v14-footer {
  background: #151212;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v14-footer .v7-brandmark-brown {
  opacity: 0;
}

html[data-color-mode="dark"] .v20-home .v14-footer .v7-brandmark-cream {
  opacity: 1;
}

html[data-color-mode="dark"] .v20-home .v10-service-front {
  background:
    linear-gradient(125deg, transparent 0 62%, rgba(143, 212, 255, .1) 62% 100%),
    #242020;
  color: #fff3b7;
}

html[data-color-mode="dark"] .v20-home .v10-service-card:nth-child(even) .v10-service-front {
  background:
    linear-gradient(145deg, transparent 0 67%, rgba(255, 241, 156, .1) 67% 100%),
    #1c1a1a;
  color: #fff3b7;
}

@media (min-width: 821px) {
  /* This is the 100%-zoom contract: header, chapter title, controls, complete
     media and its label all fit without clipping. */
  .v20-home.v10-home .v7-word,
  .v20-home.v10-home .v7-portfolio:not(.v7-object) {
    display: grid;
    height: auto;
    min-height: max(680px, 100svh);
    padding-top: calc(var(--sd-header) + clamp(16px, 2.5svh, 28px));
    padding-bottom: clamp(28px, 4svh, 48px);
    grid-template-rows: auto 42px minmax(0, 1fr);
    align-content: start;
  }

  .v20-home .v7-word,
  .v20-home .v7-portfolio,
  .v20-home .v7-services {
    padding-top: calc(var(--sd-header) + clamp(20px, 3svh, 34px));
    padding-bottom: clamp(34px, 4.5svh, 60px);
  }

  .v20-home .v7-section-head {
    width: 100%;
    min-height: 0;
    margin: 0 0 clamp(13px, 2svh, 20px);
    grid-template-columns: 58px minmax(250px, .82fr) minmax(300px, .72fr);
    gap: clamp(18px, 3vw, 52px);
    align-items: end;
    text-align: left;
  }

  .v20-home .v7-section-head > span {
    order: initial;
    padding-bottom: 3px;
  }

  .v20-home .v7-section-head div > p {
    margin: 0 0 4px;
    font-size: clamp(42px, min(5.1vw, 7.5svh), 74px);
    line-height: .78;
  }

  .v20-home .v7-section-head h2 {
    font-size: clamp(13px, min(1.1vw, 1.9svh), 18px);
  }

  .v20-home .v7-section-head > p {
    display: block;
    max-width: 47ch;
    margin: 0;
    font-size: clamp(10px, .82vw, 13px);
    line-height: 1.5;
  }

  .v20-home .v12-rail-controls {
    width: 100%;
    height: 42px;
    margin: 0 0 clamp(10px, 1.4svh, 15px);
  }

  .v20-home .v7-books-viewport,
  .v20-home .v7-rail {
    height: auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .v20-home .v7-books-track,
  .v20-home .v7-track {
    height: auto;
  }

  .v20-home .v7-book-card {
    width: clamp(270px, 25vw, 360px);
    height: clamp(360px, 47svh, 435px);
    min-height: 0;
    gap: 8px;
  }

  .v20-home .v7-book-cover {
    min-height: 0;
  }

  .v20-home .v7-book-cover img,
  .v20-home .v7-book-cover .v19-book-visual > img {
    width: auto;
    max-width: 92%;
    max-height: clamp(218px, 31svh, 300px);
  }

  .v20-home .v7-book-copy {
    padding-top: 6px;
  }

  .v20-home .v7-book-copy > span {
    font-size: 7px;
  }

  .v20-home .v7-book-copy h3 {
    margin: 5px 0 8px;
    font-size: clamp(17px, min(1.4vw, 2.4svh), 23px);
  }

  .v20-home .v7-book-copy a,
  .v20-home .v7-book-soon {
    min-height: 31px;
    padding: 0 10px;
    font-size: 7px;
  }

  .v20-home .v7-project,
  .v20-home .v7-project:nth-child(n) {
    width: clamp(320px, 34vw, 520px);
    height: clamp(340px, 47svh, 445px);
    align-self: stretch;
  }

  .v20-home .v7-project-meta {
    min-height: 62px;
    padding: 8px 0;
  }

  .v20-home .v7-project-meta strong {
    font-size: clamp(16px, 1.25vw, 21px);
  }

  .v20-home .v7-object-grid {
    gap: clamp(14px, 1.5vw, 24px);
  }

  .v20-home .v10-object-card {
    min-height: clamp(330px, 43svh, 430px);
  }

  .v20-home .v10-service-card,
  .v20-home .v10-service-card:nth-child(n),
  .v20-home .v10-service-card > button {
    width: clamp(310px, 28vw, 390px);
    min-height: clamp(330px, 43svh, 390px);
    aspect-ratio: auto;
  }

  .v20-home .v10-service-face {
    padding: clamp(22px, 2vw, 32px);
  }

  .v20-home .v10-service-face b {
    font-size: clamp(24px, min(2vw, 3.6svh), 33px);
  }
}

@media (min-width: 821px) and (max-height: 760px) {
  .v20-home.v10-home .v7-word,
  .v20-home.v10-home .v7-portfolio:not(.v7-object) {
    min-height: 660px;
  }

  .v20-home .v7-section-head div > p {
    font-size: clamp(38px, 7svh, 54px);
  }

  .v20-home .v7-section-head > p {
    display: block;
    font-size: 10px;
  }

  .v20-home .v7-book-card {
    height: 350px;
  }

  .v20-home .v7-project,
  .v20-home .v7-project:nth-child(n) {
    height: 338px;
  }

  .v20-home .v7-book-cover img,
  .v20-home .v7-book-cover .v19-book-visual > img {
    max-height: 218px;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: calc(var(--sd-header) + 8px);
  }

  .v20-home .v7-hero {
    min-height: max(720px, 100svh);
  }

  .v20-home .v13-hero-lockup {
    top: 43%;
    width: min(88vw, 600px);
  }

  .v20-home .v13-hero-intro {
    max-width: 34ch;
  }

  .v20-home .v7-section {
    padding-top: clamp(84px, 11svh, 112px);
    padding-bottom: clamp(58px, 8svh, 84px);
  }

  .v20-home .v7-section-head {
    width: 100%;
    margin-bottom: 22px;
  }

  .v20-home .v7-section-head > p {
    max-width: 46ch;
  }

  .v20-home .v12-rail-controls {
    width: 100%;
    grid-template-columns: 40px minmax(70px, 1fr) 60px 40px;
  }

  .v20-home .v7-book-card {
    width: min(78vw, 390px);
    height: auto;
  }

  .v20-home .v7-book-cover {
    min-height: clamp(330px, 52svh, 470px);
  }

  .v20-home .v7-project,
  .v20-home .v7-project:nth-child(n) {
    width: min(84vw, 480px);
    height: clamp(410px, 61svh, 550px);
  }

  .v20-responsible-practice {
    grid-template-columns: 1fr;
  }

  .v20-responsible-practice > div {
    grid-template-columns: 1fr;
  }

  .v20-responsible-practice article {
    min-height: 0;
    border-right: 1px solid color-mix(in srgb, currentColor 25%, transparent);
    border-bottom: 0;
  }

  .v20-responsible-practice article:last-child {
    border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent);
  }

  .v20-responsible-practice article h3 {
    margin-top: 38px;
  }
}

@media (max-width: 540px) {
  .v20-home .v13-hero-lockup {
    top: 42%;
    width: 94vw;
  }

  .v20-home .v13-hero-intro {
    max-width: 31ch;
  }

  .v20-home .v13-hero-axis {
    max-width: 90vw;
    margin-right: auto;
    margin-left: auto;
    font-size: 6.5px;
  }

  .v20-home .v12-rail-controls {
    grid-template-columns: 38px minmax(54px, 1fr) 54px 38px;
    gap: 8px;
  }

  .v20-home .v7-book-card {
    width: 84vw;
  }

  .v20-home .v7-book-cover {
    min-height: min(54svh, 430px);
  }

  .v20-home .v7-project,
  .v20-home .v7-project:nth-child(n) {
    width: 86vw;
    height: clamp(390px, 58svh, 510px);
  }

  .v20-home .v10-service-card,
  .v20-home .v10-service-card:nth-child(n) {
    width: 86vw;
    border-radius: 24px 5px 24px 5px;
  }

  .v20-service-signal {
    grid-template-columns: 1fr;
  }

  .v20-service-signal > span,
  .v20-service-signal > span:nth-child(2),
  .v20-service-signal > span:last-child {
    display: flex;
    padding: 5px 0;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  }

  .v20-service-signal > span:last-child {
    border-bottom: 0;
  }

  .v20-responsible-practice h2 {
    font-size: clamp(34px, 12vw, 54px);
  }

  .v20-home .v7-about {
    padding-top: 90px;
    padding-bottom: 84px;
  }

  .v20-home .v7-about-copy h2 {
    font-size: clamp(58px, 17vw, 92px);
  }

  .v20-home .v12-contact-directory a {
    min-height: 56px;
  }

  .v20-home .v14-footer-core {
    padding-right: 12px;
    padding-left: 12px;
  }

  .v20-home .v14-footer-core > p {
    font-size: clamp(22px, 9vw, 42px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v20-home .v12-carousel {
    scroll-behavior: auto;
  }

  .v20-home .v10-service-inner,
  .v20-home .v7-project-media img,
  .v20-home .v19-book-visual > img {
    transition-duration: .001ms !important;
  }
}
