/* ============================================================
   Saghi Beverage Corp. — single page
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Bodoni Moda";
  src: url("fonts/bodoni-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("fonts/bodoni-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("fonts/bodoni-semibold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("fonts/bodoni-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Abar";
  src: url("fonts/abar-medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --cream: #efebe5;
  --ink: #363436;
  --sand: #b8afa0;
  --rose: #b8495c;
  --blush: #ffced6;
  --wine: #5e0817;

  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --persian: "Abar", "Vazirmatn", Tahoma, sans-serif;

  --shell: 1400px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.55;
  overflow-x: hidden;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 4px;
}

/* ---------- Shared ornament ---------- */
.ornament {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   1. Hero
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1512 / 1021;
  min-height: 540px;
  background: #2c2119 url("img/hero.webp") center / cover no-repeat;
  display: flex;
  align-items: center;
}

.hero__shell {
  width: 100%;
  height: 100%;
  padding-inline: clamp(20px, 9.6vw, 152px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transform: translateY(-14.5%);
}

.hero__lockup {
  width: clamp(240px, 25vw, 379px);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 0.9vw, 14px);
}

.hero__mark {
  width: 95%;
  height: auto;
  margin-block: clamp(5px, 0.85vw, 13px);
}

.hero__note {
  margin: 0;
  width: 84%;
  font-size: clamp(9.5px, 0.95vw, 13.5px);
  line-height: 1.85;
  text-align: justify;
  text-align-last: center;
  letter-spacing: 0.008em;
  color: var(--cream);
}

/* fade-up on load */
.hero__lockup > * {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hero__lockup > *:nth-child(1) { animation-delay: 0.15s; }
.hero__lockup > *:nth-child(2) { animation-delay: 0.35s; }
.hero__lockup > *:nth-child(3) { animation-delay: 0.55s; }
.hero__lockup > *:nth-child(4) { animation-delay: 0.75s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   2. Products
   ============================================================ */
.products {
  background: var(--cream);
  padding-block: clamp(34px, 4.5vw, 62px) clamp(18px, 2.2vw, 32px);
}

.rule {
  width: min(620px, 82vw);
  margin-inline: auto;
  color: var(--sand);
}

.rule--bottom {
  margin-top: clamp(30px, 4.5vw, 62px);
}

/* --- selector row --- */
.shelf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.2vw, 48px);
  margin-top: clamp(38px, 5.5vw, 78px);
  padding-bottom: clamp(46px, 5vw, 72px);
}

.bottle {
  position: relative;
  display: block;
  width: clamp(96px, 10.2vw, 146px);
  transition: width 0.55s cubic-bezier(0.32, 0.72, 0.29, 1);
}

.bottle[aria-pressed="true"] {
  width: clamp(140px, 14.8vw, 211px);
}

.bottle__card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 211 / 340;
  border-radius: clamp(4px, 0.5vw, 7px);
  background: linear-gradient(178deg, #a9a8a8 0%, #b9b7b7 34%, #cfcece 68%, #d8d8d8 100%);
  overflow: hidden;
  transition: box-shadow 0.55s ease, filter 0.4s ease;
}

.bottle[aria-pressed="false"] .bottle__card {
  filter: saturate(0.9) brightness(0.99);
}

.bottle[aria-pressed="true"] .bottle__card {
  box-shadow: 0 14px 34px -14px rgba(54, 52, 54, 0.42);
}

.bottle:hover .bottle__card,
.bottle:focus-visible .bottle__card {
  filter: none;
}

.bottle__card img {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 72%;
  height: auto;
}

.bottle__name {
  position: absolute;
  top: calc(100% + clamp(10px, 1.1vw, 16px));
  left: 50%;
  translate: -50% 0;
  width: 15ch;
  font-size: clamp(8.5px, 0.82vw, 11.5px);
  line-height: 1.5;
  letter-spacing: 0.012em;
  text-align: center;
  color: var(--ink);
  transition: color 0.4s ease;
}

.bottle[aria-pressed="true"] .bottle__name {
  color: var(--rose);
  font-weight: 600;
  font-size: clamp(10px, 1.05vw, 14.5px);
}

/* --- detail --- */
.detail {
  margin-top: clamp(34px, 4.6vw, 64px);
  text-align: center;
}

.detail__head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(10px, 1.4vw, 22px);
  flex-wrap: wrap;
  color: var(--rose);
}

.detail__en {
  font-size: clamp(19px, 2.1vw, 30px);
  font-weight: 700;
  letter-spacing: 0.005em;
  margin: 0;
}

.detail__fa {
  font-family: var(--persian);
  font-size: clamp(17px, 1.85vw, 26px);
  font-weight: 500;
  direction: rtl;
  margin: 0;
}

.detail__body {
  margin: clamp(14px, 1.7vw, 24px) auto 0;
  width: min(640px, 84vw);
  font-size: clamp(12.5px, 1.15vw, 16px);
  line-height: 1.62;
}

.detail__body p {
  margin: 0;
}

.detail__notes {
  margin-top: 0.1em;
}

/* crossfade */
.detail__swap {
  animation: swap 0.5s ease;
}

@keyframes swap {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

/* ============================================================
   3. Instagram banner
   ============================================================ */
.banner {
  position: relative;
  width: 100%;
  aspect-ratio: 1514 / 511;
  min-height: 300px;
  background: var(--blush) url("img/banner.webp") center / cover no-repeat;
  display: flex;
  align-items: center;
}

.banner__shell {
  width: 100%;
  padding-inline: clamp(24px, 13.2vw, 200px);
}

.banner__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(10px, 1.3vw, 18px);
}

.banner__avatar {
  width: clamp(64px, 7.7vw, 112px);
  height: auto;
  border-radius: 50%;
}

.banner__handle {
  margin: 0;
  font-size: clamp(28px, 3.9vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--wine);
}

.banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.52em 1.15em 0.55em;
  border-radius: 999px;
  background: var(--wine);
  color: var(--cream);
  font-size: clamp(11px, 1.15vw, 16px);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.35s ease, transform 0.35s ease;
}

.banner__cta svg {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
  flex: none;
}

.banner__cta:hover {
  background: #7a0f21;
  transform: translateY(-2px);
}

/* ============================================================
   4. Footer
   ============================================================ */
.footer {
  background: var(--cream);
  text-align: center;
  padding-block: clamp(60px, 9vw, 132px) clamp(48px, 7vw, 104px);
}

.footer__mark {
  width: clamp(40px, 4.2vw, 60px);
  height: auto;
  margin-inline: auto;
}

.footer__lines {
  margin: clamp(20px, 2.4vw, 34px) auto 0;
  font-size: clamp(12px, 1.1vw, 15.5px);
  line-height: 1.8;
}

.footer__lines p {
  margin: 0;
}

.footer__lines a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.footer__lines a:hover {
  border-bottom-color: var(--sand);
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Small screens
   ============================================================ */
@media (max-width: 860px) {
  .hero {
    aspect-ratio: auto;
    min-height: 100svh;
    background-position: 32% center;
    align-items: flex-end;
    padding-block: clamp(28px, 7vw, 56px);
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 22, 16, 0.72) 0%, rgba(30, 22, 16, 0.22) 46%, transparent 72%);
  }

  .hero__shell {
    position: relative;
    height: auto;
    justify-content: center;
    transform: none;
    padding-inline: clamp(20px, 6vw, 44px);
  }

  .hero__lockup {
    width: min(340px, 82vw);
  }

  .hero__note {
    width: 100%;
    font-size: 11.5px;
  }

  .shelf {
    gap: 14px;
    padding-bottom: 52px;
  }

  .bottle {
    width: 78px;
  }

  .bottle[aria-pressed="true"] {
    width: 118px;
  }

  .bottle__name {
    font-size: 8.5px;
  }

  .bottle[aria-pressed="true"] .bottle__name {
    font-size: 10px;
  }

  .banner {
    aspect-ratio: auto;
    min-height: 420px;
    background-position: 62% center;
  }

  .banner__shell {
    padding-inline: clamp(22px, 7vw, 44px);
  }
}

@media (max-width: 420px) {
  .shelf {
    gap: 10px;
  }
  .bottle {
    width: 68px;
  }
  .bottle[aria-pressed="true"] {
    width: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero__lockup > * {
    opacity: 1;
    transform: none;
  }
}
