@import url("./header-line-shadow.css");
@import url("./hero-stories.css");
:root {
  --demo-black: #050607;
  --demo-white: #ffffff;
  --demo-muted-white: rgba(255, 255, 255, 0.28);
}

.unified-home-shop {
  background: var(--demo-black);
}

.unified-page {
  width: 100%;
  min-height: 100vh;
  background: var(--demo-black);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 9px 12px;
  background: var(--demo-white);
  color: var(--demo-black);
  font-size: 12px;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  outline: 1px solid var(--demo-black);
  outline-offset: 2px;
  transform: translateY(0);
}

.home-hero {
  position: relative;
  width: 100%;
  min-height: 520px;
  max-height: 82vh;
  aspect-ratio: 16 / 9;
  overflow: visible;
  background: #151716 url("/restid-storefront-2-poster.webp") center / cover no-repeat;
  color: var(--demo-white);
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  filter: brightness(0.85) saturate(0.8);
  transition: opacity 420ms ease;
}

.hero-video.is-playing {
  opacity: 1;
}

.hero-header {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.hero-header .brand-mark,
.hero-socials,
.language-switch {
  transition: opacity 240ms ease;
}

.hero-socials {
  position: absolute;
  top: 43px;
  left: 50px;
  z-index: 12;
  display: flex;
  align-items: center;
  height: 24px;
  gap: 17px;
}

.hero-social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--demo-muted-white);
  opacity: 0.62;
  transition: color 160ms ease, opacity 160ms ease;
}

.hero-social-link:hover,
.hero-social-link:focus-visible {
  color: rgba(255, 255, 255, 0.48);
  opacity: 0.82;
}

.hero-social-link svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-social-handle {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  color: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  letter-spacing: 0.02em;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3px);
  transition: opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.hero-social-link:hover .hero-social-handle,
.hero-social-link:focus-visible .hero-social-handle {
  opacity: 1;
  transform: translate(-50%, 0);
}

.language-switch {
  position: absolute;
  top: 44px;
  right: 51px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  height: 24px;
  gap: 10px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-switch svg {
  display: block;
  width: 22px;
  height: 22px;
  color: var(--demo-white);
  opacity: 0.28;
  stroke-width: 1.8;
  transition: opacity 160ms ease;
}

.language-switch:hover svg {
  opacity: 0.48;
}

.language-notice {
  position: absolute;
  top: 78px;
  right: 51px;
  z-index: 12;
  width: 214px;
  padding: 11px 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(5, 6, 7, 0.46);
  color: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 11px;
  line-height: 1.28;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}

.language-notice.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  min-width: 198px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.18);
  color: var(--demo-white);
  font-size: clamp(16px, 1.28vw, 20px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  border-color: var(--demo-white);
  background: var(--demo-white);
  color: var(--demo-black);
}

.shop-stage {
  position: relative;
  scroll-margin-top: 0;
  background: var(--demo-white);
}

.unified-home-shop .shop-page {
  min-height: 100vh;
}

.unified-home-shop .unified-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  width: 100%;
  height: var(--restid-header-height);
  --line: rgba(255, 255, 255, 0.72);
  background: transparent;
  color: var(--demo-white);
  transition: background-color 260ms ease, color 260ms ease;
}

.unified-home-shop .unified-header .brand-mark img,
.unified-home-shop .unified-header .header-line,
.unified-home-shop .unified-header .cart-link,
.unified-home-shop .unified-header .hero-socials,
.unified-home-shop .unified-header .language-switch {
  transition: background-color 260ms ease, color 260ms ease, filter 260ms ease, opacity 220ms ease, visibility 220ms ease;
}

.unified-home-shop .unified-header .header-line,
.unified-home-shop .unified-header .cart-link {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.unified-home-shop.shop-is-active .unified-header {
  --line: var(--demo-black);
  background: rgba(255, 255, 255, 0.96);
  color: var(--demo-black);
}

.unified-home-shop.shop-is-active .unified-header .brand-mark img {
  filter: invert(1);
}

.unified-home-shop.shop-is-active .unified-header .hero-socials,
.unified-home-shop.shop-is-active .unified-header .language-switch,
.unified-home-shop.shop-is-active .unified-header .language-notice {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.unified-home-shop.shop-is-active .unified-header .header-line,
.unified-home-shop.shop-is-active .unified-header .cart-link {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.unified-home-shop.shop-is-active .unified-header .cart-link:not(.has-items) {
  display: inline-flex;
}

.unified-home-shop .unified-header .cart-link.has-items {
  position: fixed;
  z-index: 102;
  min-height: 40px;
  gap: 0;
  padding: 4px 7px 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.18);
  backdrop-filter: blur(14px) saturate(1.18);
  box-shadow: none;
  overflow: visible;
}

.unified-home-shop:not(.shop-is-active) .unified-header .cart-link.has-items {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.unified-home-shop .shop-header-anchor {
  position: relative;
  top: auto;
  z-index: 0;
  background: var(--demo-white);
}

@media (max-width: 980px) {
  .home-hero {
    height: 68vh;
    min-height: 500px;
    max-height: none;
    aspect-ratio: auto;
  }
}

@media (max-width: 720px) {
  .home-hero {
    height: 68vh;
    min-height: 480px;
    background-image: url("/restid-storefront-2-poster-mobile.webp");
  }

  .hero-socials {
    top: 39px;
    left: 21px;
    gap: 13px;
  }

  .hero-social-link {
    width: 21px;
    height: 21px;
  }

  .language-switch {
    top: 39px;
    right: 21px;
    gap: 8px;
    font-size: 13px;
  }

  .language-switch svg {
    width: 20px;
    height: 20px;
  }

  .language-notice {
    top: 72px;
    right: 21px;
    width: min(218px, calc(100vw - 42px));
  }

  .hero-cta {
    min-width: 178px;
    padding: 12px 24px 13px;
    font-size: 16px;
  }
}

@media (max-width: 420px) {
  .home-hero {
    height: 66vh;
    min-height: 460px;
  }

  .hero-socials {
    gap: 10px;
  }

  .hero-social-link {
    width: 20px;
    height: 20px;
  }
}

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

  .hero-video,
  .hero-header .brand-mark,
  .hero-socials,
  .language-switch,
  .unified-home-shop .unified-header,
  .unified-home-shop .unified-header .header-line,
  .unified-home-shop .unified-header .brand-mark img,
  .unified-home-shop .unified-header .cart-link {
    transition: none;
  }
}

/* Header lines wipe outward only; exit is a quick fade with no reverse motion. */
.unified-home-shop .unified-header .header-line {
  --header-line-reveal-duration: 300ms;
  --header-line-forward-duration: clamp(150ms, calc(var(--header-line-reveal-duration) - 100ms), 360ms);
  will-change: clip-path;
  transition:
    clip-path 0s linear 100ms,
    -webkit-clip-path 0s linear 100ms,
    background-color 260ms ease,
    opacity 100ms ease-out,
    visibility 0s linear 100ms;
}

.unified-home-shop .unified-header .header-line-left {
  -webkit-clip-path: inset(0 0 0 100%);
  clip-path: inset(0 0 0 100%);
}

.unified-home-shop .unified-header .header-line-right {
  -webkit-clip-path: inset(0 100% 0 0);
  clip-path: inset(0 100% 0 0);
}

.unified-home-shop.shop-is-active .unified-header .header-line {
  -webkit-clip-path: inset(0);
  clip-path: inset(0);
  transition:
    clip-path var(--header-line-forward-duration) cubic-bezier(0.45, 0, 0.55, 1),
    -webkit-clip-path var(--header-line-forward-duration) cubic-bezier(0.45, 0, 0.55, 1),
    background-color 260ms ease,
    opacity 0s linear 0s,
    visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .unified-home-shop .unified-header .header-line {
    transition: none;
    will-change: auto;
  }
}
