/* Tiryaq landing — mobile-first, RTL, Cairo, leaf-seafoam palette
 * Imports tokens from colors_and_type.css. Locked 2026-05-05.
 */

/* ─────────── RESET / BASE ─────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-page);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
section { position: relative; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: 24px;
}
@media (min-width: 768px)  { .container { padding-inline: 32px; } }
@media (min-width: 1024px) { .container { padding-inline: 80px; } }

/* ─────────── BUTTONS ─────────── */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-arabic); font-weight: var(--fw-semibold);
  font-size: var(--fs-button);
  padding: 16px 26px; border-radius: var(--radius-md);
  text-decoration: none; cursor: pointer; user-select: none;
  min-height: 48px;
  transition: transform var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
  border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--cta-bg); color: var(--cta-fg);
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-cta), 0 0 0 2px var(--teal-300);
  background: var(--cta-hover-bg);
}
.btn-primary:active { transform: scale(0.99); }
.btn-ghost {
  background: transparent; color: var(--teal-700);
  border-color: var(--teal-700);
}
.btn-ghost:hover { background: var(--teal-100); }
@media (min-width: 768px) {
  .btn-primary, .btn-ghost { padding: 14px 24px; min-height: 44px; }
}

/* ─────────── NAV ─────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 244, 236, 0); /* transparent on hero */
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(248, 244, 236, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--bone-300);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 16px;
  min-height: 60px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--teal-900);
  font-family: var(--font-arabic); font-weight: var(--fw-bold);
  font-size: 22px; letter-spacing: -0.2px;
}
.nav-logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-links { display: none; }
.nav-cta { display: none; }
.nav-burger {
  margin-inline-start: auto;
  width: 44px; height: 44px;
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  background: transparent; border: 1px solid var(--bone-300);
  border-radius: var(--radius-md);
}
.nav-burger span {
  width: 18px; height: 1.5px; background: var(--ink-900); border-radius: 2px;
}
@media (min-width: 768px)  { .nav-inner { padding: 16px 32px; min-height: 72px; } }
@media (min-width: 900px)  {
  .nav-burger { display: none; }
  .nav-links {
    display: flex; gap: 28px; margin-inline-start: auto;
    font-family: var(--font-arabic); font-weight: var(--fw-medium);
    font-size: 15px; color: var(--ink-700);
  }
  .nav-links a:hover { color: var(--teal-700); }
  .nav-cta { display: inline-flex; padding: 10px 18px; min-height: 40px; font-size: 14px; }
}
@media (min-width: 1024px) { .nav-inner { padding: 16px 80px; } }

/* mobile drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto;
  width: min(85vw, 340px); height: 100dvh;
  background: var(--bone-50);
  z-index: 70;
  padding: 80px 28px 24px;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  display: flex; flex-direction: column;
  border-inline-start: 1px solid var(--bone-300);
}
.drawer.is-open { transform: translateX(0); }
.drawer-close {
  position: absolute; top: 20px; left: 20px;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--bone-300);
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
}
.drawer-close span {
  position: absolute; width: 18px; height: 1.5px; background: var(--ink-900);
}
.drawer-close span:first-child { transform: rotate(45deg); }
.drawer-close span:last-child  { transform: rotate(-45deg); }
.drawer-links {
  display: flex; flex-direction: column; gap: 20px;
  font-family: var(--font-arabic); font-weight: var(--fw-medium);
  font-size: 18px; color: var(--ink-900);
}
.drawer-links a { padding: 8px 0; }
.drawer-links .btn-primary {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
  padding-block: 14px;
}
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 43, 54, 0.45);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
@media (min-width: 900px) { .drawer, .drawer-backdrop { display: none; } }

/* ─────────── HERO ─────────── */
.hero {
  padding: 32px 0 48px;
  background: var(--bone-100);
}
.hero-titles {
  max-width: 920px;
  margin: 0 auto 28px;
  padding: 0 24px;
  text-align: center;
}
.hero-titles .t-display { margin: 0 0 14px; color: var(--teal-900); }
.hero-titles .t-lead    { margin: 0; color: var(--ink-700); max-width: 56ch; margin-inline: auto; }

.hero-binary {
  display: flex; flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 16px;
  max-width: 1280px;
  margin: 0 auto;
}
.hero-half {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 380px;
  display: flex; align-items: flex-end;
  box-shadow: var(--shadow-card);
  isolation: isolate;
}
.hero-half__photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: 0;
}
.hero-half__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(248, 244, 236, 0.25) 0%,
    rgba(248, 244, 236, 0.55) 60%,
    rgba(248, 244, 236, 0.85) 100%);
}
.hero-half--patient .hero-half__photo { background-position: 80% center; }
.hero-half--doctor  .hero-half__photo { background-position: 30% center; }
.hero-half__body {
  position: relative; z-index: 1;
  padding: 24px;
  max-width: 100%;
}
.hero-half__body .t-eyebrow { display: block; margin-bottom: 8px; }
.hero-half__body .t-h2 { margin: 0 0 8px; color: var(--teal-900); }
.hero-half__body .t-body { margin: 0 0 16px; color: var(--ink-700); }

.or-divider {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 14px 0;
}
.or-line {
  flex: 1; height: 1px;
  background: var(--bone-300);
  max-width: 120px;
}
.or-badge {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bone-100);
  border: 1px solid var(--bone-300);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-arabic); font-weight: var(--fw-semibold);
  font-size: 20px; color: var(--ink-700);
  animation: or-pulse 4s ease-in-out infinite;
}
@keyframes or-pulse {
  0%, 100% { opacity: 0.85; box-shadow: var(--shadow-card); }
  50%      { opacity: 1.00; box-shadow: var(--shadow-lift); }
}
@media (min-width: 1024px) {
  .hero { padding: 56px 0 80px; }
  .hero-binary {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    min-height: 520px;
  }
  .hero-half {
    flex: 1;
    min-height: 520px;
    border-radius: 0;
    box-shadow: none;
  }
  .hero-half--patient { border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
  .hero-half--doctor  { border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }
  .hero-half__body { padding: 40px 36px; max-width: 90%; }
  .or-divider {
    flex-direction: column;
    padding: 0 12px;
    align-self: center;
  }
  .or-line {
    width: 1px; height: 80px;
    max-width: none;
    background: var(--bone-300);
  }
}

/* ─────────── HOW IT WORKS ─────────── */
.how {
  padding: 64px 0;
  background: var(--bone-100);
}
.section-head {
  max-width: 720px;
  margin: 0 auto 40px;
}
.section-head .t-h2 { margin: 0 0 12px; color: var(--teal-900); }
.section-head .t-lead { margin: 0; color: var(--ink-700); }
.section-head--center { text-align: center; }

.how-steps {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.how-step {
  background: var(--bone-50);
  border: 1px solid var(--bone-300);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.how-step:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}
.how-step__num {
  font-family: var(--font-arabic); font-weight: var(--fw-bold);
  font-size: 32px; color: var(--teal-300);
  line-height: 1; margin-bottom: 12px;
}
.how-step .t-h3 { margin: 0 0 6px; color: var(--teal-900); }
.how-step .t-body { margin: 0; color: var(--ink-700); }

@media (min-width: 768px) {
  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
  .how { padding: 96px 0; }
  .how-steps { gap: 24px; }
  .how-step { padding: 32px 28px; }
  .how-step__num { font-size: 40px; }
}

/* ─────────── SPLITS (patients / doctors) ─────────── */
.split { padding: 64px 0; }
.split--patients { background: var(--bone-100); }
.split--doctors  { background: var(--bone-50); }

.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
.split-img {
  margin: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
}
.split-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.split-text .t-eyebrow { display: block; margin-bottom: 10px; }
.split-text .t-h2 { margin: 0 0 12px; color: var(--teal-900); }
.split-text .t-lead { margin: 0 0 20px; color: var(--ink-700); }

.bullets {
  display: flex; flex-direction: column;
  gap: 12px;
  margin: 0 0 28px;
  font-family: var(--font-arabic);
  font-size: 16px; color: var(--ink-900);
  line-height: 1.6;
}
.bullets li {
  display: flex; align-items: flex-start; gap: 10px;
}
.bullets .check {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal-200);
  position: relative;
  margin-top: 2px;
}
.bullets .check::after {
  content: ""; position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'><path fill='none' stroke='%23043441' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M6 11.5l3.2 3.2L16 8'/></svg>") center/contain no-repeat;
}

@media (min-width: 1024px) {
  .split { padding: 96px 0; }
  .split-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  /* RTL default: image right, text left (DOM order) */
  /* Reverse variant: image left, text right */
  .split--reverse .split-grid > .split-img  { order: 2; }
  .split--reverse .split-grid > .split-text { order: 1; }
  .split-img { aspect-ratio: 4 / 5; }
}

/* ─────────── TRUST ─────────── */
.trust {
  position: relative;
  padding: 80px 0;
  isolation: isolate;
  overflow: hidden;
}
.trust-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: -2;
}
.trust-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(179, 224, 215, 0.92) 0%,
    rgba(179, 224, 215, 0.78) 100%);
  z-index: -1;
}
.trust-inner { position: relative; z-index: 1; }
.trust-inner .section-head .t-h2 { color: var(--teal-900); }
.trust-inner .section-head .t-lead { color: var(--ink-700); }

.trust-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
.pillar {
  background: var(--bone-50);
  border: 1px solid rgba(39, 126, 131, 0.18);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.pillar-disc {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.pillar-title {
  margin: 0 0 6px;
  font-family: var(--font-arabic); font-weight: var(--fw-bold);
  font-size: 16px; color: var(--teal-900);
}
.pillar-sub {
  margin: 0;
  font-family: var(--font-arabic); font-size: 14px;
  line-height: 1.55; color: var(--ink-700);
}

.trust-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  text-align: center;
  background: rgba(253, 251, 246, 0.85);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(39, 126, 131, 0.18);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-family: var(--font-latin); font-weight: var(--fw-bold);
  font-size: 32px; color: var(--teal-900);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-arabic); font-size: 14px;
  color: var(--ink-700);
}

@media (min-width: 600px) {
  .trust-pillars { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .trust-stats   { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
@media (min-width: 1024px) {
  .trust { padding: 112px 0; }
  .trust-pillars { grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 56px; }
  .pillar { padding: 32px 24px; }
  .pillar-disc { width: 56px; height: 56px; }
  .pillar-title { font-size: 18px; margin-bottom: 8px; }
  .stat-num { font-size: 44px; }
}

/* ─────────── WAITLIST CTA ─────────── */
.waitlist {
  padding: 72px 0;
  background: var(--teal-900);
  color: var(--bone-50);
  position: relative;
  overflow: hidden;
}
.waitlist::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 400px at 80% 0%, rgba(125, 184, 176, 0.18), transparent 70%),
    radial-gradient(700px 300px at 20% 100%, rgba(179, 224, 215, 0.12), transparent 70%);
  pointer-events: none;
}
.waitlist-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.waitlist-inner .t-h1 {
  color: var(--bone-50);
  margin: 0 0 12px;
}
.waitlist-inner .t-lead {
  color: rgba(248, 244, 236, 0.78);
  margin: 0 0 28px;
}
.waitlist-form {
  display: flex; flex-direction: column;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto 16px;
}
.waitlist-form input {
  background: var(--bone-50);
  color: var(--ink-900);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-family: var(--font-arabic); font-size: 16px;
  outline: none;
  direction: rtl;
  min-height: 52px;
  transition: border-color var(--dur-base) var(--ease-out);
}
.waitlist-form input::placeholder { color: var(--ink-300); }
.waitlist-form input:focus { border-color: var(--teal-300); }
.waitlist-form .btn-primary {
  background: var(--teal-300);
  color: var(--teal-900);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.waitlist-form .btn-primary:hover {
  background: var(--teal-200);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30), 0 0 0 2px rgba(228, 244, 234, 0.6);
}
.waitlist-success {
  margin: 0 auto 16px;
  font-family: var(--font-arabic); font-size: 15px;
  color: var(--teal-200);
}
.waitlist-privacy {
  margin: 0;
  font-family: var(--font-arabic); font-size: 13px;
  color: rgba(248, 244, 236, 0.55);
}
.waitlist-privacy a {
  color: rgba(248, 244, 236, 0.85); text-decoration: underline; text-underline-offset: 3px;
}
@media (min-width: 600px) {
  .waitlist-form { flex-direction: row; }
  .waitlist-form input { flex: 1; }
}
@media (min-width: 1024px) { .waitlist { padding: 112px 0; } }

/* ─────────── FAQ ─────────── */
.faq {
  padding: 72px 0;
  background: var(--bone-50);
}
.faq-inner { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--bone-100);
  border: 1px solid var(--bone-300);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.faq-item[open] { box-shadow: var(--shadow-card); }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-arabic); font-weight: var(--fw-semibold);
  font-size: 17px; color: var(--teal-900);
  list-style: none;
  position: relative;
  padding-inline-end: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-latin); font-weight: var(--fw-medium);
  font-size: 22px; color: var(--teal-500);
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 12px 0 4px;
  font-family: var(--font-arabic); font-size: 15px;
  color: var(--ink-700); line-height: 1.7;
}

/* ─────────── FOOTER ─────────── */
.footer {
  background: var(--ink-900);
  color: rgba(248, 244, 236, 0.72);
  padding: 56px 0 24px;
  font-family: var(--font-arabic);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.footer-brand .footer-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--bone-50);
  font-family: var(--font-arabic); font-weight: var(--fw-bold);
  font-size: 22px;
  margin-bottom: 12px;
}
.footer-brand .footer-logo img { width: 36px; height: 36px; object-fit: contain; filter: brightness(1.4); }
.footer-tagline {
  margin: 0;
  font-size: 14px;
  color: rgba(248, 244, 236, 0.55);
  line-height: 1.6;
  max-width: 28ch;
}
.footer-col h4 {
  margin: 0 0 14px;
  font-family: var(--font-arabic); font-weight: var(--fw-semibold);
  font-size: 13px; letter-spacing: 0.4px;
  color: rgba(248, 244, 236, 0.45);
  text-transform: none;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a, .footer-col li {
  color: rgba(248, 244, 236, 0.78);
  font-size: 14px;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--teal-300); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(248, 244, 236, 0.08);
  text-align: center;
  font-size: 13px;
  color: rgba(248, 244, 236, 0.45);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.2fr repeat(4, 1fr); gap: 32px; }
}
@media (min-width: 1024px) {
  .footer { padding: 80px 0 32px; }
  .footer-grid { gap: 48px; }
}

/* ─────────── REVEAL ANIMATIONS ─────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .or-badge { animation: none; }
  html { scroll-behavior: auto; }
}

/* ─────────── ACCESSIBLE FOCUS ─────────── */
:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}
