/* =====================================================================================
   Fireball — motion & interaction layer (loaded last). Ideas taken from the MACWAG PPF site
   (slow eased reveals, split headings, rail controls under the cards, fill buttons) and adapted
   to Fireball's dark/red identity. Every hidden-until-revealed state is scoped to html.js-motion,
   which site.js only sets when JS runs and the visitor does not prefer reduced motion — so
   without JS (or with reduced motion) all content is simply visible.
   ===================================================================================== */

/* --- Typeface: Inter (SIL OFL, self-hosted — no third-party request). --- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  font-feature-settings: "ss01", "cv11";
}

/* --- Split headings: words rise one after another. --- */
html.js-motion [data-split] .w {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  vertical-align: top;
  /* Section CSS colours every "h2 span" grey for the accent line — keep word wrappers neutral. */
  color: inherit;
}

html.js-motion [data-split] .w > span {
  display: inline-block;
  color: inherit;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms + var(--d, 0s));
}

html.js-motion [data-split].is-in .w > span {
  transform: none;
}

/* Leave room for the back-to-top button so it never covers the distributor line. */
.site-footer__bottom {
  padding-right: 72px;
}

/* --- Generic reveal (site.js tags blocks with .reveal and a stagger delay). --- */
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease-out);
  transition-delay: var(--d, 0s);
}

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

/* Existing section reveals (showcase/categories) get the same slower, softer curve. */
.showcase.motion-ready .showcase__heading,
.showcase.motion-ready .product-card,
.categories.motion-ready .categories__heading,
.categories.motion-ready .category-card {
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease-out),
    border-color 0.4s var(--ease) !important;
}

/* --- Hero: slow zoom-out on the active slide, text rises on every slide change. --- */
@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }

  to {
    transform: scale(1);
  }
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.hero__slide-image {
  transition: opacity 1.2s var(--ease);
}

html.js-motion .hero__slide-image.is-active {
  animation: heroZoom 7s var(--ease-out) both;
}

html.js-motion .hero__content:not([hidden]) > * {
  animation: heroRise 1s var(--ease-out) both;
}

html.js-motion .hero__content:not([hidden]) > :nth-child(1) { animation-delay: 0.05s; }
html.js-motion .hero__content:not([hidden]) > :nth-child(2) { animation-delay: 0.12s; }
html.js-motion .hero__content:not([hidden]) > :nth-child(3) { animation-delay: 0.25s; }
html.js-motion .hero__content:not([hidden]) > :nth-child(4) { animation-delay: 0.35s; }

/* The title rises word by word instead of as one block. */
html.js-motion .hero__content:not([hidden]) > .hero__title {
  animation: none;
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: rgba(243, 241, 236, 0.75);
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: color 0.4s var(--ease);
}

.hero__scroll:hover {
  color: #ffffff;
}

.hero__scroll i {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: heroChevron 1.8s var(--ease) infinite;
}

@keyframes heroChevron {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(-3px) rotate(45deg);
  }

  45% {
    opacity: 1;
    transform: translateY(3px) rotate(45deg);
  }
}

/* The "Keşfet" hint is 48px tall from bottom: 26px, so its box ends 74px above the bottom; the
   dots sit clear above it (they were inside the hint's click area and could not be clicked). */
.hero__dots {
  bottom: 96px;
}

@media (max-width: 760px) {
  .hero__scroll {
    display: none;
  }

  /* No hint on phones: dots return to the bottom edge. */
  .hero__dots {
    bottom: 28px;
  }
}

/* --- Product carousel: controls row under the cards (no more arrows on top of cards). --- */
.product-carousel__nav {
  position: static;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  background: none;
  transform: none;
  transition:
    background-color 0.4s var(--ease),
    color 0.4s var(--ease),
    border-color 0.4s var(--ease),
    opacity 0.4s var(--ease);
}

.product-carousel__nav:hover {
  border-color: #f3f1ec;
  background-color: #f3f1ec;
  color: #15171a;
}

.product-carousel__nav:disabled {
  opacity: 0.3;
}

.product-carousel__nav svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-carousel__ui {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 26px;
}

.product-carousel__bar {
  position: relative;
  flex: 1;
  height: 1px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.18);
}

.product-carousel__bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  background-color: var(--color-accent, #a7262c);
  transition: transform 0.3s var(--ease);
}

.product-carousel__arrows {
  display: flex;
  gap: 8px;
}

@media (max-width: 760px) {
  .product-carousel__ui {
    padding-inline: 16px;
  }

  .product-carousel__nav {
    width: 40px;
    height: 40px;
  }
}

/* --- Buttons: colour fills up from the bottom instead of jumping. --- */
.button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    color 0.5s var(--ease),
    border-color 0.5s var(--ease);
}

.button::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--color-accent, #a7262c);
  content: "";
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ease);
}

.button:hover {
  transform: none;
}

.button:hover::before {
  transform: scaleY(1);
}

.button--primary:hover {
  color: #ffffff;
}

.button--secondary::before {
  background-color: #f3f1ec;
}

.button--secondary:hover {
  border-color: #f3f1ec;
  background-color: transparent;
  color: #15171a;
}

.button span[aria-hidden="true"] {
  transition: transform 0.6s var(--ease);
}

.button:hover span[aria-hidden="true"] {
  transform: translateX(4px);
}

/* --- Text links with an arrow: underline draws in, arrow nudges right. --- */
.showcase__all,
.categories__all,
.next-products__link,
.about__footer a,
.contact__products-link,
.product-card__detail,
.product-detail__back {
  position: relative;
}

.showcase__all::after,
.categories__all::after,
.next-products__link::after,
.about__footer a::after,
.contact__products-link::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background-color: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.showcase__all:hover::after,
.categories__all:hover::after,
.next-products__link:hover::after,
.about__footer a:hover::after,
.contact__products-link:hover::after {
  transform: scaleX(1);
}

.showcase__all span,
.categories__all span,
.next-products__link span,
.about__footer a span,
.contact__products-link span,
.product-card__detail span {
  display: inline-block;
  transition: transform 0.6s var(--ease);
}

.showcase__all:hover span,
.categories__all:hover span,
.next-products__link:hover span,
.about__footer a:hover span,
.contact__products-link:hover span,
.product-card__detail:hover span {
  transform: translateX(5px);
}

/* --- Cards: no jump; the image slowly zooms instead. --- */
.product-card,
.category-card {
  transition:
    border-color 0.5s var(--ease),
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease-out);
}

.product-card:hover,
.showcase.motion-ready.is-visible .product-card:hover {
  transform: none;
}

.product-card__visual {
  overflow: hidden;
}

.product-card__visual img {
  transition: transform 1.6s var(--ease-out);
}

.product-card:hover .product-card__visual img {
  transform: scale(1.05);
}

.categories.motion-ready.is-visible .category-card:hover,
.category-card:hover {
  transform: none;
}

.category-card__visual {
  overflow: hidden;
}

.category-card__image,
.category-card__surface {
  transition: transform 1.6s var(--ease-out);
}

.category-card:hover .category-card__image,
.category-card:hover .category-card__surface {
  transform: scale(1.05);
}

/* --- Header: deepens and the logo settles a little once the page is scrolled (no layout shift). --- */
.site-header::before {
  transition:
    background-color 0.6s var(--ease),
    box-shadow 0.6s var(--ease);
}

.site-header.is-scrolled::before {
  background-color: rgba(14, 15, 17, 0.97);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand img {
  transform-origin: left center;
  transition: transform 0.6s var(--ease);
}

.site-header.is-scrolled .brand img {
  transform: scale(0.88);
}

/* --- Mobile menu: links arrive one after another. --- */
.mobile-navigation__links a,
.mobile-navigation__note {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease-out),
    color 0.3s var(--ease),
    padding-left 0.3s var(--ease);
}

.mobile-navigation.is-open .mobile-navigation__links a,
.mobile-navigation.is-open .mobile-navigation__note {
  opacity: 1;
  transform: none;
}

.mobile-navigation.is-open .mobile-navigation__links a:nth-child(1) { transition-delay: 0.1s; }
.mobile-navigation.is-open .mobile-navigation__links a:nth-child(2) { transition-delay: 0.16s; }
.mobile-navigation.is-open .mobile-navigation__links a:nth-child(3) { transition-delay: 0.22s; }
.mobile-navigation.is-open .mobile-navigation__links a:nth-child(4) { transition-delay: 0.28s; }
.mobile-navigation.is-open .mobile-navigation__links a:nth-child(5) { transition-delay: 0.34s; }
.mobile-navigation.is-open .mobile-navigation__links a:nth-child(6) { transition-delay: 0.4s; }
.mobile-navigation.is-open .mobile-navigation__note { transition-delay: 0.45s; }

/* --- Floating buttons: back-to-top (ring shows page progress) + WhatsApp. --- */
.to-top,
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
}

.wa-float {
  background-color: #25d366;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  color: #ffffff;
  transition: transform 0.5s var(--ease-out);
}

.wa-float:hover {
  transform: scale(1.07);
}

.wa-float svg {
  width: 26px;
  height: 26px;
}

.wa-float ~ .to-top {
  bottom: 86px;
}

.to-top {
  border: 0;
  background-color: rgba(14, 15, 17, 0.88);
  color: #f3f1ec;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    visibility 0.5s;
}

.to-top.is-shown {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.to-top svg {
  position: absolute;
  inset: 0;
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.to-top circle {
  fill: none;
  stroke-width: 1.5;
}

.to-top .to-top__track {
  stroke: rgba(255, 255, 255, 0.15);
}

.to-top .to-top__bar {
  stroke: var(--color-accent, #a7262c);
  stroke-dasharray: 157.08;
  stroke-dashoffset: 157.08;
  transition: stroke-dashoffset 0.15s linear;
}

.to-top span {
  position: relative;
  font-size: 1.1rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .to-top,
  .wa-float {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }

  .wa-float ~ .to-top {
    bottom: 70px;
  }

  .to-top svg {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll i {
    animation: none;
  }
}

/* --- Product cards: the whole card opens the product. The title link's ::after covers the card;
   "Ürünü incele" and "Satın Al" sit above it so "Satın Al" still opens the shop in a new tab. --- */
.product-card {
  position: relative;
  cursor: pointer;
}

.product-card h3 a::after {
  position: absolute;
  inset: 0;
  content: "";
}

.product-card__detail,
.product-card__buy {
  position: relative;
  z-index: 1;
}
