/* Homepage design tokens and V4-derived component refinements. */
.v4 {
  --serif: var(--sans);
  --on-dark-accent: var(--light);
  --hero-accent: #7aa3d6;
}

.v4 .hero h1,
.v4 .display {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.v4 .display { line-height: 1.05; }

.v4-eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.v4 .nutshell .v4-eyebrow,
.v4-team .v4-eyebrow { color: var(--on-dark-accent); }

.v4 .brand__logo { width: 122px; }
.v4 .projects__motif { display: none; }

/* The montage fills the first viewport and is treated as atmosphere rather
   than content. The blue veil keeps every source clip within the same visual
   system and gives the message a dependable reading field. */
.v4-hero-video {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background: var(--ink) url("assets/video/velho-hero-poster-universal.jpg") center / cover no-repeat;
  pointer-events: none;
}

.v4-hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 27, 52, 0.76) 0%,
    rgba(10, 27, 52, 0.64) 48%,
    rgba(10, 27, 52, 0.8) 100%
  );
}

.v4-hero-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.72) contrast(1.06);
}

.v4-hero-video__play {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  background: rgba(255, 250, 241, 0.92);
  border: 0;
  border-radius: 3px;
  box-shadow: 0 4px 18px rgba(10, 27, 52, 0.22);
  cursor: pointer;
}

.v4-hero-video__play[hidden] { display: none; }
.v4-hero-video__play img { display: block; }

.v4 .hero { background: var(--ink); color: var(--light); }
.v4 .problem { background: var(--white); }
.v4 .year { background: var(--paper); }
.v4 .projects { background: var(--white); }
.v4 .v4-team { background: var(--ink); }
.v4 .contact { background: var(--white); }

.v4 .site-header {
  background: rgba(10, 27, 52, 0.5);
  border-bottom-color: rgba(255, 250, 241, 0.14);
  backdrop-filter: blur(8px);
}

.v4 .site-header .brand__logo { filter: brightness(0) invert(1); }
.v4 .site-header .site-nav a { color: var(--light); opacity: 0.8; }
.v4 .site-header > .site-header__inner > .button--primary {
  background: var(--light);
  color: var(--ink);
}

.v4 .site-header.is-scrolled {
  background: rgba(244, 241, 234, 0.9);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

.v4 .site-header.is-scrolled .brand__logo { filter: none; }
.v4 .site-header.is-scrolled .site-nav a { color: var(--ink); opacity: 0.72; }
.v4 .site-header.is-scrolled > .site-header__inner > .button--primary {
  background: var(--ink);
  color: var(--light);
}

.v4 .hero__inner {
  position: relative;
  z-index: 1;
  align-items: center;
  text-align: center;
}

.v4 .hero h1 {
  max-width: 15ch;
  font-size: clamp(44px, 6.8vw, 84px);
  color: var(--light);
  text-shadow: 0 2px 24px rgba(10, 27, 52, 0.28);
}

.v4-growth {
  color: var(--hero-accent);
}

.v4 .hero__lede {
  max-width: 68ch;
  font-size: clamp(15.5px, 1.15vw, 17px);
  line-height: 1.56;
  color: rgba(255, 250, 241, 0.86);
  text-shadow: 0 1px 16px rgba(10, 27, 52, 0.35);
}

.v4-hero__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.press-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.press-strip__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 112px;
  padding-block: 22px 25px;
}

.press-strip__label {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.press-strip__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 76px);
  width: 100%;
}

.press-strip__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  opacity: 0.44;
  transition: opacity 180ms ease, transform 180ms ease;
}

.press-strip__logo:hover,
.press-strip__logo:focus-visible {
  opacity: 0.92;
  transform: translateY(-1px);
}

.press-strip__logo img {
  height: clamp(14px, 3.024vw, 40.32px);
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: grayscale(1);
}

.press-strip__logo--hbl img {
  mix-blend-mode: multiply;
}

.v4 .problem .display { max-width: 16ch; }
.v4 .problem .section__head { max-width: 790px; }
.v4 .problem__list h3 { min-height: 0; margin: 0; }

.v4-problem-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.v4-problem-icon {
  display: inline-flex;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin-top: 3px;
}

.v4-problem-icon img {
  width: 24px;
  height: 24px;
}

.v4-model__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(42px, 6vw, 88px);
  align-items: stretch;
}

.v4-model__intro { min-width: 0; }

.v4-model__head {
  max-width: none;
  margin-bottom: 0;
}

.v4-model__steps {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v4-model__step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-content: center;
  column-gap: 18px;
  padding: clamp(16px, 2vw, 24px) 0;
  border: 0;
  border-top: 1px solid rgba(255, 250, 241, 0.26);
  border-radius: 0;
  background: transparent;
  color: var(--light);
}

.v4-model__step:last-child {
  border-bottom: 1px solid rgba(255, 250, 241, 0.26);
}

.v4-model__step-head {
  grid-row: 1 / 3;
  margin: 2px 0 0;
  color: var(--on-dark-accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.v4-model__step h3 {
  margin: 0 0 9px;
  color: var(--light);
  font-size: 19px;
  line-height: 1.2;
}

.v4-model__step p {
  margin: 0;
  color: rgba(255, 250, 241, 0.7);
  font-size: 14.5px;
  line-height: 1.58;
}

.v4 .year .section__head { max-width: 820px; }
.v4 .projects .section__head { max-width: 760px; }

.v4 .plan__row {
  padding-block: clamp(8px, 0.9vw, 11px);
}

.v4 .plan__item-name {
  grid-column: var(--label-from) / var(--label-to);
  width: auto;
  max-width: 100%;
  margin-bottom: 4px;
  padding-block: 1px;
  line-height: 1.22;
  background: var(--paper);
}

.v4 .plan__item-name::after {
  bottom: -4px;
  height: 4px;
}

/* Each example gets a distinct, restrained working colour. */
.v4-project__art {
  --art-start: var(--ink);
  --art-end: #18385e;
  min-height: 190px;
  aspect-ratio: 4 / 3;
  place-items: center;
  margin-bottom: 20px;
  padding: 26px;
  border: 1px solid rgba(255, 250, 241, 0.2);
  background: linear-gradient(145deg, var(--art-start), var(--art-end));
}

.v4-project__art--customer { --art-start: #315a86; --art-end: #456f99; }
.v4-project__art--quotes { --art-start: #8f3a30; --art-end: #ab5547; }
.v4-project__art--field { --art-start: #687257; --art-end: #818b6f; }
.v4-project__art--scheduling { --art-start: #0a1b34; --art-end: #18385e; }
.v4-project__art--management { --art-start: #405367; --art-end: #586c82; }
.v4-project__art--robotics { --art-start: #72564d; --art-end: #8f6d61; }

.v4-project__art .mock__card,
.v4-project__art .mock--message,
.v4-project__art .mock__field,
.v4-project__art .mock__bubble,
.v4-project__art .mock__row {
  background: rgba(255, 250, 241, 0.94);
  box-shadow: 0 8px 24px rgba(10, 27, 52, 0.18);
}

.v4-project__art--quotes .mock__arrow { background: rgba(255, 250, 241, 0.58); }
.v4-project__art--quotes .mock__arrow::after { border-left-color: rgba(255, 250, 241, 0.58); }
.v4-project__art--scheduling .mock__bubble--out {
  background: rgba(255, 250, 241, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 241, 0.12);
}
.v4-project__art--scheduling .mock__bubble--out .mock__line { background: rgba(255, 250, 241, 0.58); }
.v4-project__art--management .mock--chart { border-bottom-color: rgba(255, 250, 241, 0.32); }
.v4-project__art--management .mock__bar { background: rgba(255, 250, 241, 0.38); }
.v4-project__art--management .mock__bar--peak { background: var(--light); }
.v4-project__art--robotics .mock__chip { color: rgba(255, 250, 241, 0.94); }

.v4-projects-carousel {
  position: relative;
  --carousel-gap: clamp(20px, 2.6vw, 34px);
}

.v4-projects-viewport {
  margin: -3px;
  padding: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.v4-projects-viewport::-webkit-scrollbar { display: none; }

.v4 .projects__grid {
  position: relative;
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - var(--carousel-gap) - var(--carousel-gap)) / 3);
  gap: var(--carousel-gap);
}

.v4 .project {
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.v4-carousel__button {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 8px 26px rgba(10, 27, 52, 0.14);
  font: 500 24px/1 var(--sans);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.v4-carousel__button:hover {
  background: var(--ink);
  color: var(--light);
}

.v4-carousel__button:active { transform: translateY(-50%) scale(0.96); }
.v4-carousel__button--previous { left: -23px; }
.v4-carousel__button--next { right: -23px; }

.v4 .contact__form { border: 0; }

.form-privacy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.form-privacy a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.v4-footer__links {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

.v4-footer__links a,
.v4-footer__links .cookie-settings-link {
  color: var(--ink);
  text-decoration: none;
}

.v4-footer__links a:hover,
.v4-footer__links .cookie-settings-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.v4-legal { background: var(--paper); }

.v4-privacy {
  min-height: calc(100vh - 102px);
  padding-top: clamp(118px, 14vw, 168px);
  background: var(--white);
}

.v4-privacy__head {
  max-width: 790px;
  margin-bottom: clamp(48px, 6vw, 72px);
}

.v4-privacy__meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.v4-privacy__content {
  max-width: 790px;
}

.v4-privacy__content section {
  padding-block: clamp(28px, 4vw, 42px);
  border-top: 1px solid var(--line);
}

.v4-privacy__content h2 {
  margin: 0 0 14px;
  font-size: clamp(23px, 2.6vw, 31px);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.v4-privacy__content h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  line-height: 1.3;
}

.v4-privacy__content p,
.v4-privacy__content li {
  color: rgba(10, 27, 52, 0.78);
  font-size: 16px;
  line-height: 1.68;
}

.v4-privacy__content p { margin: 0 0 14px; }
.v4-privacy__content ul { margin: 12px 0 0; padding-left: 22px; }
.v4-privacy__content li + li { margin-top: 8px; }
.v4-privacy__content a { text-underline-offset: 3px; }

.v4-team { color: var(--light); }
.v4-team .display { max-width: 14ch; color: var(--light); }
.v4-team .section__head { max-width: 790px; }
.v4-team .section__lede { color: rgba(255, 250, 241, 0.72); }

.v4-team__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 38px);
  max-width: 600px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v4-founder {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 250, 241, 0.24);
}

.v4-founder__portrait {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  width: 100%;
  max-width: 280px;
  margin: 0 0 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #f4f1ea 0%, #dde6f2 100%);
}

.v4-founder__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 8%;
  transform: scale(1.38);
  transform-origin: center 14%;
}

.v4-founder__portrait--placeholder {
  place-items: center;
  background: linear-gradient(135deg, rgba(244, 241, 234, 0.08), rgba(221, 230, 242, 0.17));
}

.v4-founder__portrait--placeholder span {
  color: rgba(255, 250, 241, 0.28);
  font-size: clamp(64px, 8vw, 108px);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.v4-founder h3 {
  margin: 0;
  color: var(--light);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.v4-founder p {
  margin: 6px 0 0;
  color: rgba(255, 250, 241, 0.58);
  font-size: 13px;
  line-height: 1.4;
}

@media (min-width: 941px) {
  /* At the left edge there is no preceding month available for a symmetric
     label lane. Move the first quick-win label half a month back over its bar. */
  .v4 .plan__row--quick .plan__item:first-child .plan__item-name {
    inset-inline-start: -25%;
  }
}

@media (max-width: 940px) {
  .v4-model__layout { grid-template-columns: 1fr; }
  .v4-model__steps { margin-top: 38px; }
  .v4 .projects__grid { grid-auto-columns: calc((100% - var(--carousel-gap)) / 2); }
  .v4-team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v4 .plan__row--quick .plan__item-name {
    grid-column: var(--mobile-label-from) / var(--mobile-label-to);
    /* The safety lane spans two months while each quick-win bar spans the
       first month. Shift the label by half a month so both centres coincide. */
    inset-inline-start: -25%;
  }
}

@media (max-width: 760px) {
  .v4 .site-header__inner > .button { display: inline-flex; }
  .v4 .brand__logo { width: 105px; }
  .v4 .hero__inner { padding-block: 86px 56px; }
  .v4-hero__actions { width: 100%; }
  .v4-hero__actions .button { flex: 1 1 180px; }
  .press-strip__inner {
    gap: 15px;
    padding-block: 22px 24px;
  }
  .press-strip__logos { gap: clamp(18px, 5.5vw, 34px); }
  .v4 .problem__list h3 { min-height: 0; }
}

@media (max-width: 560px) {
  .v4-model__step {
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    padding: 18px 0;
  }
  .v4-model__steps { grid-template-columns: 1fr; }
  .v4 .projects__grid { grid-auto-columns: 100%; }
  .v4-project__art { aspect-ratio: 16 / 10; }
  .v4-carousel__button { width: 40px; height: 40px; font-size: 21px; }
  .v4-carousel__button--previous { left: -10px; }
  .v4-carousel__button--next { right: -10px; }
}

@media (max-width: 460px) {
  .v4 .site-header__inner { gap: 10px; }
  .v4 .brand__logo { width: 90px; }
  .v4 .site-header__inner > .button {
    min-height: 36px;
    padding: 8px 10px;
  }
  .v4 .hero h1 { font-size: clamp(41px, 13vw, 58px); }
  .v4-hero__actions { display: grid; }
  .v4-hero__actions .button { width: 100%; }
  .v4-team__grid { grid-template-columns: 1fr; }
  .v4-footer__links { justify-self: start; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .v4-projects-viewport { scroll-behavior: auto; }
}
