/* Elevium — private refinement layer
   A quiet motion and typography system shared by every page. */

@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: elevium-page-out 180ms cubic-bezier(.55, 0, 1, .45) both;
}

::view-transition-new(root) {
  animation: elevium-page-in 520ms cubic-bezier(.22, 1, .36, 1) both;
}

::view-transition-group(elevium-mark) { animation-duration: 520ms; }

@keyframes elevium-page-out {
  to { opacity: 0; transform: translateY(-7px); }
}

@keyframes elevium-page-in {
  from { opacity: 0; transform: translateY(10px); }
}

:root {
  --ease-elevium: cubic-bezier(.22, 1, .36, 1);
  --ease-elevium-soft: cubic-bezier(.33, 1, .68, 1);
  --silver-bright: #d6d8da;
  --silver-deep: #777b80;
  --paper-refined: #f5f5f3;
  --header-progress: 0;
}

html {
  scroll-padding-top: 5.5rem;
  scrollbar-color: #8d9094 #e8e8e6;
  scrollbar-width: thin;
  background: var(--ink);
}

body {
  overflow-x: clip;
  background: var(--paper-refined);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

::selection { color: var(--white); background: #777b80; }

:where(a, button, input, textarea):focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

:where(a, button) { -webkit-tap-highlight-color: transparent; }

h1, h2, h3 {
  font-kerning: normal;
  text-wrap: balance;
}

p { orphans: 3; widows: 3; }

.wordmark { view-transition-name: elevium-mark; }

/* Navigation: lighter in repose, precise while scrolling. */
.site-header {
  isolation: isolate;
  height: 88px;
  padding-inline: clamp(1.4rem, 4vw, 4.5rem);
  border-bottom-color: rgba(255, 255, 255, .2);
  transition:
    height 600ms var(--ease-elevium),
    color 420ms ease,
    border-color 420ms ease,
    transform 600ms var(--ease-elevium);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: rgba(245, 245, 243, .84);
  box-shadow: 0 12px 42px rgba(8, 9, 10, 0);
  backdrop-filter: blur(24px) saturate(115%);
  -webkit-backdrop-filter: blur(24px) saturate(115%);
  transition: opacity 420ms ease, box-shadow 420ms ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: calc(var(--header-progress, 0) * 100%);
  height: 1px;
  background: linear-gradient(90deg, #767a7e, #c9cbcd);
  transition: opacity 300ms ease;
}

.site-header.scrolled {
  height: 70px;
  background: transparent;
  border-color: rgba(8, 9, 10, .13);
  box-shadow: none;
  backdrop-filter: none;
}

.site-header.scrolled::before {
  opacity: 1;
  box-shadow: 0 12px 42px rgba(8, 9, 10, .045);
}

.site-header.header-hidden { transform: translateY(calc(-100% - 2px)); }

.wordmark {
  width: 150px;
  transform-origin: left center;
  transition: filter 420ms ease, opacity 300ms ease, transform 500ms var(--ease-elevium);
}

.wordmark:hover { opacity: .72; transform: translateX(2px); }

.desktop-nav { gap: clamp(1.2rem, 2vw, 2.5rem); }

.desktop-nav a,
.language {
  font-size: .75rem;
  letter-spacing: .17em;
}

.desktop-nav a {
  opacity: .72;
  transition: opacity 280ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active { opacity: 1; }

.desktop-nav a::after {
  bottom: -9px;
  right: 100%;
  transition: right 500ms var(--ease-elevium);
}

.language { transition: opacity 250ms ease; }
.language:hover { opacity: .55; }

.menu-toggle span:not(.sr-only) {
  transform-origin: center;
  transition: transform 450ms var(--ease-elevium), margin 450ms var(--ease-elevium);
}

.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* Cinematic hero system. */
:is(.hero, .story-hero, .place-hero, .product-hero, .method-hero) {
  min-height: max(720px, 100svh);
  isolation: isolate;
  background: #070809;
}

:is(.hero, .story-hero, .place-hero, .product-hero, .method-hero) > img {
  animation: none;
  will-change: transform;
  filter: saturate(.9) contrast(1.025);
}

.motion-ready :is(.hero, .story-hero, .place-hero, .product-hero, .method-hero) > img {
  opacity: .82;
  transform: translate3d(0, 0, 0) scale(1.085);
  transition: opacity 1200ms ease, transform 1900ms var(--ease-elevium);
}

.motion-ready.hero-ready :is(.hero, .story-hero, .place-hero, .product-hero, .method-hero) > img {
  opacity: 1;
  transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.055);
}

:is(.hero-shade, .story-hero-shade, .place-hero-shade, .product-hero-shade, .method-hero-shade) {
  background:
    radial-gradient(circle at 72% 36%, transparent 0, rgba(0, 0, 0, .08) 50%, rgba(0, 0, 0, .32) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .76) 0%, rgba(0, 0, 0, .32) 52%, rgba(0, 0, 0, .12) 78%),
    linear-gradient(0deg, rgba(0, 0, 0, .5), transparent 58%);
}

:is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) {
  z-index: 2;
}

.motion-ready :is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) > * {
  opacity: 0;
  filter: blur(3px);
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 900ms ease,
    filter 1000ms ease,
    transform 1200ms var(--ease-elevium);
}

.motion-ready.hero-ready :is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) > * {
  opacity: 1;
  filter: none;
  transform: none;
}

.motion-ready.hero-ready :is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) > :nth-child(1) { transition-delay: 120ms; }
.motion-ready.hero-ready :is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) > :nth-child(2) { transition-delay: 210ms; }
.motion-ready.hero-ready :is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) > :nth-child(3) { transition-delay: 330ms; }
.motion-ready.hero-ready :is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) > :nth-child(4) { transition-delay: 430ms; }

.motion-ready :is(.collection-hero-copy, .contact-info, .legal-hero-inner) > * {
  opacity: 0;
  filter: blur(3px);
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 850ms ease,
    filter 950ms ease,
    transform 1150ms var(--ease-elevium);
}

.motion-ready.hero-ready :is(.collection-hero-copy, .contact-info, .legal-hero-inner) > * {
  opacity: 1;
  filter: none;
  transform: none;
}

.motion-ready.hero-ready :is(.collection-hero-copy, .contact-info, .legal-hero-inner) > :nth-child(1) { transition-delay: 100ms; }
.motion-ready.hero-ready :is(.collection-hero-copy, .contact-info, .legal-hero-inner) > :nth-child(2) { transition-delay: 190ms; }
.motion-ready.hero-ready :is(.collection-hero-copy, .contact-info, .legal-hero-inner) > :nth-child(3) { transition-delay: 300ms; }
.motion-ready.hero-ready :is(.collection-hero-copy, .contact-info, .legal-hero-inner) > :nth-child(4) { transition-delay: 400ms; }

.motion-ready .bottle-triptych figure {
  opacity: .55;
  clip-path: inset(100% 0 0 0);
  transition:
    opacity 900ms ease,
    clip-path 1300ms var(--ease-elevium);
}

.motion-ready.hero-ready .bottle-triptych figure {
  opacity: 1;
  clip-path: inset(0);
}

.motion-ready.hero-ready .bottle-triptych figure:nth-child(1) { transition-delay: 120ms; }
.motion-ready.hero-ready .bottle-triptych figure:nth-child(2) { transition-delay: 220ms; }
.motion-ready.hero-ready .bottle-triptych figure:nth-child(3) { transition-delay: 320ms; }

.motion-ready .contact-image {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1450ms var(--ease-elevium);
}

.motion-ready.hero-ready .contact-image { clip-path: inset(0); }

.contact-image img {
  transform: scale(1.045);
  transition: transform 1800ms var(--ease-elevium);
}

.motion-ready.hero-ready .contact-image img { transform: scale(1.001); }

:is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) h1 {
  letter-spacing: -.047em;
  line-height: .94;
}

.hero-copy,
.story-hero-content > p:last-child,
.place-hero-content > p:last-child,
.method-hero-content > p:last-child {
  line-height: 1.62;
}

.hero-kicker::before {
  content: "";
  width: 42px;
  height: 1px;
  margin-bottom: .55rem;
  background: rgba(255, 255, 255, .6);
}

.scroll-cue { overflow: hidden; }

.scroll-cue i {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .28);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, .92);
  transform: translateY(-105%);
  animation: elevium-scroll-line 2.4s var(--ease-elevium) infinite;
}

@keyframes elevium-scroll-line {
  0% { transform: translateY(-105%); }
  45%, 65% { transform: translateY(0); }
  100% { transform: translateY(105%); }
}

/* Editorial rhythm and mineral surfaces. */
.section-pad { padding-block: clamp(7rem, 11vw, 12rem); }

.stone-surface::before {
  opacity: .052;
  background-size: 680px auto;
}

.section-index,
.eyebrow,
.wine-info p,
.wine-info > span,
.wine-info a,
.product-data dt,
.wine-data dt,
.contact-list span,
.legal-section-number {
  font-size: max(.72rem, 12px);
}

.section-lead-rule {
  transform-origin: left center;
  transition: transform 1000ms var(--ease-elevium) 120ms;
}

.motion-ready .reveal .section-lead-rule { transform: scaleX(0); }
.motion-ready .reveal.visible .section-lead-rule { transform: scaleX(1); }

.manifesto h2,
.collection h2,
.story-intro h2,
.two-generations h2,
.elevium-birth h2,
.valley h2,
.wind h2,
.adige h2,
.place-summary h2,
.product-tasting > h2,
.method-layout h2 {
  letter-spacing: -.048em;
}

.manifesto-copy > p:last-child,
.generations-copy > p,
.collection-copy,
.story-intro-copy > p:last-child,
.birth-copy > p,
.valley-copy > p:last-child,
.wind-heading > p:last-child,
.adige-copy > p:last-child,
.method-layout > p {
  line-height: 1.78;
}

.motion-ready .reveal {
  opacity: 0;
  filter: blur(2px);
  transform: translate3d(0, 42px, 0);
  transition:
    opacity 900ms ease var(--reveal-delay, 0ms),
    filter 1000ms ease var(--reveal-delay, 0ms),
    transform 1200ms var(--ease-elevium) var(--reveal-delay, 0ms);
}

.motion-ready .reveal.visible {
  opacity: 1;
  filter: none;
  transform: none;
}

.motion-ready :is(.image-reveal, .story-panorama, .generation-frame, .birth-image, .valley-image, .adige-image).reveal {
  opacity: 0;
  filter: none;
  transform: translate3d(0, 22px, 0);
  clip-path: none;
  transition:
    opacity 850ms ease var(--reveal-delay, 0ms),
    transform 1250ms var(--ease-elevium) var(--reveal-delay, 0ms);
}

.motion-ready :is(.image-reveal, .story-panorama, .generation-frame, .birth-image, .valley-image, .adige-image).reveal.visible {
  opacity: 1;
  transform: none;
}

:is(.image-reveal, .story-panorama, .generation-frame, .birth-image, .valley-image, .adige-image) img {
  transform: translate3d(0, var(--media-shift, 0px), 0) scale(1.045);
  transition: transform 1600ms var(--ease-elevium);
}

:is(.image-reveal, .story-panorama, .generation-frame, .birth-image, .valley-image, .adige-image).visible img {
  transform: translate3d(0, var(--media-shift, 0px), 0) scale(1.001);
}

/* Home story: a more confident overlap and quieter white space. */
.manifesto { min-height: 92vh; }

.manifesto-copy { padding-left: clamp(0rem, 6vw, 7rem); }

.generations-copy {
  box-shadow: -38px 38px 80px rgba(8, 9, 10, .055);
}

/* Territory becomes a cinematic pause, with translucent mineral cards. */
.territory-sticky > img {
  transform: translate3d(0, var(--territory-shift, 0px), 0) scale(1.045);
  will-change: transform;
}

.fact {
  min-height: 230px;
  padding: clamp(1.4rem, 2.2vw, 2.3rem);
  background: rgba(8, 9, 10, .66);
  backdrop-filter: blur(16px) saturate(105%);
  -webkit-backdrop-filter: blur(16px) saturate(105%);
  transition: background 450ms ease, transform 600ms var(--ease-elevium);
}

.fact h3 { font-size: clamp(1.65rem, 2.2vw, 2.35rem); }
.fact p { max-width: 34ch; font-size: .9rem; line-height: 1.65; }

@media (hover: hover) {
  .fact:hover { background: rgba(8, 9, 10, .79); transform: translateY(-4px); }
}

/* Wines: light follows the bottle, never the interface. */
.wine-card { transition: transform 700ms var(--ease-elevium); }

.wine-image,
.bottle-triptych figure,
.product-bottle {
  isolation: isolate;
}

.wine-image::before,
.bottle-triptych figure::before,
.product-bottle::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .42;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 36%), rgba(255, 255, 255, .74), transparent 36%);
  transition: opacity 500ms ease;
}

.wine-image img,
.bottle-triptych img,
.product-bottle img { z-index: 1; }

.wine-image::after { inset: 14px; border-color: rgba(8, 9, 10, .11); }

.wine-info {
  position: relative;
  padding-top: 1.8rem;
  transition: border-color 350ms ease;
}

.wine-info h3 { letter-spacing: -.035em; }

.wine-info a,
.text-link,
.collection-cta,
.button-light,
.footer-mail,
.buy-link,
.download-link {
  transition:
    color 320ms ease,
    background 320ms ease,
    border-color 320ms ease,
    opacity 320ms ease;
}

@media (hover: hover) {
  .wine-card:hover { transform: translateY(-8px); }
  .wine-card:hover .wine-image::before { opacity: .68; }
  .wine-card:hover .wine-info { border-color: rgba(8, 9, 10, .48); }
}

.bottle-triptych figure + figure::after {
  content: "";
  position: absolute;
  left: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: rgba(8, 9, 10, .1);
}

.detail-visual,
.product-bottle {
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .3), transparent 58%);
}

.wine-data div,
.product-data div,
.values div,
.place-signals div,
.contact-list > div {
  transition: background 320ms ease, padding-inline 420ms var(--ease-elevium);
}

@media (hover: hover) {
  .wine-data div:hover,
  .product-data div:hover,
  .values div:hover,
  .place-signals div:hover,
  .contact-list > div:hover {
    padding-inline: .7rem;
    background: rgba(135, 138, 142, .075);
  }
}

.product-data dt,
.wine-data dt { align-self: center; line-height: 1.45; }

.product-data dd,
.wine-data dd { line-height: 1.55; }

.tasting-grid article,
.aroma-grid article {
  position: relative;
  transition: background 420ms ease;
}

.tasting-grid article::before,
.aroma-grid article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 1px;
  background: var(--silver-bright);
  transition: width 800ms var(--ease-elevium);
}

@media (hover: hover) {
  .tasting-grid article:hover,
  .aroma-grid article:hover { background: rgba(255, 255, 255, .025); }
  .tasting-grid article:hover::before,
  .aroma-grid article:hover::before { width: 100%; }
}

/* Forms and legal content retain the same editorial voice. */
input,
textarea { transition: border-color 300ms ease, background 300ms ease; }

input:focus,
textarea:focus { background: rgba(255, 255, 255, .42); }

.legal-layout { column-gap: clamp(4rem, 10vw, 12rem); }
.legal-copy { max-width: 920px; }
.legal-section p,
.legal-section li { line-height: 1.84; }

/* Footer: one quiet brand gesture, embedded in the black. */
footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 15%, rgba(183, 185, 188, .075), transparent 30%),
    #050506;
}

footer::before {
  content: "ELEVIUM";
  position: absolute;
  left: 7vw;
  bottom: -5vw;
  z-index: -1;
  color: rgba(255, 255, 255, .026);
  font-family: var(--display);
  font-size: clamp(8rem, 25vw, 28rem);
  letter-spacing: -.06em;
  line-height: .7;
  white-space: nowrap;
}

.footer-top { padding-bottom: clamp(5.5rem, 8vw, 8rem); }
.footer-top h2 { letter-spacing: -.048em; }
.footer-bottom { line-height: 1.7; }

@media (max-width: 900px) {
  html { scroll-padding-top: 4.5rem; }

  .site-header {
    height: 72px;
    padding-inline: 1.25rem;
  }

  .site-header.scrolled { height: 64px; }
  .site-header.header-hidden { transform: none; }

  .wordmark { width: 130px; }

  body.menu-open .site-header {
    color: var(--white);
    border-color: rgba(255, 255, 255, .18);
    transform: none;
  }

  body.menu-open .site-header::before { opacity: 0; }

  .mobile-menu {
    inset: 0;
    padding: 20vh 1.4rem 8vh;
    gap: 0;
    background:
      linear-gradient(rgba(8, 9, 10, .965), rgba(8, 9, 10, .985)),
      url("./assets/dolomite-texture.webp") center / 650px auto repeat;
    clip-path: inset(0 0 100% 0);
    transform: none;
    transition: clip-path 720ms var(--ease-elevium);
  }

  .mobile-menu.open { clip-path: inset(0); }

  .mobile-menu a {
    padding: .75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    font-size: clamp(2.75rem, 12vw, 4.8rem);
    letter-spacing: -.035em;
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 500ms ease, transform 700ms var(--ease-elevium);
  }

  .mobile-menu.open a { opacity: 1; transform: none; }
  .mobile-menu.open a:nth-child(1) { transition-delay: 180ms; }
  .mobile-menu.open a:nth-child(2) { transition-delay: 240ms; }
  .mobile-menu.open a:nth-child(3) { transition-delay: 300ms; }
  .mobile-menu.open a:nth-child(4) { transition-delay: 360ms; }
  .mobile-menu.open a:nth-child(5) { transition-delay: 420ms; }

  :is(.hero, .story-hero, .place-hero, .product-hero, .method-hero) { min-height: max(650px, 100svh); }

  .motion-ready.hero-ready :is(.hero, .story-hero, .place-hero, .product-hero, .method-hero) > img {
    transform: scale(1.035);
  }

  :is(.hero-shade, .story-hero-shade, .place-hero-shade, .product-hero-shade, .method-hero-shade) {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, .76), rgba(0, 0, 0, .18)),
      linear-gradient(0deg, rgba(0, 0, 0, .58), transparent 68%);
  }

  .hero-kicker::before { width: 28px; }
  .manifesto-copy { padding-left: 0; }
  .generations-copy { box-shadow: 0 24px 64px rgba(8, 9, 10, .08); }

  .fact { min-height: 0; padding: 1.55rem 1.35rem; }
  .fact p { max-width: 46ch; font-size: .9rem; }

  .wine-grid {
    margin-inline: -1.4rem;
    padding-inline: 1.4rem;
    scrollbar-width: none;
  }

  .wine-grid::-webkit-scrollbar { display: none; }
  .wine-card:hover { transform: none; }

  .bottle-triptych figure + figure::after { top: 5%; bottom: 5%; }

  .product-data div { grid-template-columns: minmax(128px, 40%) 1fr; gap: 1rem; }

  footer::before { left: 1rem; bottom: -1rem; font-size: 38vw; }
}

@media (max-width: 560px) {
  .section-pad { padding-block: 6.5rem; }
  .section-lead { gap: 1rem; }
  .section-index, .eyebrow { letter-spacing: .14em; }

  .hero-content,
  .story-hero-content,
  .place-hero-content,
  .product-hero-copy,
  .method-hero-content { bottom: 11vh; }

  .hero-copy { font-size: 1rem; line-height: 1.58; }
  .scroll-cue { opacity: .72; }

  .wine-image { height: min(132vw, 560px); }
  .product-data div { grid-template-columns: 1fr; gap: .3rem; padding-block: 1rem; }
  .product-data dt { padding-top: 0; }

  .footer-mail { max-width: 100%; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }

  .motion-ready :is(.hero, .story-hero, .place-hero, .product-hero, .method-hero) > img,
  .motion-ready :is(.hero-content, .story-hero-content, .place-hero-content, .product-hero-copy, .method-hero-content) > *,
  .motion-ready :is(.collection-hero-copy, .contact-info, .legal-hero-inner) > *,
  .motion-ready .bottle-triptych figure,
  .motion-ready .contact-image,
  .contact-image img,
  .motion-ready .reveal,
  .motion-ready :is(.image-reveal, .story-panorama, .generation-frame, .birth-image, .valley-image, .adige-image).reveal,
  :is(.image-reveal, .story-panorama, .generation-frame, .birth-image, .valley-image, .adige-image) img {
    opacity: 1;
    filter: none;
    clip-path: none;
    transform: none;
  }

  .scroll-cue i::after { animation: none; }
}
