* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

:root {
  --bg-color: #f4f4f1;
  --surface-bg-color: #ffffff;
  --text-color: #1c1c1c;
  --muted-color: rgba(28, 28, 28, 0.62);
  --line-color: #dedcd6;
  --shadow-color: rgba(0, 0, 0, 0.08);
}

html,
body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "EB Garamond", serif;
  font-weight: 600;
  color: var(--text-color);
}

p {
  font-family: "Inter", sans-serif;
  color: var(--muted-color);
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}

.eb-garamond {
  font-family: "EB Garamond", serif;
}

main,
.site-footer__content {
  width: min(920px, 84vw);
  margin: 0 auto;
}

.site-header {
  width: min(860px, 78vw);
  margin: 2rem auto 0;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 8px 26px var(--shadow-color);
}

.site-header__brand {
  width: 7.5rem;
  flex: 0 0 auto;
}

.site-header__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-header__nav-item,
.hero-section p,
.portfolio-section__item p,
.services-section__item p,
.testimonials-section__item p,
.process-section__step p {
  font-family: "Inter", sans-serif;
  transition: 0.35s ease;
}

.site-header__nav-item {
  opacity: 0.58;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.site-header__nav-item--active,
.site-header__nav-item:hover {
  opacity: 1;
}

.site-header__cta--desktop,
.site-header__cta--mobile,
.hero-section__cta--primary {
  padding: 0.45rem 1rem;
  background-color: #222;
  color: #fff;
  font-size: 0.76rem;
  transition: 0.35s ease;
}

.site-header__cta--mobile {
  display: none;
}

.site-header__cta--mobile:hover,
.site-header__cta--mobile:focus,
.site-header__cta--desktop:hover,
.site-header__cta--desktop:focus,
.hero-section__cta--primary:hover,
.hero-section__cta--primary:focus {
  background-color: #3a3a3a;
}

.menu-btn {
  display: none;
}

.hero-section__cta--secondary {
  padding: 0.45rem 1rem;
  background-color: transparent;
  color: #222;
  border: 1px solid rgba(0, 0, 0, 0.18);
  font-size: 0.76rem;
  transition: 0.35s ease;
}

.hero-section__cta {
  flex: 1 1 100%;
  margin-bottom: 2rem;
}

.hero-section__cta--secondary:hover {
  background-color: #eaeaea;
  color: #000;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding-top: 2.4rem;
  text-align: center;
}

.hero-section h1 {
  margin-top: 95px;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--Foundation-Black-black-900, #121212);
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  line-height: 44px;
}

.hero-section p {
  width: min(25rem, 100%);
  line-height: 1.55;

  color: var(--Foundation-Grey-grey-900, #4b4b4b);
  text-align: center;

  /* Text lg/Regular */
  font-family: Inter;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 28px; /* 155.556% */
}

.hero-section__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  width: 30%;
}

.hero-section__animation {
  position: relative;
  width: 100%;
  max-width: 80dvw;
  height: 80dvh;
  margin: 0 auto;
  overflow: hidden;
}

.hero-section__animation-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-section__animation-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 1;
  animation: fade 35s infinite;
}

.hero-section__animation-frame:nth-child(1) {
  animation-delay: 0s;
}
.hero-section__animation-frame:nth-child(2) {
  animation-delay: 5s;
}
.hero-section__animation-frame:nth-child(3) {
  animation-delay: 10s;
}
.hero-section__animation-frame:nth-child(4) {
  animation-delay: 15s;
}
.hero-section__animation-frame:nth-child(5) {
  animation-delay: 20s;
}
.hero-section__animation-frame:nth-child(6) {
  animation-delay: 25s;
}
.hero-section__animation-frame:nth-child(7) {
  animation-delay: 30s;
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  3% {
    opacity: 1;
  } /* Fade in over 1s */
  17% {
    opacity: 1;
  } /* Visible for ~5s total */
  20% {
    opacity: 0;
  } /* Fade out */
  100% {
    opacity: 0;
  }
}

.trusted-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding-top: 2.2rem;
  text-align: center;
  margin-bottom: 95px;
}

.trusted-section h4 {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--Foundation-Black-black-500, #2b2b2b);
  margin-top: 89px;
  /* Display xs/Medium */
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  line-height: 32px; /* 133.333% */
}

.trusted-section__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  margin-top: 0.5rem;
  /* width: 100%; */
  /* border: 2px solid red; */
  /* width: min(100%, 720px); */
}

.trusted-section__logos img {
  /* width: 39px; */
  height: 35px;
  /* aspect-ratio: 1/1; */
  object-fit: contain;
  opacity: 0.9;
}

.portfolio-section,
.services-section,
.testimonials-section,
.process-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 3.5rem;
}

.portfolio-section__intro,
.services-section__intro,
.testimonials-section__intro,
.process-section__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  width: min(100%, 420px);
  margin-bottom: 1.4rem;
}

.portfolio-section__intro img,
.services-section__intro img,
.testimonials-section__intro img,
.process-section__intro img {
  transition: 0.5s ease;
  margin-bottom: 0.3rem;
}

.portfolio-section__intro img:hover,
.services-section__intro img:hover,
.testimonials-section__intro img:hover,
.process-section__intro img:hover {
  box-shadow: 0 0 10rem 0.1rem rgba(0, 0, 0, 0.3);
}

.portfolio-section__intro h4,
.services-section__intro h4,
.testimonials-section__intro h4,
.process-section__intro h4 {
  color: var(--Foundation-Black-black-900, #121212);
  text-align: center;

  /* Display xs/Medium */
  font-family: "EB Garamond";
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 32px; /* 133.333% */
}

.portfolio-section__intro p,
.services-section__intro p,
.testimonials-section__intro p,
.process-section__intro p {
  color: var(--Foundation-Grey-grey-900, #4b4b4b);
  text-align: center;
  /* border: 2px solid red; */
  /* Text md/Regular */
  font-family: Inter;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 150% */
  padding-inline: 10px;
}

.portfolio-section {
  gap: 4rem;
}

.portfolio-section__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(100%, 560px);
  margin: 1.55rem 0;
  gap: 0.5rem;
}

.portfolio-section-image-container {
  width: 100%;
  height: 310px;
  display: grid;
  place-content: center;
}

.item-white .portfolio-section-image-container {
  background-color: var(--surface-bg-color);
}

.item-dark .portfolio-section-image-container {
  background-color: #e6ebe7;
}

.portfolio-section-image-container > img {
  width: 100%;
  /* object-fit: cover; */
  margin-bottom: 0.35rem;
  transform: scale(0.95);
  transition: 0.5s ease;
}

.portfolio-section-image-container > img:hover {
  transform: scale(1);
}

.portfolio-section__meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  flex-wrap: wrap;
}

.portfolio-section__meta h4 {
  font-family: "Inter", serif;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.9;
}

.portfolio-section__meta span {
  padding: 0.15rem 0.35rem;
  background: #e6e4df;
  font-size: 0.68rem;
  color: rgba(28, 28, 28, 0.72);
}

.portfolio-section__item p {
  width: 100%;
  font-size: 0.78rem;
  line-height: 1.6;
}

.portfolio-section__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: rgba(28, 28, 28, 0.6);
}

.portfolio-section__link::after {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M10 7h7v7'/%3E%3C/svg%3E")
    no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M10 7h7v7'/%3E%3C/svg%3E")
    no-repeat center / contain;
}

.services-section {
  gap: 1rem;
}

.services-section__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  width: min(100%, 420px);
}

.services-section__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  width: 100%;
}

.services-section__item img {
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
  opacity: 0.85;
}

.services-section__item p {
  color: var(--Foundation-Black-black-700, #1f1f1f);
  /* Display xs/Regular */
  font-family: "EB Garamond";
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 400;
  line-height: 32px; /* 133.333% */
}

.section-divider {
  width: 100vw;
  margin: 3.5rem calc(50% - 50vw) 0;
  border-top: 2px dashed var(--line-color);
  border-image: repeating-linear-gradient(
      90deg,
      var(--line-color),
      var(--line-color) 10px,
      transparent 10px,
      transparent 20px
    )
    1;
  /* margin-top: 5rem; */
  /* margin-bottom: 100rem; */
}

.testimonials-section {
  gap: 1rem;
  padding-inline: 20px;
}

.testimonials-section__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  width: 80%;
}

.testimonials-section__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding-bottom: 0.65rem;
  background: rgba(255, 255, 255, 0.65);
  /* border: 1px solid rgba(0, 0, 0, 0.05); */
}

.testimonials-section__item img {
  width: 100%;
}

.testimonials-section__item p {
  padding-inline: 0.65rem;
  color: var(--Foundation-Grey-grey-900, #4b4b4b);
  font-family: Inter;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  opacity: 0.5;
}

.testimonials-section__item p:first-of-type {
  font-weight: 600;
}

.process-section {
  gap: 1rem;

  padding-bottom: 1rem;
}

.process-section__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  width: 90%;
  align-items: start;
}

.process-section__step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
}

/* Media container with hover effect */
.step-media {
  position: relative;
  width: 400px;
  height: 188px;
  overflow: hidden;
}

.step-poster {
  object-fit: contain;
}

.step-poster,
.step-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.step-video {
  opacity: 0;
}

.step-media:hover .step-poster {
  opacity: 0;
}

.step-media:hover .step-video {
  opacity: 1;
}

.step-media:hover::after {
  opacity: 1;
}

/* Text styles */
.process-section__step p {
  width: 100%;
  font-size: 0.76rem;
  line-height: 1.55;
  color: rgba(28, 28, 28, 0.78);
}

.process-section__step p:first-of-type {
  margin-top: 0.15rem;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.process-section__step p:nth-of-type(2) {
  font-family: "EB Garamond", serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-color);
}

.process-section__step p:last-of-type {
  font-size: 0.76rem;
}

.site-footer {
  margin-top: 20%;
  background-image: url("/assets/images/footer.png");
  background-color: #181818;
  background-size: contain;
  background-position: bottom;
  background-repeat: no-repeat;
}

.site-footer__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 4rem 0 3rem;
}

.site-footer__brand {
  width: 12rem;
  filter: invert(100%);
}

.site-footer__links ul,
.site-footer__socials ul {
  display: flex;
  gap: 2rem;
}

.site-footer__links ul li,
.site-footer__socials ul li {
  font-family: "EB Garamond", serif;
  font-size: 1rem;
  color: white;
}

.site-footer__socials ul {
  align-items: flex-end;
}

/* ========== SMALL DESKTOP & LARGE TABLET (900px – 1200px) ========== */
@media (min-width: 900px) and (max-width: 1200px) {
  .process-section__steps {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 2rem;
    width: 85%;
  }

  .step-media {
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 188;
  }

  .process-section__step {
    width: auto;
  }
}

/* ========== TABLET PORTRAIT (768px – 899px) ========== */
@media (min-width: 768px) and (max-width: 899px) {
  .process-section__steps {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 1.5rem;
    width: 95%;
  }

  .step-media {
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 188;
  }

  .process-section__step p:nth-of-type(2) {
    font-size: 0.9rem;
  }

  .process-section__step p:last-of-type {
    font-size: 0.7rem;
  }
}

/* ========== VERY SMALL DESKTOP (1025px – 1100px) ========== */
@media (min-width: 1025px) and (max-width: 1100px) {
  .process-section__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
    width: 80%;
  }

  .step-media {
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 188;
  }
}

/* ========== LARGE DESKTOP (1101px+) ========== */
@media (min-width: 1101px) {
  .process-section__steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 90%;
  }
}

/* ========== TABLET (768px – 1024px) ========== */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Main content narrower for comfort */
  main,
  .site-footer__content {
    width: min(780px, 88vw);
  }

  /* Header – slightly wider, less margin */
  .site-header {
    width: min(740px, 90vw);
    margin: 1.2rem auto 0;
    padding: 0.6rem 1.2rem;
  }

  .site-header__brand {
    width: 6.5rem;
  }

  .site-header__nav-list {
    gap: 0.9rem;
  }

  .site-header__nav-item {
    font-size: 0.85rem;
  }

  /* Hero section – better spacing */
  .hero-section h1 {
    margin-top: 60px;
    line-height: 1.2;
  }

  .hero-section__actions {
    width: 50%;
  }

  .hero-section__animation {
    max-width: 90dvw;
    height: 60dvh;
  }

  /* Trusted logos – tighter but still readable */
  .trusted-section__logos {
    gap: 1.5rem 2rem;
  }
  .trusted-section__logos img {
    height: 30px;
  }

  /* Portfolio items – full width but centered */
  .portfolio-section__item {
    width: min(100%, 480px);
  }

  /* Services list – slightly narrower */
  .services-section__list {
    width: min(100%, 360px);
  }
  .services-section__item p {
    font-size: 1.3rem;
  }

  /* Testimonials – 2 columns instead of 3 */
  .testimonials-section__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    width: 85%;
  }

  /* Process steps – 2 columns (first item spans? no, keep 2 cols) */
  .process-section__steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
    width: 90%;
  }
  /* Let the third step take full width on tablet? Better: keep 2 cols, third wraps? Actually grid will auto-place, 3 items → 2 in first row, 1 in second */
  .process-section__step {
    width: auto;
  }
  .step-media {
    width: 100%;
    height: auto;
    aspect-ratio: 400 / 188;
  }

  /* Footer adjustments */
  .site-footer {
    background-size: 180%; /* zoomed but not extreme */
    background-position: bottom center;
    margin-top: 15%;
  }
  .site-footer__content {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
  }
  .site-footer__brand {
    width: 10rem;
  }
  .site-footer__links ul,
  .site-footer__socials ul {
    gap: 1.2rem;
  }
}

/* Fine-tuning for landscape tablets (900–1024) – optional polish */
@media (min-width: 900px) and (max-width: 1024px) {
  .process-section__steps {
    grid-template-columns: repeat(
      3,
      1fr
    ); /* Back to 3 columns on wider tablet */
    gap: 1.5rem;
  }
  .step-media {
    aspect-ratio: 400 / 188;
  }
  .testimonials-section__list {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on wider tablet */
  }
  .site-footer {
    background-size: 140%;
  }
}

@media (max-width: 767px) {
  main {
    width: 100%;
    padding: 20px;
  }

  .site-header {
    margin: 20px;
    width: calc(100% - 40px);
    position: relative;
    padding-inline: 10px;
    padding-block: 0.1rem;
  }

  .menu-btn {
    display: block;
    padding: 1rem;
  }

  .site-header__nav {
    position: absolute;
    border-top: 1px solid var(--line-color);
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }

  .site-header__nav.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .site-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .site-header__cta--desktop {
    display: none;
  }
  .site-header__cta--mobile {
    display: block;
    width: calc(100% - 20px);
    margin: 10px;
  }

  .hero-section h1,
  .hero-section p {
    text-align: left;
  }

  .hero-section h1 {
    margin-top: 2rem;
  }

  .hero-section__actions {
    width: 100%;
  }

  .hero-section__animation {
    max-width: 100dvw;
    height: 50dvh;
  }

  .trusted-section h4 {
    text-align: left;
    width: 100%;
  }

  .portfolio-section-image-container > img {
    transform: scale(1);
  }

  .services-section__item {
    width: 90%;
  }

  .testimonials-section__list,
  .process-section__steps {
    display: flex;
    flex-direction: column;
    width: 100%;
    /* padding-inline: 20px; */
  }
  .process-section__steps,
  .process-section__step {
    width: 100%;
    align-items: center;
  }

  .process-section__step,
  .step-media {
    /* border: 2px solid red; */
    width: 350px;
  }

  .site-footer__content {
    align-items: center;
    width: 100%;
    padding-inline: 10px;
  }

  .site-footer__links ul,
  .site-footer__socials ul {
    flex-direction: column;
    align-items: center;
  }

  .site-footer {
    background-size: 450%;
  }
}

/* Tablet + small laptop (including 768×1024) */
@media (max-width: 1100px) {
  .process-section__steps {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 1.5rem;
    width: 85%;
  }
}
