:root {
  --color-paper: #fbfaf8;
  --color-ivory: #f4f2ef;
  --color-ink: #111111;
  --color-muted: #7b7771;
  --color-line: #dedbd6;
  --font-serif: "Times New Roman", Times, Georgia, serif;
  --font-sans: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

.home-page {
  background: #ffffff;
}

.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--color-ivory);
}

.home-hero__image {
  width: 100%;
  height: 126vh;
  height: 126dvh;
  object-fit: cover;
  transform: translate3d(0, 0, 0) scale(1.08);
  transform-origin: center;
  will-change: transform;
}

.home-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08) 46%, rgba(0, 0, 0, 0.22)),
    rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.home-logos {
  position: absolute;
  z-index: 1;
  right: clamp(20px, 5vw, 72px);
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: clamp(20px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(18px, 5vw, 54px);
  padding: 5%;
}

.home-logos img {
  width: 100%;
  max-width: 210px;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}

.home-products {
  background: #ffffff;
  padding: clamp(10px, 2vw, 28px);
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.1vw, 18px);
}

.home-card {
  display: block;
  min-width: 0;
}

.home-card__media {
  position: relative;
  overflow: hidden;
  background: var(--color-ivory);
  aspect-ratio: 3 / 4;
}

.home-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 420ms ease,
    transform 900ms ease;
}

.home-card__image--alternate {
  opacity: 0;
}

.home-card:hover .home-card__image {
  transform: scale(1.025);
}

.home-card:hover .home-card__image--primary {
  opacity: 0;
}

.home-card:hover .home-card__image--alternate {
  opacity: 1;
}

.home-card__caption {
  padding: 13px 2px 18px;
}

.home-card__number,
.product-kicker {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 1.72vw, 30px);
  font-weight: 400;
  line-height: 0.98;
}

.home-card__meta {
  margin: 8px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.35;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px clamp(20px, 5vw, 72px) 42px;
  background: #ffffff;
  border-top: 1px solid var(--color-line);
}

.site-footer__mark {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.social-link {
  color: var(--color-ink);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.social-link:hover {
  color: var(--color-ink);
}

.swipe-hint {
  display: none;
}

.product-page {
  background: var(--color-paper);
}

.back-link {
  position: fixed;
  z-index: 10;
  top: 18px;
  left: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: rgba(251, 250, 248, 0.72);
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 50%;
  backdrop-filter: blur(16px);
}

.back-link svg {
  width: 19px;
  height: 19px;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 58vw) minmax(340px, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.product-gallery {
  min-width: 0;
}

.product-media {
  margin: 0;
  background: var(--color-ivory);
  border-bottom: 1px solid #ffffff;
}

.product-media__asset {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.product-panel {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  flex-direction: column;
  justify-content: center;
  overflow: auto;
  padding: clamp(48px, 7vw, 112px) clamp(38px, 6vw, 96px);
  background: var(--color-paper);
}

.product-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(40px, 5.25vw, 78px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.9;
}

.product-meta {
  display: grid;
  gap: 12px;
  margin: 34px 0 0;
  padding: 0;
}

.product-meta__row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
}

.product-meta dt {
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.3;
  text-transform: uppercase;
}

.product-meta dd {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.product-description {
  max-width: 620px;
  margin-top: 36px;
  color: #252525;
  font-size: 15px;
  line-height: 1.65;
}

.product-description p {
  margin: 0;
}

.appointment-link,
.floating-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--color-ink);
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 220ms ease,
    opacity 220ms ease;
}

.appointment-link {
  width: min(100%, 420px);
  margin-top: 38px;
}

.appointment-link:hover {
  background: var(--color-ink);
  color: #ffffff;
}

.floating-cta {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 16px;
  display: none;
  background: rgba(17, 17, 17, 0.96);
  color: #ffffff;
  border-color: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(14px);
}

.floating-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%);
}

@media (max-width: 1180px) {
  .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-layout {
    grid-template-columns: minmax(0, 55vw) minmax(330px, 1fr);
  }
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-layout {
    display: block;
  }

  .product-gallery {
    position: relative;
    overflow: hidden;
    background: var(--color-ivory);
  }

  .product-track {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .product-track::-webkit-scrollbar {
    display: none;
  }

  .product-media {
    min-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    border-right: 1px solid #ffffff;
    border-bottom: 0;
    scroll-snap-align: start;
  }

  .product-media__asset {
    height: 100vh;
    height: 100dvh;
    object-fit: cover;
  }

  .swipe-hint {
    position: absolute;
    z-index: 3;
    right: 18px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    background: rgba(251, 250, 248, 0.76);
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 999px;
    color: var(--color-ink);
    font-size: 11px;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    backdrop-filter: blur(14px);
  }

  .swipe-hint__gesture {
    position: relative;
    display: block;
    width: 28px;
    height: 1px;
    background: currentColor;
  }

  .swipe-hint__gesture::before,
  .swipe-hint__gesture::after {
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    content: "";
    border-top: 1px solid currentColor;
  }

  .swipe-hint__gesture::before {
    left: 0;
    border-left: 1px solid currentColor;
    transform: translateY(-50%) rotate(-45deg);
    animation: swipe-left 1.8s ease-in-out infinite;
  }

  .swipe-hint__gesture::after {
    right: 0;
    border-right: 1px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
    animation: swipe-right 1.8s ease-in-out infinite;
  }

  @keyframes swipe-left {
    0%,
    100% {
      translate: 0 0;
    }
    50% {
      translate: -4px 0;
    }
  }

  @keyframes swipe-right {
    0%,
    100% {
      translate: 0 0;
    }
    50% {
      translate: 4px 0;
    }
  }

  .product-panel {
    position: relative;
    min-height: auto;
    max-height: none;
    padding: 36px 20px 116px;
    overflow: visible;
  }

  .product-title {
    font-size: clamp(42px, 14vw, 62px);
  }

  .product-meta {
    margin-top: 28px;
  }

  .product-meta__row {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .product-meta dd {
    font-size: 12px;
  }

  .product-description {
    margin-top: 34px;
    font-size: 14px;
    line-height: 1.62;
  }

  .product-panel .appointment-link {
    display: none;
  }

  .floating-cta {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .home-hero::after {
    background:
      linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.28)),
      rgba(0, 0, 0, 0.14);
  }

  .home-logos {
    top: 28px;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
    pointer-events: none;
  }

  .home-logos img {
    max-width: 188px;
  }

  .home-logos img:nth-child(1) {
    position: absolute;
    bottom: 62px;
    order: 2;
  }

  .home-logos img:nth-child(2) {
    position: absolute;
    top: 0;
    order: 1;
  }

  .home-logos img:nth-child(3) {
    position: absolute;
    bottom: 122px;
    order: 3;
  }

  .home-products {
    padding: 0;
  }

  .home-grid {
    display: block;
  }

  .home-card {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: #111111;
    border-bottom: 1px solid #ffffff;
  }

  .home-card__media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
  }

  .home-card__media::after {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0));
  }

  .home-card__media img {
    object-fit: cover;
  }

  .home-card__caption {
    position: absolute;
    z-index: 1;
    right: 20px;
    bottom: calc(22px + env(safe-area-inset-bottom));
    left: 20px;
    padding: 0;
    color: #ffffff;
  }

  .home-card__number,
  .home-card__meta {
    color: rgba(255, 255, 255, 0.72);
  }

  .home-card__title {
    font-size: clamp(38px, 12vw, 58px);
  }

  .site-footer {
    flex-direction: column-reverse;
    justify-content: center;
    min-height: 220px;
    text-align: center;
  }

  .back-link {
    top: 14px;
    left: 14px;
    background: rgba(251, 250, 248, 0.82);
  }
}
