/* Alifayn landing — maquette App Store */
@font-face {
  font-family: "Athelas";
  src: url("../assets/fonts/athelas-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Athelas";
  src: url("../assets/fonts/athelas-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Athelas";
  src: url("../assets/fonts/athelas-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Athelas";
  src: url("../assets/fonts/athelas-bolditalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Hidayatullah";
  src: url("../assets/fonts/hidayatullah-demo.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-cream: #f5f0e6;
  --text-navy: #17232c;
  --accent-gold: #c9a227;
  --accent-gold-soft: #d4b968;
  --divider: rgba(23, 35, 44, 0.14);
  --store-badge-width: 180px;
  --store-badge-height: 54px;
  --layout-max: 1180px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --font-display: "Athelas", Georgia, serif;
  --font-body: "Athelas", Georgia, serif;
  --font-script: "Hidayatullah", "Athelas", Georgia, serif;
  --focus-ring: 2px solid var(--accent-gold);
  --cta-bg-image: url("../assets/alifayn/cta-bg.jpeg");
  --cta-bg-color: #0a1424;
  --text-muted: #6b6b6b;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-navy);
  background-color: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-16);
  top: var(--space-16);
  z-index: 100;
  padding: var(--space-8) var(--space-16);
  background: var(--text-navy);
  color: var(--bg-cream);
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  outline: var(--focus-ring);
  outline-offset: 2px;
  transform: translateY(0);
}

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

:focus:not(:focus-visible) {
  outline: none;
}

main:focus {
  outline: none;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--space-24) var(--space-16) var(--space-48);
  background-color: var(--bg-cream);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/alifayn/ornament-arabesque.svg") center right / 60% no-repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.hero__copy,
.hero__visual {
  position: relative;
  z-index: 1;
}

.hero__header {
  position: relative;
  z-index: 1;
  max-width: var(--layout-max);
  margin: 0 auto var(--space-32);
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-navy);
  line-height: 1;
}

.hero__brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: contain;
  background-color: #17232c;
  padding: 5px;
  box-sizing: border-box;
}

.hero__brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.625rem;
  letter-spacing: 0.02em;
  color: #0f1419;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 4vw, 2.75rem);
  align-items: center;
  max-width: var(--layout-max);
  margin: 0 auto;
}

.hero__copy {
  text-align: center;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__tag {
  display: inline-block;
  margin: 0 0 24px;
  padding: 0;
  background: none;
  border: 0;
  font: 400 14px/1 "Athelas", Georgia, serif;
  color: var(--text-muted, #6b6b6b);
  letter-spacing: 0.02em;
  text-transform: none;
}

.hero__title {
  margin: 0 0 var(--space-16);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 5.2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #0a1016;
}

.hero__lead {
  margin: 0 0 var(--space-32);
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  color: rgba(15, 20, 25, 0.9);
}

.hero__stores {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  margin-bottom: 0;
}

.store-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--store-badge-width);
  height: var(--store-badge-height);
  flex-shrink: 0;
  line-height: 0;
  border-radius: 8px;
  background: #000;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.store-badge:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.store-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px 8px;
  box-sizing: border-box;
}

.hero__launch-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px auto 0;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid rgba(23, 35, 44, 0.1);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  font-family: "Athelas", Georgia, serif;
}

.hero__launch-num {
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  color: #17232c;
}

.hero__launch-unit {
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #17232c;
}

.hero__launch-tag {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b6b6b;
  border-left: 1px solid rgba(23, 35, 44, 0.12);
  padding-left: 10px;
  margin-left: 4px;
}

.hero__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 20px 0 0;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-navy);
}

.hero__trust-icon {
  flex-shrink: 0;
}

.hero__trust-icon svg {
  display: block;
}

.hero__phones {
  position: relative;
  display: block;
  width: 100%;
  min-height: clamp(440px, 60vw, 680px);
  isolation: isolate;
}

.hero__phone {
  position: absolute;
  height: auto;
  width: clamp(220px, 28vw, 340px);
  transform-origin: 50% 55%;
  will-change: transform;
}

/* Light phone — BEHIND, right side, slight CW tilt */
.hero__phone--light {
  top: 6%;
  right: 0;
  transform: rotate(5deg) scale(0.95);
  filter: drop-shadow(0 28px 36px rgba(23, 35, 44, 0.18));
  z-index: 1;
}

/* Dark phone — IN FRONT, left-center, strong CCW tilt */
.hero__phone--dark {
  top: 12%;
  left: 8%;
  transform: rotate(-12deg) scale(1);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.32));
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .hero__phone {
    transition: none;
  }
}

/* Mobile — stack, no tilt */
@media (max-width: 760px) {
  .hero__phones {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    min-height: auto;
  }

  .hero__phone {
    position: static;
    transform: none;
    width: 78%;
    max-width: 300px;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.18));
  }

  .hero__phone--dark {
    order: 1;
  }

  .hero__phone--light {
    order: 2;
  }

  .hero__launch-counter {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero__launch-tag {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
  }
}

/* --- Pillars --- */
.pillars {
  padding: 56px var(--space-16) var(--space-64);
  background-color: var(--bg-cream);
}

.pillars__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--layout-max);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.pillars__item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-24);
  padding: var(--space-32) var(--space-8);
  border-bottom: 1px solid rgba(212, 185, 104, 0.25);
}

.pillars__item:last-child {
  border-bottom: none;
}

.pillars__icon {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.pillars__text {
  min-width: 0;
}

.pillars__heading {
  margin: 0 0 var(--space-8);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.25;
  color: var(--text-navy);
}

.pillars__desc {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  font-weight: 400;
  color: var(--text-navy);
}

/* --- CTA --- */
.cta {
  position: relative;
  padding: 0 var(--space-24) var(--space-48);
  padding-top: 0;
  text-align: center;
  color: #f8f4ec;
  background-color: var(--cta-bg-color);
  background-image: var(--cta-bg-image);
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 14, 28, 0.45) 0%,
    rgba(8, 14, 28, 0.25) 35%,
    rgba(8, 14, 28, 0.55) 100%
  );
  pointer-events: none;
}

.cta__border {
  position: relative;
  z-index: 1;
  max-width: min(100%, 1040px);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.cta__border--top::before,
.cta__border--top::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 22px;
  height: 22px;
  z-index: 2;
  pointer-events: none;
  border-color: rgba(212, 185, 104, 0.95);
  border-style: solid;
  border-width: 0;
}

.cta__border--top::before {
  left: 4px;
  border-top-width: 1px;
  border-left-width: 1px;
}

.cta__border--top::after {
  right: 4px;
  border-top-width: 1px;
  border-right-width: 1px;
}

.cta__border--bottom::before,
.cta__border--bottom::after {
  content: "";
  position: absolute;
  bottom: 18px;
  width: 22px;
  height: 22px;
  z-index: 2;
  pointer-events: none;
  border-color: rgba(212, 185, 104, 0.95);
  border-style: solid;
  border-width: 0;
}

.cta__border--bottom::before {
  left: 4px;
  border-bottom-width: 1px;
  border-left-width: 1px;
}

.cta__border--bottom::after {
  right: 4px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}

.cta__border--top {
  padding-top: var(--space-24);
}

.cta__border--bottom {
  padding-bottom: var(--space-24);
}

.cta__rule {
  display: block;
  width: 100%;
  height: 28px;
}

.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--space-32) var(--space-8) 40px;
}

.cta__title {
  margin: 0 0 var(--space-16);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.125rem, 4.2vw, 2.875rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  color: #e8d5a3;
}

.cta__sub {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 2vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(252, 248, 240, 0.96);
}

.newsletter {
  background: #fff;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 64px);
  border-top: 1px solid rgba(23, 35, 44, 0.08);
}

.newsletter__inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.newsletter__title {
  font-family: "Athelas", Georgia, serif;
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  color: #17232c;
  margin: 0 0 12px;
}

.newsletter__lead {
  font-family: "Athelas", Georgia, serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: #4a5660;
  margin: 0 0 28px;
}

.newsletter__form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto 12px;
}

.newsletter__input {
  flex: 1;
  padding: 14px 18px;
  font-family: "Athelas", Georgia, serif;
  font-size: 15px;
  color: #17232c;
  background: #f3e8da;
  border: 1px solid rgba(23, 35, 44, 0.12);
  border-radius: 999px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.newsletter__input::placeholder {
  color: #9a9a9a;
}

.newsletter__input:focus {
  border-color: #d4b968;
  box-shadow: 0 0 0 3px rgba(212, 185, 104, 0.2);
}

.newsletter__submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 22px;
  font-family: "Athelas", Georgia, serif;
  font-weight: 700;
  font-size: 15px;
  color: #f3e8da;
  background: #17232c;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.newsletter__submit:hover {
  background: #0e1820;
  transform: translateY(-1px);
}

.newsletter__legal {
  font-family: "Athelas", Georgia, serif;
  font-size: 12px;
  color: #8a8a8a;
  margin: 0;
}

@media (max-width: 560px) {
  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__submit {
    justify-content: center;
  }
}

/* Reveal */
html.js-reveal .section--fade {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

html.js-reveal .section--fade.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js-reveal .section--fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (min-width: 560px) {
  .hero__stores {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 14px;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 40px var(--space-32) 72px;
    min-height: auto;
  }

  .hero__header {
    margin-bottom: 48px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 3rem;
    align-items: center;
  }

  .hero__copy {
    text-align: left;
    padding-right: var(--space-24);
  }

  .hero__lead {
    margin-left: 0;
    margin-right: 0;
    max-width: 26.5rem;
    font-size: 1.125rem;
  }

  .hero__stores {
    justify-content: flex-start;
    gap: 14px;
  }

  .hero__trust {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: 0;
  }

  .hero__phones {
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: 0;
  }

  .hero__brand-text {
    font-size: 1.75rem;
  }

  .hero__title {
    font-size: 3.35rem;
    letter-spacing: -0.03em;
  }

  .pillars__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid rgba(212, 185, 104, 0.35);
    border-bottom: 1px solid rgba(212, 185, 104, 0.35);
  }

  .pillars__list > li + li {
    border-left: 1px solid rgba(212, 185, 104, 0.35);
  }

  .pillars__item {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 56px 36px;
    border-bottom: none;
  }

  .pillars__heading {
    font-size: 1.5rem;
  }

  .pillars__desc {
    font-size: 1.0625rem;
    max-width: 17rem;
    margin: 0 auto;
  }

  .pillars__icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-8);
  }
}

@media (min-width: 1200px) {
  .hero__title {
    font-size: 3.85rem;
  }
}
