/* ============================================================
   Up Right Healthcare — Design System
   Palette: brand purples (#6B4FA0 / #7B6BA8 / #B8A9D9) + white
   Type: Fraunces (display) + Manrope (body)
   Signature: the plumb line (postural alignment)
   ============================================================ */

:root {
  /* Brand */
  --purple:        #6B4FA0;   /* primary  (Pantone 2617 C) */
  --purple-mid:    #7B6BA8;   /* Pantone 2627 C */
  --lavender:      #B8A9D9;   /* Pantone 2635 C */
  --purple-deep:   #4E3A7A;   /* derived depth */

  /* Neutrals */
  --ink:           #241E38;   /* plum-charcoal text */
  --ink-soft:      #574F6E;   /* muted text */
  --line:          #E4DDF1;   /* hairline borders */
  --bg:            #F7F5FB;   /* lavender-white page bg */
  --surface:       #FFFFFF;
  --fill:          #EFEAF8;   /* soft lavender fill */
  --fill-2:        #F3EFFA;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Scale */
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2:  clamp(1.5rem, 1.3rem + 0.9vw, 1.95rem);
  --step-3:  clamp(1.95rem, 1.6rem + 1.7vw, 2.9rem);
  --step-4:  clamp(2.5rem, 1.9rem + 2.9vw, 4.1rem);

  --container: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 50px -24px rgba(78, 58, 122, 0.35);
  --shadow-sm: 0 8px 24px -14px rgba(78, 58, 122, 0.3);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-optical-sizing: auto;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

::selection { background: var(--lavender); color: var(--purple-deep); }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--fill); }
.section--deep { background: var(--purple-deep); color: #EDE7F8; }
.section--deep h2, .section--deep h3 { color: #fff; }

.stack > * + * { margin-top: 1rem; }
.lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.55; max-width: 60ch; }

/* ---------- Eyebrow + plumb marker (signature) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--body); font-weight: 600;
  font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--purple);
}
.eyebrow::before {
  content: ""; width: 1px; height: 1.4em;
  background: linear-gradient(var(--lavender), var(--purple));
  position: relative;
}
.eyebrow::after { /* the plumb bob */
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple); margin-left: -0.5rem; align-self: flex-end;
  box-shadow: 0 0 0 3px rgba(107,79,160,0.12);
}
.section--deep .eyebrow { color: var(--lavender); }
.section--deep .eyebrow::after { background: var(--lavender); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head .lead { margin-top: 1rem; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow { justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: var(--step-0);
  border: 1px solid transparent; transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--purple); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--purple-deep); }
.btn--ghost { background: transparent; color: var(--purple); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--purple); background: var(--surface); }
.btn--light { background: #fff; color: var(--purple-deep); }
.btn--wa { background: #25D366; color: #063d1e; }
.btn--wa:hover { background: #1fb959; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,245,251,0.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.brand .mark { width: 26px; height: 34px; flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-family: var(--display); font-weight: 600; font-size: 1.16rem; letter-spacing: -0.01em; color: var(--ink); }
.brand-name span { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--purple-mid); font-weight: 600; margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 0.35rem; }
.nav-links a {
  padding: 0.5rem 0.8rem; border-radius: 999px; font-weight: 500;
  font-size: 0.96rem; color: var(--ink-soft); transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--purple); background: var(--fill); }
.nav-links a.active { color: var(--purple-deep); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.lang-toggle {
  font-size: 0.85rem; font-weight: 600; color: var(--ink-soft);
  padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  transition: border-color 0.2s, color 0.2s;
}
.lang-toggle:hover { color: var(--purple); border-color: var(--purple); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin: 1.2rem 0 1.4rem; }
.hero h1 em { font-style: italic; color: var(--purple); }
.hero .lead { margin-bottom: 2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.2rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.85rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; font-size: 0.82rem; font-weight: 600; color: var(--purple-deep);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lavender); }

/* Hero visual — alignment motif card */
.hero-visual {
  position: relative; aspect-ratio: 4/5; border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, var(--lavender) 0%, var(--purple-mid) 55%, var(--purple-deep) 100%);
  box-shadow: var(--shadow); display: grid; place-items: center;
}
.hero-visual svg { width: 62%; height: auto; }
.hero-visual .caption {
  position: absolute; left: 22px; bottom: 20px; color: #fff; font-family: var(--display);
  font-size: 1.05rem; letter-spacing: 0.01em; max-width: 70%;
}
.hero-visual .caption small { display: block; font-family: var(--body); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.85; margin-top: 4px; }

/* ---------- Grids of cards ---------- */
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--lavender); }
.card h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.97rem; }
.card .card-mark {
  width: 40px; height: 40px; border-radius: 11px; background: var(--fill);
  display: grid; place-items: center; margin-bottom: 1rem; color: var(--purple);
}
.card .card-mark svg { width: 22px; height: 22px; }
.card ul.tick { margin-top: 0.9rem; }
ul.tick li { position: relative; padding-left: 1.4rem; margin-top: 0.4rem; font-size: 0.94rem; color: var(--ink-soft); }
ul.tick li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px;
  border-left: 1.5px solid var(--purple); border-bottom: 1.5px solid var(--purple);
  transform: rotate(-45deg); opacity: 0.8;
}

/* Feature list (why choose) */
.feature { display: flex; gap: 0.9rem; align-items: flex-start; }
.feature .dot { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; color: var(--purple); }
.feature .dot svg { width: 18px; height: 18px; }
.feature h3 { font-size: var(--step-1); }
.feature p { font-size: 0.94rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* Split / bio */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.portrait {
  aspect-ratio: 4/5; border-radius: 22px; background: linear-gradient(155deg, var(--fill) 0%, var(--lavender) 100%);
  display: grid; place-items: center; text-align: center; color: var(--purple-deep); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.portrait .ph { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.7; padding: 1rem; }
.portrait svg { width: 40%; opacity: 0.9; }

/* Credential list */
.creds { display: grid; gap: 0.6rem; }
.creds li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 500; }
.creds li b { font-weight: 700; }
.creds li .mk { color: var(--purple); flex-shrink: 0; margin-top: 2px; }

/* ---------- CTA banner ---------- */
.cta-banner { text-align: center; }
.cta-banner .btns { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.05rem; max-width: 620px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--purple-deep); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.97rem; padding: 0.8rem 0.95rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(107,79,160,0.14);
}
.field textarea { resize: vertical; min-height: 120px; }
.honey { position: absolute; left: -9999px; }

/* ---------- Info / contact ---------- */
.info-list { display: grid; gap: 1rem; }
.info-list li { display: flex; gap: 0.9rem; align-items: flex-start; }
.info-list .mk { width: 40px; height: 40px; border-radius: 11px; background: var(--fill); display: grid; place-items: center; color: var(--purple); flex-shrink: 0; }
.info-list .mk svg { width: 20px; height: 20px; }
.info-list b { display: block; font-size: 0.98rem; }
.info-list span { color: var(--ink-soft); font-size: 0.94rem; }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map-embed iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; filter: grayscale(0.15) contrast(1.02); }

/* ---------- Article cards ---------- */
.article-card { display: flex; flex-direction: column; height: 100%; }
.article-card .tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--purple-mid); }
.article-card h3 { font-size: var(--step-1); margin: 0.5rem 0; }
.article-card p { flex: 1; }
.article-card .more { margin-top: 1rem; font-weight: 600; color: var(--purple); display: inline-flex; align-items: center; gap: 0.4rem; }
.soon { opacity: 0.62; pointer-events: none; }
.soon .tag::after { content: " · coming soon"; color: var(--ink-soft); }

/* Article body (reading) */
.prose { max-width: 68ch; }
.prose p, .prose ul { margin-top: 1.1rem; color: var(--ink); }
.prose h2 { font-size: var(--step-2); margin-top: 2.4rem; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8rem; }
.prose ul { padding-left: 0; }
.prose ul li { position: relative; padding-left: 1.4rem; margin-top: 0.5rem; }
.prose ul li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-left: 1.5px solid var(--purple); border-bottom: 1.5px solid var(--purple); transform: rotate(-45deg); }
.prose .note { background: var(--fill); border-left: 3px solid var(--purple); padding: 1rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-top: 1.6rem; font-size: 0.95rem; color: var(--ink-soft); }
.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1rem; }
.breadcrumb a { color: var(--purple); font-weight: 600; }

/* ---------- Disclaimer / compliance ---------- */
.disclaimer { font-size: 0.85rem; color: var(--ink-soft); background: var(--fill-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--purple-deep); color: #D9CFF0; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer .brand-name b { color: #fff; }
.site-footer .brand-name span { color: var(--lavender); }
.footer-about { max-width: 34ch; font-size: 0.94rem; margin-top: 1rem; color: #C9BEE8; }
.footer-col h4 { font-family: var(--body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--lavender); margin-bottom: 1rem; font-weight: 700; }
.footer-col a, .footer-col p { display: block; color: #D9CFF0; font-size: 0.94rem; padding: 0.28rem 0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.14); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.82rem; color: #B7A9DC; }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37,211,102,0.6);
  transition: transform 0.25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; margin-inline: auto; order: -1; }
  .split { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav-actions .lang-toggle { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-open .nav-links {
    display: flex; position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem 1.5rem;
    box-shadow: var(--shadow);
  }
  .nav-open .nav-links a { padding: 0.75rem 0.5rem; font-size: 1.05rem; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Photo slot (graceful fallback) ---------- */
.portrait { position: relative; }
.portrait-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; }

/* ---------- RTL / Arabic ---------- */
[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", "Manrope", sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: "IBM Plex Sans Arabic", "Fraunces", serif; font-weight: 600; letter-spacing: 0; }
[dir="rtl"] .brand-name b { font-family: "IBM Plex Sans Arabic", serif; }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
[dir="rtl"] .eyebrow::after { margin-left: 0; margin-right: -0.5rem; }
[dir="rtl"] .wa-float { right: auto; left: 20px; }
[dir="rtl"] .hero-visual .caption { left: auto; right: 22px; }
[dir="rtl"] ul.tick li, [dir="rtl"] .prose ul li { padding-left: 0; padding-right: 1.4rem; }
[dir="rtl"] ul.tick li::before, [dir="rtl"] .prose ul li::before { left: auto; right: 2px; }
[dir="rtl"] .breadcrumb { text-align: right; }
[dir="rtl"] .footer-bottom { text-align: right; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }

/* ---------- Alonea product frame ---------- */
.product-frame { aspect-ratio: 1/1; border-radius: 24px; background: linear-gradient(160deg, #F3EFFA 0%, #E4DBF3 100%); border: 1px solid var(--line); display: grid; place-items: center; padding: 2rem; box-shadow: var(--shadow); }
.product-frame img { width: 84%; height: auto; filter: drop-shadow(0 20px 30px rgba(78,58,122,0.22)); }
.brand-logo { height: 30px; width: auto; display: block; margin: 0.9rem 0 0.2rem; }
[dir="rtl"] .brand-logo { margin-left: auto; }
