/* =========================================================
   TAPY — Design tokens
========================================================= */
:root{
  --black: #0a0a0a;
  --charcoal: #151513;
  --charcoal-2: #1e1e1c;
  --white: #ffffff;
  --off-white: #f6f5f1;
  --grey-100: #efeee9;
  --grey-300: #d9d7d0;
  --grey-500: #8f8d86;
  --grey-700: #4a4944;
  --grey-800: #2c2b27;

  --font-latin: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
  --font: var(--font-latin);

  --container: 1180px;
  --radius-s: 6px;
  --radius-m: 14px;
  --ease: cubic-bezier(.22,.61,.36,1);

  color-scheme: light;
}

html[dir="rtl"]{
  --font: var(--font-arabic);
}

/* =========================================================
   Reset
========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img{ max-width: 100%; display: block; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

.skip-link{
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--black);
  padding: 12px 18px;
  z-index: 200;
}
.skip-link:focus{ left: 12px; top: 12px; }

:focus-visible{
  outline: 2px solid var(--black);
  outline-offset: 3px;
}
.section--dark :focus-visible{ outline-color: var(--white); }

.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Sections
========================================================= */
.section{ padding: 96px 0; }
.section--dark{ background: var(--black); color: var(--white); }
.section--light{ background: var(--off-white); color: var(--black); }

.section__title{
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  max-width: 20ch;
  margin-bottom: 48px;
}
.section__title--center{
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 24ch;
}

.eyebrow{
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--grey-500);
  margin-bottom: 18px;
}

/* =========================================================
   Buttons
========================================================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform .35s var(--ease), background-color .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }

.btn--dark{
  background: var(--black);
  color: var(--white);
}
.btn--dark:hover{ background: var(--charcoal-2); }

.btn--light{
  background: var(--white);
  color: var(--black);
}
.btn--light:hover{ background: var(--grey-100); }

.btn--ghost{
  background: transparent;
  color: inherit;
  border: 1px solid var(--grey-700);
  padding: 14px 29px;
}
.section--light .btn--ghost{ border-color: var(--grey-300); }
.btn--ghost:hover{ border-color: currentColor; }

/* =========================================================
   Navbar
========================================================= */
.nav{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: var(--white);
  transition: padding .3s var(--ease);
}
.nav__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  transition: padding .3s var(--ease);
}
.nav.is-scrolled .nav__inner{ padding-top: 14px; padding-bottom: 14px; }

.nav__logo{
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.nav__links{
  display: flex;
  gap: 32px;
  font-size: 14.5px;
  color: var(--grey-300);
}
.nav__links a{ transition: color .2s ease; }
.nav__links a:hover{ color: var(--white); }

.nav__actions{
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch{
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-500);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 7px 13px;
}
.lang-switch span[data-lang-option]{ transition: color .2s ease; }
.lang-switch span.is-active{ color: var(--white); }
.lang-switch__sep{ color: rgba(255,255,255,0.2); }

.nav__cta{ padding: 11px 22px; font-size: 14px; }

.hamburger{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}
.hamburger span{
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--white);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu{
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 26px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.mobile-menu.is-open{ display: flex; }
.mobile-menu a{
  padding: 14px 4px;
  font-size: 16px;
  color: var(--grey-300);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu .btn{ margin-top: 16px; align-self: flex-start; }

@media (max-width: 860px){
  .nav__links{ display: none; }
  .nav__cta{ display: none; }
  .hamburger{ display: flex; }
}

/* =========================================================
   Reveal-on-scroll
========================================================= */
[data-reveal]{
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].is-visible{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Hero
========================================================= */
.hero{ padding-top: 76px; padding-bottom: 76px; }
.hero__grid{
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero__title{
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}
.hero__text{
  font-size: 17px;
  line-height: 1.65;
  color: var(--grey-300);
  max-width: 42ch;
  margin-bottom: 36px;
}
.hero__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__visual{
  border-radius: var(--radius-m);
  overflow: hidden;
}
.hero__visual img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-m);
}

@media (max-width: 900px){
  .hero{ padding-top: 56px; padding-bottom: 56px; }
  .hero__grid{ grid-template-columns: 1fr; gap: 36px; }
  .hero__visual{ order: -1; }
  .hero__text{ max-width: none; }
}

/* =========================================================
   Problem
========================================================= */
.problem__grid{
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 64px;
  align-items: center;
}
.problem__visual img{
  border-radius: var(--radius-m);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.problem__copy h2{
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  max-width: 16ch;
}
.problem__text{
  font-size: 17px;
  line-height: 1.7;
  color: var(--grey-700);
  margin-bottom: 26px;
}
.problem__transition{
  font-size: 18px;
  font-weight: 600;
  padding-top: 20px;
  border-top: 1px solid var(--grey-300);
}

@media (max-width: 860px){
  .problem__grid{ grid-template-columns: 1fr; gap: 32px; }
}

/* =========================================================
   How it works
========================================================= */
.how__grid{
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.how__visual img{
  border-radius: var(--radius-m);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.how__steps{
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.how__step{
  display: flex;
  gap: 20px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.how__step:last-child{ border-bottom: none; padding-bottom: 0; }
.how__num{
  font-size: 14px;
  font-weight: 600;
  color: var(--grey-500);
  padding-top: 3px;
  flex-shrink: 0;
}
.how__step h3{
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.how__step p{
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--grey-300);
}

@media (max-width: 860px){
  .how__grid{ grid-template-columns: 1fr; gap: 36px; }
}

/* =========================================================
   Product
========================================================= */
.product__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.product__visual img{
  border-radius: var(--radius-m);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.product__copy h2{
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  max-width: 16ch;
}
.product__text{
  font-size: 17px;
  line-height: 1.65;
  color: var(--grey-700);
  max-width: 42ch;
  margin-bottom: 28px;
}
.product__features{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 34px;
}
.product__features li{
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-s);
}
.product__price{
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 30px;
}
.product__price-old{
  font-size: 18px;
  color: var(--grey-500);
  text-decoration: line-through;
}
.product__price-new{
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 860px){
  .product__grid{ grid-template-columns: 1fr; gap: 36px; }
}

/* =========================================================
   Who it's for
========================================================= */
.who__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.who__grid li{
  background: var(--black);
  text-align: center;
  padding: 34px 16px;
  font-size: 15.5px;
  font-weight: 500;
}

@media (max-width: 760px){
  .who__grid{ grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   FAQ
========================================================= */
.faq__container{ max-width: 760px; }
.faq__list{
  display: flex;
  flex-direction: column;
}
.faq__item{
  border-bottom: 1px solid var(--grey-300);
}
.faq__item:first-child{ border-top: 1px solid var(--grey-300); }
.faq__question{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  text-align: left;
  padding: 24px 4px;
  font-size: 17px;
  font-weight: 500;
}
html[dir="rtl"] .faq__question{ text-align: right; }

.faq__icon{
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.faq__icon::before, .faq__icon::after{
  content: '';
  position: absolute;
  background: var(--black);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.faq__icon::before{ width: 14px; height: 1.5px; }
.faq__icon::after{ width: 1.5px; height: 14px; }
.faq__question[aria-expanded="true"] .faq__icon::after{ transform: translate(-50%,-50%) rotate(90deg); opacity: 0; }

.faq__answer{
  height: 0;
  overflow: hidden;
  transition: height .35s var(--ease);
}
.faq__answer p{
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--grey-700);
  padding: 0 4px 24px;
  max-width: 60ch;
}

/* =========================================================
   Final CTA
========================================================= */
.final{ padding: 120px 0; }
.final__inner{ text-align: center; }
.final h2{
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.final p{
  font-size: 17px;
  color: var(--grey-300);
  margin-bottom: 38px;
}

/* =========================================================
   Footer
========================================================= */
.footer{
  background: var(--black);
  color: var(--grey-500);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer__inner{
  padding: 44px 24px;
  text-align: center;
}
.footer__logo{
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
}
.footer__inner p{ font-size: 14px; line-height: 1.6; }
.footer__copy{ margin-top: 6px; color: var(--grey-700); }

/* =========================================================
   Sticky mobile WhatsApp CTA
========================================================= */
.sticky-cta{
  display: none;
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 90;
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
@media (max-width: 640px){
  .sticky-cta{ display: block; }
  .final{ padding-bottom: 150px; }
  .footer{ padding-bottom: 76px; }
}

/* =========================================================
   RTL adjustments
========================================================= */
html[dir="rtl"] .lang-switch{ direction: ltr; }
