/* MRS Tech Labs component system — nav, hero, footer, product showcase, about/contact.
   Navy + orange, matching the MRS Tech Labs mark. Loaded alongside custom.css. */

:root {
  --bg: #fafaf9;
  --bg-2: #f5f5f4;
  --bg-3: #e7e5e4;
  --cream: #ffffff;
  --paper: #ffffff;
  --ink: #1c1917;
  --ink-2: #44403c;
  --ink-3: #78716c;
  --ink-4: #a8a29e;
  --line: #e7e5e4;
  --line-2: #d6d3d1;
  --emerald: #1b2942;
  --emerald-2: #141d30;
  --emerald-3: #0a0f1a;
  --emerald-soft: #b9c4d6;
  --emerald-tint: #eef1f5;
  --gold: #e58346;
  --gold-2: #c05723;
  --gold-soft: #f5bd97;
  --rose: #e11d48;
  --dusk: #7c6bb0;
}

.rl { color: var(--ink); }
.rl .serif { font-family: 'Fraunces', serif; font-optical-sizing: auto; }
.rl .arabic { font-family: 'Amiri', serif; direction: rtl; }
.rl .mono { font-family: 'JetBrains Mono', monospace; }
.rl a { color: inherit; text-decoration: none; }
.rl img, .rl svg { display: block; max-width: 100%; }

/* Ruhly icon */
.ruhly-icon {
  border-radius: 22%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #13796b 0%, #0d5d52 70%, #082e29 100%);
  box-shadow: 0 8px 24px -10px rgba(28,25,23,0.45), inset 0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
  flex-shrink: 0;
}
.ruhly-icon svg { width: 100%; height: 100%; display: block; }

/* MRS Tech Labs mark (site brand — navbar, footer, signatures) */
.mrs-icon {
  border-radius: 22%;
  overflow: hidden;
  box-shadow: 0 8px 24px -10px rgba(20,29,48,0.45), inset 0 0 0 1px rgba(255,255,255,0.04);
  position: relative;
  flex-shrink: 0;
}
.mrs-icon svg { width: 100%; height: 100%; display: block; }

/* Nav */
.rl-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,249,0.86);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid rgba(231,229,228,0.6);
}
.rl-nav-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 16px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.rl-brand { display: flex; align-items: center; gap: 12px; }
.rl-brand-name {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: 22px; color: var(--ink);
  letter-spacing: -0.01em;
}
.rl-brand-name span { color: var(--ink-4); font-weight: 300; }
.rl-nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; color: var(--ink-2); }
.rl-nav-links a:hover { color: var(--emerald); }
.rl-nav-cta {
  padding: 9px 18px;
  background: var(--emerald);
  color: var(--cream) !important;
  border-radius: 99px;
  font-size: 13px; font-weight: 500;
  transition: background .15s;
  white-space: nowrap;
}
.rl-nav-cta:hover { background: var(--emerald-2); color: var(--cream) !important; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 700px at 80% 10%, rgba(218,106,50,0.22), transparent 60%),
    radial-gradient(ellipse 700px 500px at 5% 40%, rgba(27,41,66,0.08), transparent 60%),
    linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
  padding: 88px 32px 100px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at center, rgba(27,41,66,0.07) 1px, transparent 1.5px);
  background-size: 32px 32px;
  background-position: 16px 16px;
  opacity: 0.5;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black, transparent 80%);
}
.hero-star { position: absolute; pointer-events: none; opacity: 0.5; }
.hero-inner {
  max-width: 1240px; margin: 0 auto;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 80px; align-items: center;
}
.launch-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 8px; border-radius: 99px;
  background: rgba(27,41,66,0.06); border: 1px solid rgba(27,41,66,0.18);
  font-size: 12px; color: var(--emerald-2); letter-spacing: 0.04em; font-weight: 500;
  margin-bottom: 28px;
}
.launch-pill .badge {
  background: var(--emerald); color: var(--cream); border-radius: 99px;
  padding: 2px 9px; font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
}
.launch-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); animation: rl-pulse 2.4s ease-in-out infinite; }
@keyframes rl-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

.hero h1 {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: 68px; line-height: 1.02; letter-spacing: -0.03em;
  margin: 0 0 26px; color: var(--ink); text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--emerald); }
.hero .ayah {
  display: block; font-family: 'Amiri', serif; font-size: 28px; color: var(--emerald-2);
  margin-top: 20px; direction: rtl; font-weight: 400; line-height: 1.4;
}
.hero .ayah-cite {
  display: block; font-family: 'Inter', sans-serif; font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.12em; text-transform: uppercase; margin-top: 6px; font-weight: 500;
}
.hero .lede { font-size: 18px; line-height: 1.65; color: var(--ink-2); max-width: 480px; margin: 26px 0 36px; }

/* Signup form */
.signup {
  display: flex; gap: 8px; max-width: 480px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 99px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color .2s, box-shadow .2s;
}
.signup:focus-within { border-color: var(--emerald); box-shadow: 0 12px 32px -12px rgba(27,41,66,0.25), 0 0 0 4px rgba(27,41,66,0.08); }
.signup input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; color: var(--ink); padding: 12px 0; min-width: 0; }
.signup input::placeholder { color: var(--ink-4); }
.wl-msg { font-size: 13px; margin-top: 10px; line-height: 1.5; }
.wl-error { color: var(--rose); }
.wl-success { color: var(--emerald); font-weight: 500; }
.final-cta .wl-error { color: #f9a8a8; }
.final-cta .wl-success { color: rgba(255,255,255,0.9); font-weight: 500; }
.signup button {
  border: none; cursor: pointer; background: var(--emerald); color: var(--cream);
  padding: 13px 20px; border-radius: 99px; font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em; transition: background .15s, transform .1s;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.signup button:hover { background: var(--emerald-2); }
.signup button:active { transform: scale(0.98); }
.signup button:disabled { opacity: 0.7; cursor: default; }

/* Generic section */
.rl section { padding: 100px 32px; position: relative; }
.rl-section-inner { max-width: 1180px; margin: 0 auto; }
.rl .eyebrow {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.rl .eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold-2); opacity: 0.6; }
.rl-section-center { text-align: center; }
.rl-section-center .eyebrow { justify-content: center; }
.rl-section-center .eyebrow::after { content: ''; width: 24px; height: 1px; background: var(--gold-2); opacity: 0.6; }
.rl h2.serif {
  font-family: 'Fraunces', serif; font-weight: 300; font-size: 46px; line-height: 1.08;
  letter-spacing: -0.025em; margin: 0 0 20px; color: var(--ink); max-width: 720px; text-wrap: balance;
}
.rl h2.serif em { font-style: italic; font-weight: 400; color: var(--emerald); }
.rl p.sub { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 600px; margin: 0 0 56px; }
.rl-section-center h2.serif, .rl-section-center p.sub { margin-inline: auto; }

/* Philosophy */
.philosophy { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 76px 32px; }

/* Founder note */
.founder-section { background: var(--bg); }
.founder-card {
  display: grid; grid-template-columns: 168px 1fr; gap: 40px; align-items: start;
  max-width: 840px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line);
  border-radius: 26px; padding: 44px 48px; box-shadow: 0 24px 60px -30px rgba(28,25,23,0.15);
}
.founder-avatar {
  width: 168px; height: 168px; border-radius: 24px;
  background: linear-gradient(160deg, var(--emerald) 0%, var(--emerald-2) 100%); color: var(--cream);
  display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif;
  font-size: 76px; font-weight: 300; box-shadow: 0 14px 30px -10px rgba(27,41,66,0.4); position: relative; overflow: hidden;
}
.founder-avatar::before { content: ''; position: absolute; width: 220px; height: 220px; right: -80px; bottom: -80px; background: radial-gradient(circle, rgba(218,106,50,0.25), transparent 60%); }
.founder-quote-mark { font-family: 'Fraunces', serif; font-size: 72px; line-height: 0.8; color: var(--gold); opacity: 0.4; }
.founder-card .body { font-family: 'Fraunces', serif; font-size: 19px; line-height: 1.55; color: var(--ink); margin: 8px 0 22px; font-weight: 400; text-wrap: balance; }
.founder-card .body em { font-style: italic; color: var(--emerald); }
.founder-sig { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.founder-sig .name { font-family: 'Fraunces', serif; font-size: 15px; color: var(--ink); }
.founder-sig .role { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* Final CTA */
.final-cta { background: linear-gradient(160deg, var(--emerald-2) 0%, var(--emerald-3) 100%); color: var(--cream); padding: 88px 32px; text-align: center; position: relative; overflow: hidden; }
.final-cta::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 50% 0%, rgba(218,106,50,0.18), transparent 50%), radial-gradient(circle at 50% 100%, rgba(27,41,66,0.4), transparent 50%); pointer-events: none; }
.final-cta-deco { position: absolute; right: -150px; top: -150px; width: 500px; height: 500px; border: 1px solid rgba(218,106,50,0.1); border-radius: 50%; pointer-events: none; }
.final-cta-deco.alt { right: auto; top: auto; left: -100px; bottom: -100px; width: 360px; height: 360px; border-color: rgba(218,106,50,0.08); }
.final-cta-icon { width: 76px; height: 76px; margin: 0 auto 26px; background: rgba(255,255,255,0.04); border: 1px solid rgba(218,106,50,0.18); border-radius: 22px; overflow: hidden; position: relative; z-index: 1; }
.final-cta-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.final-cta .ayah { font-family: 'Amiri', serif; direction: rtl; font-size: 26px; color: var(--gold); margin-bottom: 8px; line-height: 1.5; }
.final-cta .ayah-cite { font-size: 11px; color: rgba(218,106,50,0.6); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 28px; }
.final-cta h2 { font-family: 'Fraunces', serif; font-weight: 300; font-size: 52px; line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 20px; color: var(--cream); text-wrap: balance; }
.final-cta h2 em { font-style: italic; font-weight: 400; color: var(--gold); }
.final-cta p { font-size: 17px; opacity: 0.78; margin: 0 auto 40px; max-width: 480px; }
.final-cta .signup { margin: 0 auto; background: rgba(255,255,255,0.06); border: 1px solid rgba(218,106,50,0.3); backdrop-filter: blur(10px); }
.final-cta .signup input { color: var(--cream); }
.final-cta .signup input::placeholder { color: rgba(255,255,255,0.5); }
.final-cta .signup button { background: var(--gold); color: var(--emerald-3); }
.final-cta .signup button:hover { background: #ee9a63; }
.final-cta .signup:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(218,106,50,0.15); }
.final-cta .micro { margin-top: 18px; font-size: 12px; opacity: 0.5; letter-spacing: 0.04em; }

/* Footer */
.rl-footer { background: var(--emerald-3); color: rgba(255,255,255,0.65); padding: 60px 32px 28px; font-size: 13px; }
.rl-footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.rl-footer h4 { font-family: 'Fraunces', serif; font-weight: 400; color: var(--cream); font-size: 15px; margin: 0 0 16px; letter-spacing: 0.01em; }
.rl-footer ul { list-style: none; padding: 0; margin: 0; }
.rl-footer ul li { margin-bottom: 10px; }
.rl-footer ul a { transition: color .15s; }
.rl-footer ul a:hover { color: var(--gold); }
.rl-footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rl-footer-brand .rl-brand-name { color: var(--cream); }
.rl-footer-tag { line-height: 1.65; max-width: 280px; color: rgba(255,255,255,0.55); margin: 0 0 20px; }
.rl-footer-bottom { max-width: 1180px; margin: 22px auto 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: rgba(255,255,255,0.35); }
.rl-footer-bottom .arabic { color: var(--gold); opacity: 0.7; font-size: 14px; }

/* Simple page header (About, Contact) */
.page-hero {
  background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 100%);
  border-bottom: 1px solid var(--line);
  padding: 76px 32px 64px;
}
.page-hero-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.page-hero h1 {
  font-family: 'Fraunces', serif; font-weight: 300; font-size: 52px; line-height: 1.08;
  letter-spacing: -0.025em; margin: 18px 0 18px; color: var(--ink); text-wrap: balance;
}
.page-hero h1 em { font-style: italic; font-weight: 400; color: var(--emerald); }
.page-hero p.lede { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 620px; margin: 0 auto; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.value-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px 26px; }
.value-card .icon { width: 42px; height: 42px; border-radius: 12px; background: var(--emerald-tint); color: var(--emerald); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.value-card h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 18px; margin: 0 0 8px; }
.value-card p { margin: 0; color: var(--ink-3); font-size: 13.5px; line-height: 1.6; }

.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 36px; }
.contact-field { margin-bottom: 20px; }
.contact-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.contact-field input, .contact-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg); font-family: inherit; font-size: 14.5px; color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.contact-field input:focus, .contact-field textarea:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(27,41,66,0.1); }
.contact-submit {
  display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  background: var(--emerald); color: var(--cream); padding: 13px 26px; border-radius: 99px;
  font-size: 14.5px; font-weight: 500; transition: background .15s, transform .1s;
}
.contact-submit:hover { background: var(--emerald-2); }
.contact-side h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 0 0 10px; }
.contact-side .val { color: var(--emerald); font-weight: 600; font-size: 15px; }
.field-error { color: var(--rose); font-size: 12.5px; margin-top: 6px; }

/* Responsive */
@media (max-width: 960px) {
  .rl-nav-links { display: none; }
  .hero { padding: 48px 24px 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { font-size: 46px; }
  .hero .ayah { font-size: 22px; }
  .rl section { padding: 68px 24px; }
  .philosophy { padding: 68px 24px; }
  .rl h2.serif { font-size: 32px; }
  .rl p.sub { font-size: 15px; }
  .founder-card { grid-template-columns: 1fr; gap: 22px; padding: 28px; }
  .founder-avatar { width: 110px; height: 110px; font-size: 48px; }
  .rl-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .final-cta { padding: 72px 24px; }
  .final-cta h2 { font-size: 34px; }
  .final-cta .ayah { font-size: 22px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 38px; }
  .rl-footer-inner { grid-template-columns: 1fr; }
  .founder-card { text-align: center; }
  .founder-sig { justify-content: center; }
}
@media (max-width: 760px) {
  .page-hero h1 { font-size: 36px; }
  .value-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .contact-card { padding: 24px !important; }
  .contact-side .val { word-break: break-word; }
}

/* ============================================
   RESPONSIVE — additional hardening
   ============================================ */

/* Never let media or embeds force horizontal scroll */
img, svg, video, iframe, canvas { max-width: 100%; }
.rl table { display: block; max-width: 100%; overflow-x: auto; }

/* Ruhly product showcase card (home) */
@media (max-width: 860px) {
  .ruhly-showcase {
    grid-template-columns: 1fr !important;
    padding: 32px 24px !important;
    gap: 22px !important;
    text-align: center;
  }
  .ruhly-showcase > span.ruhly-icon { margin: 0 auto; }
  .ruhly-showcase p { margin-left: auto !important; margin-right: auto !important; }
  .ruhly-showcase .ruhly-showcase-actions {
    min-width: 0 !important;
    align-items: stretch !important;
  }
  .ruhly-showcase-actions a { justify-content: center; }
  .ruhly-waitlist-bar {
    flex-direction: column;
    align-items: stretch !important;
    text-align: left;
    padding: 20px !important;
  }
  .ruhly-waitlist-bar .signup { max-width: none !important; width: 100%; }
}

/* Signup pill: stack on very small screens so the button never clips */
@media (max-width: 420px) {
  .signup {
    flex-direction: column;
    border-radius: 20px;
    padding: 14px !important;
    gap: 10px;
  }
  .signup input { padding: 10px 8px; text-align: center; }
  .signup button { width: 100%; justify-content: center; padding: 12px 20px; }
}

/* Nav: tighten gutters on phones */
@media (max-width: 640px) {
  .rl-nav-inner { padding: 12px 18px; gap: 12px; }
  .rl-brand-name { font-size: 19px; }
  #mobile-menu { padding: 8px 18px 18px !important; }
  .rl-footer { padding: 44px 20px 24px; }
  .rl-footer-bottom { justify-content: center; text-align: center; }
}

/* Hero: keep the tagline readable at the smallest widths */
@media (max-width: 380px) {
  .hero h1 { font-size: 32px; }
  .founder-avatar { width: 92px; height: 92px; font-size: 40px; }
}
