/* Babel Pharmaceutical Pharmacy — Brand styles */

:root {
  --green-950: #0c2419;
  --green-900: #123528;
  --green-800: #1a523a;
  --green-700: #226b4b;
  --green-100: #e8f2ec;
  --gold: #c9a227;
  --gold-soft: #e4c96a;
  --blossom: #e8a0b8;
  --ink: #14201a;
  --muted: #5a6b62;
  --paper: #f7faf8;
  --white: #ffffff;
  --line: rgba(26, 82, 58, 0.12);
  --shadow: 0 24px 60px rgba(12, 36, 25, 0.14);
  --radius: 1.25rem;
  --header-h: 4.5rem;
  --font-ar: "Tajawal", "Amiri", sans-serif;
  --font-en: "Outfit", system-ui, sans-serif;
  --font-display-ar: "Amiri", "Tajawal", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(232, 160, 184, 0.12), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(201, 162, 39, 0.08), transparent 50%),
    linear-gradient(180deg, #f4f8f5 0%, var(--paper) 40%, #eef5f1 100%);
  font-family: var(--font-ar);
  line-height: 1.7;
  overflow-x: hidden;
}

body[dir="ltr"] {
  font-family: var(--font-en);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.page-glow {
  pointer-events: none;
  position: fixed;
  inset: auto -20% -30% auto;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(26, 82, 58, 0.08), transparent 70%);
  z-index: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  backdrop-filter: blur(16px);
  background: rgba(247, 250, 248, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(18, 53, 40, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text span {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--green-800);
}

.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

body[dir="ltr"] .brand-text span {
  font-family: var(--font-en);
  font-weight: 600;
}

.nav {
  display: none;
  gap: 1.75rem;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green-800), var(--gold));
  transition: width 0.3s var(--ease);
}

.nav a:hover {
  color: var(--green-800);
}

.nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle {
  min-width: 2.75rem;
  height: 2.5rem;
  padding-inline: 0.85rem;
  border-radius: 999px;
  background: var(--green-800);
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}

.lang-toggle:hover {
  background: var(--green-700);
  transform: translateY(-1px);
}

.menu-toggle {
  width: 2.75rem;
  height: 2.5rem;
  display: grid;
  place-content: center;
  gap: 5px;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--white);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--green-800);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem 1.25rem;
  background: rgba(247, 250, 248, 0.96);
  border-bottom: 1px solid var(--line);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  color: var(--green-900);
  font-weight: 600;
}

.mobile-nav a:hover {
  background: var(--green-100);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s var(--ease), transform 8s ease;
}

.hero-img.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 36, 25, 0.35) 0%, rgba(12, 36, 25, 0.55) 45%, rgba(12, 36, 25, 0.88) 100%),
    radial-gradient(ellipse at 50% 20%, rgba(232, 160, 184, 0.18), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-block: 4.5rem 5.5rem;
  text-align: center;
  animation: riseIn 1s var(--ease) both;
}

.hero-logo {
  width: 88px;
  height: 88px;
  margin-inline: auto;
  margin-bottom: 1.25rem;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  animation: floatLogo 4.5s ease-in-out infinite;
}

.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(228, 201, 106, 0.45);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.18);
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coming-soon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.6);
  animation: pulseDot 1.8s ease-out infinite;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display-ar);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

body[dir="ltr"] .hero h1 {
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 auto 1.75rem;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 400;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #dbb94a 100%);
  color: var(--green-950);
  box-shadow: 0 12px 28px rgba(201, 162, 39, 0.35);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.14);
}

.scroll-hint {
  position: absolute;
  inset-inline-start: 50%;
  bottom: 1.25rem;
  z-index: 2;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
}

.scroll-hint span {
  display: block;
  width: 4px;
  height: 8px;
  margin: 6px auto 0;
  border-radius: 999px;
  background: var(--gold-soft);
  animation: scrollPulse 1.6s var(--ease) infinite;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.section-eyebrow {
  margin: 0 0 0.5rem;
  color: var(--green-700);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display-ar);
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.25;
  color: var(--green-900);
}

body[dir="ltr"] .section h2 {
  font-family: var(--font-en);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-head {
  margin-bottom: 2.5rem;
  text-align: center;
}

.section-head .section-lead {
  margin-inline: auto;
}

/* About */
.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.about-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.about-copy p + p {
  margin-top: 0.85rem;
}

.about-highlights {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.about-highlights li {
  position: relative;
  padding-inline-start: 1.5rem;
  color: var(--green-900);
  font-weight: 600;
}

.about-highlights li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-800), var(--gold));
}

.about-visual {
  margin: 0;
  position: relative;
}

.about-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: calc(var(--radius) + 0.35rem);
  box-shadow: var(--shadow);
}

.about-visual::after {
  content: "";
  position: absolute;
  inset: auto -0.75rem -0.75rem auto;
  width: 42%;
  height: 42%;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 39, 0.45);
  z-index: -1;
}

.about-visual figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

body[dir="ltr"] .about-visual::after {
  inset: auto auto -0.75rem -0.75rem;
}

/* Departments */
.departments {
  background:
    linear-gradient(180deg, transparent, rgba(26, 82, 58, 0.04) 20%, rgba(26, 82, 58, 0.06) 80%, transparent);
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
}

.dept-item {
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.dept-item:hover {
  transform: translateY(-6px);
  border-color: rgba(26, 82, 58, 0.28);
  box-shadow: var(--shadow);
}

.dept-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, var(--green-100), #fff);
  color: var(--green-800);
}

.dept-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.dept-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  color: var(--green-900);
}

.dept-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 1rem;
}

.gallery-main img,
.gallery-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.gallery-main {
  margin: 0;
  min-height: 280px;
}

.gallery-main img {
  aspect-ratio: 16 / 10;
}

.gallery-side {
  margin: 0;
}

.gallery-side img {
  aspect-ratio: 16 / 11;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
}

.contact-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.contact-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.contact-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.contact-list a {
  color: var(--green-800);
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-word;
}

.contact-list a:hover {
  color: var(--gold);
}

.map-wrap {
  display: grid;
  gap: 0.85rem;
}

.map-wrap iframe {
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  filter: saturate(0.92) contrast(1.02);
}

.map-link {
  justify-self: start;
  color: var(--green-800);
  font-weight: 700;
  border-bottom: 1px solid rgba(26, 82, 58, 0.25);
  padding-bottom: 0.15rem;
  transition: color 0.25s, border-color 0.25s;
}

.map-link:hover {
  color: var(--gold);
  border-color: rgba(201, 162, 39, 0.5);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(18, 53, 40, 0.06));
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  border-radius: 10px;
}

.footer-brand strong {
  display: block;
  color: var(--green-900);
}

.footer-brand span {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(201, 162, 39, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); }
}

@keyframes scrollPulse {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* Responsive */
@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

  .about-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
  }

  .gallery-main img,
  .gallery-side img {
    height: 420px;
    aspect-ratio: auto;
  }

  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    padding-block: 5.5rem 6.5rem;
  }

  .hero-logo {
    width: 104px;
    height: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .hero-content,
  .hero-logo,
  .hero-img,
  .coming-soon::before,
  .scroll-hint span {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}
