/* ==========================================================
   PerliCare brand tokens (same values as brand/palette.html)
   ========================================================== */
:root {
  --pearl: #FAF6EE;        /* Pearl White  - page background */
  --cream: #F3E9DB;        /* Silk Cream   - alternate sections */
  --blush: #EDDCCF;        /* Blush Petal  - cards, soft fills */
  --sage: #B6BDA8;         /* Sage Leaf    - decorative accent */
  --rose-gold: #BD9A84;    /* Rose Gold    - lines, icons, borders */
  --antique-gold: #8C6753; /* Antique Gold - accent text, labels */
  --taupe: #6B524B;        /* Mauve Taupe  - body text */
  --cocoa: #4A3329;        /* Cocoa Brown  - headings, buttons */

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(74, 51, 41, .05), 0 10px 30px rgba(74, 51, 41, .07);
  --line: rgba(189, 154, 132, .32);
  --header-h: 68px;
}

:lang(ar) {
  --font-display: "El Messiri", "Tajawal", serif;
  --font-body: "Tajawal", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pearl);
  color: var(--taupe);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:lang(ar) body { font-size: 18px; line-height: 1.85; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); color: var(--cocoa); line-height: 1.15; margin: 0; font-weight: 600; }
p { margin: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* Hide content until Arabic text is applied (only set by JS, with a timeout fallback) */
html.i18n-pending body { visibility: hidden; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.container.narrow { max-width: 760px; text-align: center; }
@media (min-width: 720px) { .container { padding-inline: 32px; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  height: var(--header-h);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.scrolled {
  background: rgba(250, 246, 238, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px;
  display: flex; align-items: center; gap: 24px;
}
@media (min-width: 720px) { .header-inner { padding-inline: 32px; } }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; }
.brand .brand-wordmark { width: auto; height: 30px; }
@media (min-width: 720px) { .brand .brand-wordmark { height: 34px; } }
.nav { display: none; gap: 28px; margin-inline-start: auto; }
.nav a { font-size: 15px; color: var(--taupe); position: relative; padding-block: 4px; transition: color .2s; }
.nav a::after {
  content: ""; position: absolute; inset-inline: 0; inset-block-end: 0; height: 1px;
  background: var(--rose-gold); transform: scaleX(0); transition: transform .25s ease;
}
.nav a:hover { color: var(--cocoa); }
.nav a:hover::after { transform: scaleX(1); }
.lang-toggle {
  margin-inline-start: auto;
  font: 500 14px/1 "Tajawal", "Jost", sans-serif;
  color: var(--cocoa); background: transparent;
  border: 1px solid var(--rose-gold); border-radius: 999px;
  padding: 9px 16px; cursor: pointer; transition: background-color .2s, color .2s;
}
.lang-toggle:hover { background: var(--cocoa); color: var(--pearl); border-color: var(--cocoa); }
@media (min-width: 860px) {
  .nav { display: flex; }
  .lang-toggle { margin-inline-start: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: calc(var(--header-h) + 24px) 16px 64px;
  text-align: center;
  background:
    radial-gradient(60% 50% at 18% 22%, rgba(237, 220, 207, .95), transparent 70%),
    radial-gradient(50% 45% at 85% 78%, rgba(182, 189, 168, .30), transparent 70%),
    radial-gradient(55% 50% at 80% 15%, rgba(243, 233, 219, .9), transparent 70%),
    linear-gradient(160deg, #FCF9F3 0%, var(--pearl) 45%, #F5EBDF 100%);
}
.hero-glow {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .55) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: sheen 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(78vw, 380px); height: auto; filter: drop-shadow(0 10px 30px rgba(140, 103, 83, .12)); }
.hero-lead { margin-top: 24px; font-size: clamp(18px, 2.4vw, 21px); color: var(--taupe); max-width: 40ch; }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 500; letter-spacing: .02em;
  transition: transform .2s ease, background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cocoa); color: var(--pearl); box-shadow: 0 8px 20px rgba(74, 51, 41, .18); }
.btn-primary:hover { background: #3B2820; }
.btn-ghost { border: 1px solid var(--rose-gold); color: var(--cocoa); background: rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: #fff; }

/* ---------- Sections ---------- */
.section { padding-block: 88px; }
.section.alt { background: var(--cream); }
@media (min-width: 720px) { .section { padding-block: 112px; } }
.section-head { text-align: center; margin-bottom: 48px; }
.eyebrow {
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--antique-gold);
  margin-bottom: 12px; display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--rose-gold); }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 15px; }
h2 { font-size: clamp(34px, 5vw, 48px); }
.lead { margin-top: 20px; font-size: clamp(17px, 2vw, 19px); }

/* Range cards */
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px; text-align: center; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(74, 51, 41, .1); }
.icon {
  width: 52px; height: 52px; margin: 0 auto 18px;
  fill: none; stroke: var(--rose-gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 25px; margin-bottom: 8px; }
:lang(ar) .card h3 { font-size: 22px; }
.card p { font-size: 15.5px; }

/* Why features */
.features { display: grid; gap: 18px; grid-template-columns: 1fr; max-width: 920px; margin-inline: auto; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
.feature {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px; border-radius: var(--radius); background: var(--pearl);
  border: 1px solid var(--line);
}
.feature-icon {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, var(--blush));
}
.feature-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--antique-gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 23px; margin-bottom: 4px; }
:lang(ar) .feature h3 { font-size: 20px; }
.feature p { font-size: 15.5px; }

/* Follow us */
.follow {
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(237, 220, 207, .8), transparent 70%),
    var(--pearl);
}
.follow-mark { width: 72px; height: 72px; margin: 0 auto 18px; }
.socials { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.social {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 22px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--cocoa); font-weight: 500; font-size: 15px;
  box-shadow: var(--shadow); transition: transform .2s ease, background-color .2s, color .2s;
}
.social svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.social:hover { transform: translateY(-2px); background: var(--cocoa); color: var(--pearl); }

/* Contact */
.contacts { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .contacts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .contacts { grid-template-columns: repeat(4, 1fr); } }
.contact-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 28px 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line); transition: transform .25s ease, box-shadow .25s ease;
}
a.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-card .icon { width: 40px; height: 40px; margin-bottom: 10px; }
.contact-label { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--antique-gold); }
:lang(ar) .contact-label { letter-spacing: 0; font-size: 15px; }
.contact-value { color: var(--cocoa); font-weight: 500; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--cocoa); color: rgba(250, 246, 238, .78); padding-block: 56px 40px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.footer-inner img { width: 56px; height: 56px; }
.footer-tagline { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 22px; color: var(--pearl); }
.footer-socials { display: flex; gap: 14px; margin-block: 6px; }
.footer-socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(189, 154, 132, .5); transition: background-color .2s, color .2s;
}
.footer-socials svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.footer-socials a:hover { background: var(--rose-gold); color: var(--cocoa); }
.copyright { font-size: 14px; }

/* ---------- Reveal on scroll (only when JS runs) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--antique-gold); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
