/* Hasana website. One stylesheet for both languages: every horizontal
   spacing uses logical properties (inline-start/end), so the Arabic page
   mirrors itself from dir="rtl" alone. Colours follow the app's palette. */

:root {
  --emerald-deep: #06423c;
  --emerald: #0e7c66;
  --emerald-light: #3fa88c;
  --emerald-mist: #dcefe8;
  --gold: #e8b84b;
  --gold-light: #f7d98b;
  --gold-deep: #c79325;
  --cream: #fdf7ec;
  --sand: #f3e7d0;
  --ink: #17211e;
  --ink-soft: #5b6b66;
  --white: #ffffff;
  --danger: #d9534f;

  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px -20px rgba(6, 66, 60, 0.35);
  --max: 1160px;
  --font: 'Baloo Bhaijaan 2', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

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

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

body {
  margin: 0;
  /* A last guard against anything wider than the screen; clip (unlike
     hidden) keeps the sticky header working. */
  overflow-x: clip;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--emerald);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Shown only when reached with the keyboard. Moved off with a transform,
   not an offset, which would point the other way in Arabic and widen it. */
.skip {
  position: absolute;
  inset-inline-start: 8px;
  top: 8px;
  z-index: 100;
  background: var(--white);
  padding: 8px 14px;
  border-radius: 10px;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* Hidden from sight but not from the form. */
.visually-hidden,
.trap,
.chips input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* -------------------------------------------------------------- header -- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 247, 236, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.header.scrolled {
  border-bottom-color: var(--sand);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--emerald-deep);
  font-weight: 800;
  font-size: 22px;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.nav {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 10px;
}

.nav a:hover {
  color: var(--emerald-deep);
  background: var(--emerald-mist);
}

.lang {
  display: inline-flex;
  background: var(--emerald-mist);
  border-radius: 999px;
  padding: 3px;
}

.lang a {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: var(--emerald-deep);
  padding: 4px 12px;
  border-radius: 999px;
}

.lang a[aria-current='true'] {
  background: var(--emerald);
  color: var(--white);
}

.menu-button {
  display: none;
  margin-inline-start: auto;
  background: none;
  border: 0;
  padding: 8px;
  color: var(--emerald-deep);
  cursor: pointer;
}

/* ------------------------------------------------------------- buttons -- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 22px;
  border-radius: 16px;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--emerald);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(14, 124, 102, 0.8);
}

.button-primary:hover {
  background: var(--emerald-deep);
}

.button-dark {
  background: var(--ink);
  color: var(--white);
}

.button-dark svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.button-dark small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  line-height: 1.1;
}

.button-dark span {
  text-align: start;
  line-height: 1.15;
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--emerald-deep);
  background: var(--emerald-mist);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(38px, 5.4vw, 62px);
  font-weight: 800;
  color: var(--emerald-deep);
  letter-spacing: -0.5px;
}

[dir='rtl'] .hero h1 {
  letter-spacing: 0;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-deep);
}

.lead {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 28px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 16px;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.facts li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: 8% -10% 0;
  border-radius: 48px;
  background:
    radial-gradient(circle at 30% 20%, rgba(247, 217, 139, 0.55), transparent 55%),
    linear-gradient(160deg, var(--emerald), var(--emerald-deep));
  transform: rotate(-4deg);
}

.hero-art .phone {
  position: relative;
  width: min(300px, 70vw);
}

.hero-art .phone.back {
  position: absolute;
  width: min(250px, 58vw);
  inset-inline-end: -4%;
  top: 14%;
  transform: rotate(7deg);
  opacity: 0.95;
}

[dir='rtl'] .hero-art .phone.back {
  transform: rotate(-7deg);
}

/* A phone drawn around a screenshot. */
.phone {
  background: #111816;
  padding: 10px;
  border-radius: 42px;
  box-shadow: var(--shadow), inset 0 0 0 2px #2c3734;
}

.phone img {
  border-radius: 33px;
  width: 100%;
  height: auto;
  aspect-ratio: 1290 / 2796;
  background: var(--cream);
}

/* ------------------------------------------------------------- sections -- */

section {
  padding: 84px 0;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  color: var(--emerald-deep);
}

.section-head p {
  color: var(--ink-soft);
  font-size: 19px;
}

.tag {
  display: inline-block;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 10px;
}

[dir='rtl'] .tag {
  letter-spacing: 0;
}

.band {
  background: var(--white);
  border-block: 1px solid var(--sand);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 30px 26px 26px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--emerald);
  color: var(--white);
  font-weight: 800;
  font-size: 22px;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 22px;
}

.step p {
  color: var(--ink-soft);
  margin: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.feature .icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--emerald-mist);
  color: var(--emerald);
  margin-bottom: 16px;
}

.feature .icon svg {
  width: 26px;
  height: 26px;
}

.feature h3 {
  font-size: 21px;
}

.feature p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 17px;
}

/* --------------------------------------------------------------- points -- */

.points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.points-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 34px;
  color: var(--white);
  background: linear-gradient(150deg, var(--emerald), var(--emerald-deep));
  box-shadow: var(--shadow);
}

.points-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/pattern.svg');
  background-size: 120px;
  opacity: 0.08;
  pointer-events: none;
}

.points-card table {
  position: relative;
  width: 100%;
  border-collapse: collapse;
  font-size: 18px;
}

.points-card th,
.points-card td {
  padding: 14px 8px;
  text-align: start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.points-card thead th {
  color: var(--gold-light);
  font-size: 15px;
  font-weight: 700;
}

.points-card td.num {
  font-weight: 800;
  font-size: 24px;
  color: var(--gold-light);
}

.points-card tr:last-child td {
  border-bottom: 0;
}

.points ul {
  padding: 0;
  list-style: none;
  margin: 0;
}

.points li {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.points li b {
  display: block;
  color: var(--emerald-deep);
  font-size: 19px;
}

.points li span {
  color: var(--ink-soft);
}

.points .dot {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

/* -------------------------------------------------------------- screens -- */

.screens {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 10px 20px 30px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  justify-content: safe center;
}

.screens figure {
  flex: none;
  width: 240px;
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.screens figcaption {
  margin-top: 14px;
  font-weight: 700;
  color: var(--emerald-deep);
}

/* -------------------------------------------------------------- sponsor -- */

.sponsor {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 32px;
  padding: 34px;
}

.sponsor .gift {
  font-size: 56px;
  line-height: 1;
}

.sponsor h2 {
  color: var(--emerald-deep);
  font-size: 30px;
}

.sponsor p {
  color: var(--ink-soft);
  margin: 0;
}

/* ------------------------------------------------------------------ faq -- */

.faq {
  max-width: 820px;
  margin: 0 auto;
}

.faq details {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  padding: 4px 22px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 19px;
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--emerald);
  font-size: 26px;
  line-height: 1;
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  color: var(--ink-soft);
  padding-bottom: 8px;
}

/* -------------------------------------------------------------- contact -- */

.contact {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact aside h2 {
  font-size: clamp(30px, 4vw, 42px);
  color: var(--emerald-deep);
}

.contact aside p {
  color: var(--ink-soft);
}

.form {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.field {
  margin-bottom: 18px;
}

.field label,
.field legend {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--sand);
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--emerald);
  background: var(--white);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field .hint {
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.field .error {
  display: none;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}

.field.invalid input,
.field.invalid textarea {
  border-color: var(--danger);
}

.field.invalid .error {
  display: block;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips label {
  position: relative;
  margin: 0;
  font-weight: 600;
}

.chips span {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--sand);
  background: var(--cream);
  cursor: pointer;
  transition: all 0.15s;
}

.chips input:checked + span {
  border-color: var(--emerald);
  background: var(--emerald-mist);
  color: var(--emerald-deep);
}

.chips input:focus-visible + span {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}


.notice {
  display: none;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 16px;
  font-weight: 600;
}

.notice.success {
  display: block;
  background: var(--emerald-mist);
  color: var(--emerald-deep);
}

.notice.failure {
  display: block;
  background: #fbe5e4;
  color: #9e2b27;
}

/* --------------------------------------------------------------- footer -- */

.cta {
  text-align: center;
  color: var(--white);
  background: linear-gradient(150deg, var(--emerald), var(--emerald-deep));
  border-radius: 36px;
  padding: 56px 28px;
  position: relative;
  overflow: hidden;
}

.cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/pattern.svg');
  background-size: 120px;
  opacity: 0.08;
  pointer-events: none;
}

.cta h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.cta p {
  opacity: 0.9;
  font-size: 19px;
}

.cta .stores {
  justify-content: center;
  position: relative;
  z-index: 1;
}

.cta .button-dark {
  background: var(--white);
  color: var(--ink);
}

footer {
  padding: 40px 0 50px;
  color: var(--ink-soft);
  font-size: 15px;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: center;
  justify-content: space-between;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  color: var(--emerald);
}

/* ----------------------------------------------------------- responsive -- */

@media (max-width: 960px) {
  .hero .wrap,
  .points,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-art {
    margin-top: 10px;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .sponsor {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sponsor .button {
    justify-self: center;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .menu-button {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 68px;
    inset-inline: 0;
    flex-direction: column;
    background: var(--cream);
    border-bottom: 1px solid var(--sand);
    padding: 10px 16px 16px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px;
  }

  .header .lang {
    margin-inline-start: 0;
  }

  section {
    padding: 60px 0;
  }

  .features,
  .row {
    grid-template-columns: 1fr;
  }

  .form,
  .points-card,
  .sponsor {
    padding: 22px;
  }

  .stores .button {
    flex: 1 1 200px;
  }
}

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

  * {
    transition: none !important;
  }
}
