@font-face {
  font-family: "Cera Pro";
  src: url("assets/fonts/CeraPro-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Sections below the hero */

@font-face {
  font-family: "Cera Pro Text";
  src: url("assets/fonts/CeraPro-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html {
  scroll-behavior: smooth;
}

.section {
  position: relative;
  padding: clamp(96px, 11vw, 176px) clamp(24px, 5.6vw, 96px);
  overflow: hidden;
}

.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  align-items: end;
  gap: 40px;
  margin-bottom: clamp(56px, 7vw, 112px);
}

.section__eyebrow {
  margin: 0 0 22px;
  color: #757575;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.section__title {
  max-width: 980px;
  margin: 0;
  color: #242426;
  font-size: clamp(54px, 7vw, 118px);
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.section__lead {
  --lead-position-offset: clamp(8.7px, 1.015vw, 17.4px);
  width: 100%;
  max-width: 520px;
  margin: 0 0 5px auto;
  color: #6f6f73;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: clamp(14px, 1vw, 16px);
  line-height: 1.45;
}

.services {
  background:
    radial-gradient(circle at 90% 13%, rgba(180, 236, 250, 0.28), transparent 27%),
    #fff;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #d8d8da;
}

.service-card {
  min-height: 330px;
  padding: 32px 34px 38px 0;
  border-bottom: 1px solid #d8d8da;
  color: #242426;
  transition: background-color 280ms ease, padding 280ms ease;
}

.service-card:nth-child(odd) {
  border-right: 1px solid #d8d8da;
}

.service-card:nth-child(even) {
  padding-left: 34px;
}

.service-card:hover {
  background: linear-gradient(135deg, rgba(229, 159, 219, 0.12), rgba(177, 238, 250, 0.17));
  padding-right: 22px;
}

.service-card__number {
  display: block;
  margin-bottom: 76px;
  color: #97979b;
  font-size: 13px;
}

.service-card__title {
  margin: 0 0 18px;
  font-size: clamp(32px, 3.5vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.service-card__text {
  max-width: 460px;
  margin: 0;
  color: #707075;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

.service-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.service-card li {
  padding: 8px 12px;
  border: 1px solid #d3d3d6;
  border-radius: 999px;
  color: #68686d;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: 12px;
}

.portfolio {
  min-height: max(700px, 100vh);
  min-height: max(700px, 100dvh);
  padding: 0;
  background: #f3f3f1;
}

.portfolio .section__head {
  position: absolute;
  z-index: 2;
  top: clamp(56px, 6vw, 96px);
  right: 0;
  left: 0;
  padding-inline: clamp(24px, 5.6vw, 96px);
  margin: 0;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.portfolio .section__head .section__eyebrow,
.portfolio .section__head .section__title,
.portfolio .section__head .section__lead {
  color: #fff;
}

.portfolio .section__head .section__lead {
  position: relative;
  transform: translateY(calc(0px - var(--lead-position-offset)));
}

.portfolio__decode-heading,
.portfolio__decode-description {
  display: block;
  white-space: pre-line;
}

.portfolio__decode-heading {
  min-height: 1.76em;
}

.portfolio__decode-description {
  min-height: 2.9em;
}

.portfolio__decode-heading.is-decoding::after,
.portfolio__decode-description.is-decoding::after {
  margin-left: 0.06em;
  content: "▌";
  animation: portfolio-decode-cursor 1.1s steps(1) infinite;
}

@keyframes portfolio-decode-cursor {
  50% {
    opacity: 0;
  }
}

.portfolio__contacts {
  position: absolute;
  z-index: 3;
  top: calc(100% + 28px + var(--lead-position-offset));
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin: 0;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: clamp(17px, 1.35vw, 22px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.45;
  pointer-events: auto;
}

.portfolio__contacts a {
  color: inherit;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 180ms ease;
}

.portfolio__contacts a:hover,
.portfolio__contacts a:focus-visible {
  text-decoration-color: currentColor;
}

.portfolio__contacts.is-project-description {
  pointer-events: none;
}

.portfolio__contacts.is-project-description a {
  width: 100%;
  text-decoration: none;
}

.portfolio-carousel-shell {
  height: max(700px, 100vh);
  height: max(700px, 100dvh);
  min-height: 700px;
}

.portfolio-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.portfolio-carousel .flex-carousel.flex-carousel--wheel-released {
  overscroll-behavior: auto;
}

.portfolio-carousel__loading {
  position: absolute;
  inset: 50% auto auto 50%;
  margin: 0;
  color: #85858a;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: 14px;
  transform: translate(-50%, -50%);
}

.portfolio__logo {
  position: absolute;
  z-index: 4;
  right: clamp(24px, 5.6vw, 96px);
  bottom: clamp(24px, 3.75vw, 64px);
}

.about {
  color: #f8f8f5;
  background: #242426;
}

.about .section__eyebrow,
.about .section__lead {
  color: #aaaab0;
}

.about .section__title {
  color: #f8f8f5;
}

.about__statement {
  max-width: 1220px;
  margin: 0 0 clamp(78px, 9vw, 144px);
  font-size: clamp(42px, 6vw, 98px);
  line-height: 0.98;
  letter-spacing: -0.068em;
}

.about__body {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(50px, 8vw, 140px);
}

.about__body > p {
  max-width: 600px;
  margin: 0;
  color: #c4c4c8;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.5;
}

.about__statement em {
  color: #afe8f7;
  font-style: italic;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #545458;
}

.about__stat {
  padding: 28px 28px 0 0;
}

.about__stat + .about__stat {
  padding-left: 28px;
  border-left: 1px solid #545458;
}

.about__value {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(42px, 5vw, 76px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.about__label {
  color: #aaaab0;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: 16px;
}

.reviews {
  background: #fff;
}

.reviews__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.review-card {
  display: flex;
  min-height: 450px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 3vw, 52px);
  border-radius: 32px;
  background: #f2f2f0;
}

.review-card--accent {
  background: linear-gradient(145deg, #eaa2d9, #c7c7ef 48%, #afeaf5);
}

.review-card__quote {
  max-width: 680px;
  margin: 0;
  font-size: clamp(27px, 3.1vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.052em;
}

.review-card__author {
  margin: 50px 0 0;
  color: #66666c;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.contact {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 92% 10%, rgba(177, 236, 249, 0.9), transparent 42%),
    radial-gradient(circle at 10% 100%, rgba(234, 153, 216, 0.74), transparent 48%),
    #ded8ee;
}

.contact .section__eyebrow {
  color: rgba(36, 36, 38, 0.58);
}

.contact__title {
  max-width: 1320px;
  margin: 0 0 clamp(60px, 10vw, 150px);
  font-size: clamp(58px, 9.3vw, 158px);
  line-height: 0.84;
  letter-spacing: -0.082em;
}

.contact__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.contact__mail {
  position: relative;
  color: #242426;
  font-size: clamp(21px, 2.2vw, 38px);
  text-decoration: none;
}

.contact__mail::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 250ms ease;
}

.contact__mail:hover::after {
  transform: scaleX(0.22);
}

.contact__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.contact__socials a {
  padding: 13px 19px;
  border: 1px solid rgba(36, 36, 38, 0.32);
  border-radius: 999px;
  color: #242426;
  font-size: 13px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 200ms ease, background-color 200ms ease;
}

.contact__socials a:hover {
  color: #fff;
  background: #242426;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px clamp(24px, 5.6vw, 96px);
  color: #a7a7ab;
  background: #242426;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #f8f8f5;
  text-decoration: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.2, 0.75, 0.25, 1), transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .section__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section__lead {
    margin-left: 0;
  }

  .portfolio .section__head .section__lead {
    transform: none;
  }

  .portfolio__contacts {
    top: calc(100% + 22px);
  }

  .about__statement {
    font-size: clamp(42px, 9vw, 74px);
  }

  .about__body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .section {
    padding-block: 88px;
  }

  .section__head {
    gap: 22px;
    margin-bottom: 54px;
  }

  .section__eyebrow {
    margin-bottom: 16px;
  }

  .section__title {
    font-size: clamp(48px, 16vw, 76px);
  }

  .services__grid,
  .reviews__grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .service-card:nth-child(even) {
    min-height: 270px;
    padding: 26px 0 30px;
    border-right: 0;
  }

  .service-card:nth-child(odd) {
    border-right: 0;
  }

  .services .section__title {
    font-size: clamp(46px, 14.2vw, 64px);
  }

  .service-card__number {
    margin-bottom: 54px;
  }

  .portfolio .section__head {
    position: relative;
    top: auto;
    margin: 0 0 12px;
    color: #242426;
    mix-blend-mode: normal;
    pointer-events: auto;
  }

  .portfolio-carousel-shell {
    height: min(680px, 78svh);
    min-height: 500px;
  }

  .portfolio {
    min-height: 0;
    padding-block: 88px;
  }

  .portfolio--hero {
    min-height: 100svh;
    padding: 0;
  }

  .portfolio--hero .portfolio-carousel-shell {
    height: 100svh;
    min-height: 500px;
  }

  .portfolio__logo {
    right: clamp(20px, 6.4vw, 32px);
    bottom: 24px;
  }

  .portfolio .section__head .section__eyebrow {
    color: #757575;
  }

  .portfolio .section__head .section__title {
    color: #242426;
  }

  .portfolio .section__head .section__lead {
    color: #6f6f73;
  }

  .portfolio__contacts {
    top: calc(100% + 22px);
  }

  .portfolio--hero .section__head {
    margin-bottom: 88px;
  }

  .about__stats {
    grid-template-columns: 1fr;
  }

  .about__stat,
  .about__stat + .about__stat {
    padding: 24px 0;
    border-bottom: 1px solid #545458;
    border-left: 0;
  }

  .review-card {
    min-height: 380px;
    border-radius: 24px;
  }

  .contact {
    min-height: 720px;
  }

  .contact__bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact__socials {
    justify-content: flex-start;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .service-card,
  .contact__mail::after,
  .contact__socials a {
    transition: none;
  }
}

@font-face {
  font-family: "Cera Pro";
  src: url("assets/fonts/CeraPro-BoldItalic.woff") format("woff");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  --page-bg: #ffffff;
  --hero-text: #242424;
  --gradient-start: #eb9ed6;
  --gradient-end: #b2e8f6;
  --font-logo: "Zalando Sans Expanded", "Arial Narrow", Arial, sans-serif;
  --font-cera: "Cera Pro", "Avenir Next", Arial, Helvetica, sans-serif;
}

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

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--page-bg);
}

body {
  overflow-x: hidden;
  font-family: var(--font-cera);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(20px, 2.2vw, 36px) clamp(24px, 5.6vw, 96px)
    clamp(24px, 3.75vw, 64px);
  display: flex;
  flex-direction: column;
  overflow: clip;
}

.hero__header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1vw, 14px);
  color: var(--hero-text);
  font-family: var(--font-logo);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1;
  text-decoration: none;
}

.logo__mark {
  width: clamp(1.9rem, 2.5vw, 2.45rem);
  aspect-ratio: 893 / 538;
  flex: none;
  background: currentColor;
  mask: url("assets/tsikada-mark.svg") center / contain no-repeat;
  -webkit-mask: url("assets/tsikada-mark.svg") center / contain no-repeat;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2.2vw, 36px);
}

.nav a {
  position: relative;
  padding: 4px 0;
  color: var(--hero-text);
  font-size: clamp(0.8125rem, 1vw, 1rem);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  padding: clamp(84px, 13vh, 170px) 0 clamp(72px, 10vh, 132px);
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero__title {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  background: linear-gradient(
    90deg,
    var(--gradient-start) 0%,
    var(--gradient-end) 58%,
    var(--gradient-end) 100%
  );
  background-clip: text;
  color: var(--hero-text);
  font-family: var(--font-cera);
  font-size: clamp(4.75rem, 6.35vw, 6rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.052em;
  line-height: 1.09;
  -webkit-background-clip: text;
}

.title-line {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding-right: 0.14em;
  white-space: nowrap;
  color: var(--hero-text);
  -webkit-text-fill-color: var(--hero-text);
}

.title-gradient {
  padding-right: 0.1em;
  color: transparent;
  font-style: italic;
  font-weight: 700;
  -webkit-text-fill-color: transparent;
}

em.title-gradient {
  display: inline;
}

.logo:focus-visible {
  outline: 2px solid var(--gradient-end);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .hero {
    padding: 24px clamp(20px, 6.4vw, 32px) 36px;
  }

  .logo {
    padding-top: 2px;
    font-size: 0.9375rem;
  }

  .logo__mark {
    width: 1.75rem;
  }

  .hero__header {
    align-items: flex-start;
    gap: 24px;
  }

  .nav {
    max-width: 68%;
    flex-wrap: wrap;
    gap: 9px 18px;
  }

  .nav a {
    font-size: 0.8125rem;
  }

  .hero__content {
    padding: clamp(72px, 12vh, 112px) 0 clamp(48px, 8vh, 72px);
  }

  .hero__title {
    font-size: clamp(3rem, 12.5vw, 4.5rem);
    letter-spacing: -0.055em;
    line-height: 1.08;
  }

  .title-line {
    padding-right: 0.16em;
  }
}

@media (max-width: 520px) {
  .hero__header {
    flex-direction: column;
    gap: 20px;
  }

  .nav {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
    gap: 10px 20px;
  }

  .hero__title {
    font-size: 9.5vw;
  }

  .title-line:last-child {
    font-size: 0.84em;
  }

  .hero__content {
    padding-top: clamp(64px, 10vh, 92px);
  }

}


.portfolio__legal {
  position: absolute;
  z-index: 4;
  left: clamp(24px, 5.6vw, 96px);
  bottom: clamp(24px, 3.75vw, 64px);
  max-width: min(420px, calc(100% - 260px));
  color: #fff;
  mix-blend-mode: difference;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: clamp(10px, 0.8vw, 12px);
  line-height: 1.5;
  pointer-events: none;
}

.portfolio__legal p {
  margin: 0;
}

.portfolio__legal strong {
  font-family: "Cera Pro", Arial, sans-serif;
  font-weight: 700;
}

.portfolio__legal .portfolio__copyright {
  margin-top: 10px;
}

@media (max-width: 680px) {
  .portfolio__legal {
    left: clamp(20px, 6.4vw, 32px);
    bottom: 64px;
    max-width: calc(100% - 48px);
    font-size: 10px;
  }
}


.portfolio__project-link {
  position: absolute;
  z-index: 5;
  top: 46%;
  left: clamp(24px, 5.6vw, 96px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  color: #fff;
  mix-blend-mode: difference;
  font-family: "Cera Pro Text", Arial, sans-serif;
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: 1.4;
  text-decoration: none;
}

.portfolio__project-link[hidden] {
  display: none;
}

.portfolio__project-link::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.portfolio__project-link:hover::after,
.portfolio__project-link:focus-visible::after {
  transform: scaleX(1);
}

.portfolio__project-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

@media (max-width: 680px) {
  .portfolio__project-link {
    top: auto;
    bottom: 180px;
    left: clamp(20px, 6.4vw, 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio__project-link::after {
    transition: none;
  }
}


.portfolio__contacts.is-project-description {
  gap: 12px;
}

@media (min-width: 681px) and (max-width: 900px) {
  .portfolio__project-link {
    top: 60%;
  }
}


@media (max-width: 680px) {
  .portfolio--hero {
    height: max(640px, 100svh);
    min-height: 640px;
    padding: 0;
  }

  .portfolio--hero .portfolio-carousel-shell {
    height: 100%;
    min-height: 0;
  }

  .portfolio--hero .section__head {
    position: absolute;
    z-index: 2;
    top: max(26px, env(safe-area-inset-top));
    right: 0;
    left: 0;
    display: block;
    padding-inline: 20px;
    margin: 0;
    mix-blend-mode: difference;
    pointer-events: none;
  }

  .portfolio--hero .section__head .section__title {
    color: #fff;
    font-size: clamp(40px, 12vw, 68px);
    line-height: 0.9;
    letter-spacing: -0.07em;
    overflow-wrap: anywhere;
  }

  .portfolio--hero .portfolio__decode-heading {
    min-height: 1.8em;
  }

  .portfolio--hero .section__head .section__lead {
    position: relative;
    max-width: 290px;
    margin: 18px 0 0;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    transform: none;
  }

  .portfolio--hero .portfolio__contacts {
    top: calc(100% + 14px);
    gap: 2px;
    font-size: 13px;
    line-height: 1.45;
  }

  .portfolio--hero .portfolio__legal {
    left: 20px;
    bottom: max(18px, env(safe-area-inset-bottom));
    max-width: calc(100% - 40px);
    font-size: 8px;
    line-height: 1.4;
  }

  .portfolio--hero .portfolio__legal p:nth-child(4) {
    max-width: 240px;
  }

  .portfolio--hero .portfolio__copyright {
    margin-top: 6px;
  }

  .portfolio--hero .portfolio__logo {
    right: 20px;
    bottom: max(18px, env(safe-area-inset-bottom));
    font-size: 12px;
    gap: 8px;
  }

  .portfolio--hero .logo__mark {
    width: 22px;
  }

  .portfolio--hero .flex-carousel__caption {
    padding-inline: 20px;
    top: calc(var(--flex-carousel-center, 56%) + var(--flex-carousel-half) * var(--flex-carousel-lift, 1) + 14px);
  }

  .portfolio--hero .flex-carousel__title {
    font-size: 14px;
  }

  .portfolio--hero .flex-carousel__count {
    font-size: 10px;
  }

  .portfolio--hero [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .portfolio--hero.is-project-open .section__lead {
    max-width: none;
    max-height: 35svh;
    overflow-y: auto;
    pointer-events: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }

  .portfolio--hero.is-project-open .portfolio__contacts {
    position: static;
    margin-top: 14px;
    gap: 12px;
    font-size: 13px;
  }

  .portfolio--hero .portfolio__project-link {
    top: auto;
    bottom: 130px;
    left: 20px;
    font-size: 16px;
  }
}

/* Mobile keeps the same carousel with a uniform portrait format. */
@media (max-width: 680px) {
  .portfolio--hero .portfolio__logo {
    top: max(20px, env(safe-area-inset-top));
    bottom: auto;
    left: 20px;
    right: auto;
    font-size: 16px;
  }

  .portfolio--hero .section__head {
    top: max(62px, calc(env(safe-area-inset-top) + 42px));
  }

  .portfolio--hero:not(.is-project-open) .section__head .section__title {
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.04em;
  }

  .portfolio--hero:not(.is-project-open) .portfolio__decode-heading {
    min-height: 0;
  }

  .portfolio--hero:not(.is-project-open) .section__lead {
    margin-top: 0;
  }

  .portfolio--hero:not(.is-project-open) .section__lead > [data-project-description],
  .portfolio--hero:not(.is-project-open) .section__lead > [data-project-description-a11y] {
    display: none;
  }

  .portfolio--hero:not(.is-project-open) .portfolio__contacts {
    position: static;
    display: flex;
    margin-top: 14px;
  }

  .portfolio--hero .flex-carousel__caption {
    top: calc(var(--flex-carousel-center, 52%) + var(--flex-carousel-half) + 14px);
  }

  .portfolio--hero .flex-carousel__title {
    animation: none;
  }
}

/* Compact phone layout; desktop rules and carousel preset stay unchanged. */
@media (max-width: 680px) {
  .portfolio--hero .portfolio__logo {
    left: calc(50% - 3px);
    right: auto;
    top: max(24px, env(safe-area-inset-top));
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 19px;
    gap: 9px;
  }

  .portfolio--hero .logo__mark {
    width: 27px;
  }

  .portfolio--hero .section__head {
    top: max(76px, calc(env(safe-area-inset-top) + 52px));
  }

  .portfolio--hero:not(.is-project-open) .section__title {
    display: none;
  }

  .portfolio--hero:not(.is-project-open) .section__lead {
    max-width: none;
    margin: 0;
  }

  .portfolio--hero:not(.is-project-open) .portfolio__contacts {
    margin: 0;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    line-height: 1.4;
  }

  .portfolio--hero .flex-carousel__caption {
    top: calc(var(--flex-carousel-center, 50%) + var(--flex-carousel-half) + 24px);
    padding: 0 20px;
    gap: 9px;
    color: #171717;
  }

  .portfolio--hero .flex-carousel__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
  }

  .portfolio--hero .flex-carousel__count {
    font-family: "Cera Pro Text", Arial, sans-serif;
    font-size: 12px;
    opacity: 0.75;
    line-height: 1.3;
  }

  .portfolio--hero.is-project-open .section__head .section__title {
    font-size: 32px;
    letter-spacing: -0.04em;
    line-height: 1.05;
  }

  .portfolio--hero.is-project-open .portfolio__decode-heading {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .portfolio--hero .portfolio__project-link {
    display: none;
  }

  .flex-carousel__mobile-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
  }

  .flex-carousel__mobile-title[data-caption-link] {
    pointer-events: auto;
    cursor: pointer;
    font-weight: 400;
    font-family: "Cera Pro Text", Arial, sans-serif;
    text-underline-offset: 5px;
  }

  .flex-carousel__mobile-title[data-caption-link]:hover,
  .flex-carousel__mobile-title[data-caption-link]:focus-visible {
    text-decoration: underline;
  }

  .flex-carousel__mobile-title svg {
    flex-shrink: 0;
  }
}

@media (max-width: 680px) {
  .portfolio--hero.is-project-open .section__head {
    top: max(92px, calc(env(safe-area-inset-top) + 68px));
  }
}
