:root {
  /* Base */
  --bg: #fbfbff;
  --panel: #ffffff;
  --text: #111827;
  --muted: rgba(17, 24, 39, 0.70);
  --faint: rgba(17, 24, 39, 0.55);

  /* Brand */
  --red: #e41f26;
  --blue: #1e56a8;
  --yellow: #ffd23c;
  --green: #2eb872;

  /* UI */
  --ring: rgba(30, 86, 168, 0.22);
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.10);
  --shadow2: 0 10px 22px rgba(17, 24, 39, 0.08);

  /* Layout */
  --radius: 18px;
  --radius2: 22px;
  --max: 1120px;
}

/* ---------------- Base ---------------- */

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  padding-top: 84px; /* fixed header offset */
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 15% 12%, rgba(255, 210, 60, 0.22), transparent 55%),
    radial-gradient(900px 600px at 85% 20%, rgba(30, 86, 168, 0.16), transparent 60%),
    radial-gradient(900px 600px at 75% 85%, rgba(46, 184, 114, 0.14), transparent 60%),
    radial-gradient(900px 600px at 10% 85%, rgba(228, 31, 38, 0.12), transparent 65%),
    var(--bg);
}

a { color: inherit; }
a:hover { text-decoration: none; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.muted { color: var(--muted); }
.tiny { font-size: 12px; }

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 2000;
}

/* ---------------- Header ---------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brandlock {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.asterlyx-mark { width: 44px; height: 44px; display: block; }

.brandtext {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brandname {
  font-weight: 900;
  letter-spacing: 0.06em;
  font-size: 14px;
}

.brandsub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.topnav a {
  font-size: 13px;
  color: rgba(17, 24, 39, 0.80);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
}
.topnav a:hover { background: rgba(17, 24, 39, 0.04); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.80);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.06);
  text-decoration: none;
  font-weight: 700;
}

.btn.small {
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 12px;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(30, 86, 168, 0.92), rgba(46, 184, 114, 0.88));
  color: #fff;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ---------------- Sections ---------------- */

section { padding: 54px 0; }

.hero { padding: 70px 0 54px; }

.hero h2 {
  font-size: clamp(34px, 4.2vw, 52px);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.hero p {
  margin: 0;
  max-width: 70ch;
  color: var(--muted);
}

/* ---------------- Panels ---------------- */

.panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: var(--radius2);
  box-shadow: var(--shadow2);
  padding: 18px;
}

.panel.soft { background: rgba(255, 255, 255, 0.78); }

.systems h2, .lanes h2, .founders h2, .contact h2 {
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}

/* ---------------- Systems ---------------- */

.system-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.system {
  border-radius: var(--radius2);
  border: 1px solid rgba(17, 24, 39, 0.10);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow2);
}

.system-head {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  font-weight: 900;
}

.system-body {
  display: none;
  padding: 0 16px 16px;
  color: var(--muted);
}

.system[data-open="true"] .system-body { display: block; }

.status {
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.75);
}

.status.live {
  border-color: rgba(46, 184, 114, 0.35);
  background: rgba(46, 184, 114, 0.14);
}
.status.beta {
  border-color: rgba(255, 210, 60, 0.45);
  background: rgba(255, 210, 60, 0.18);
}
.status.internal {
  border-color: rgba(30, 86, 168, 0.35);
  background: rgba(30, 86, 168, 0.14);
}

/* ---------------- Lanes ---------------- */

.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 920px) {
  .lane-grid { grid-template-columns: 1fr; }
}

.lane {
  border-radius: var(--radius2);
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow2);
  overflow: hidden;
}

.lane-head {
  width: 100%;
  border: 0;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 210, 60, 0.22), rgba(30, 86, 168, 0.12));
  font-weight: 900;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lane-head::after {
  content: "+";
  font-weight: 700;
  opacity: 0.9;
}
.lane[data-open="true"] .lane-head::after { content: "−"; }

.lane-body {
  display: none;
  padding: 0 16px 16px;
  color: var(--muted);
}

.lane[data-open="true"] .lane-body { display: block; }

/* Supporting layout helpers */
.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .two-up { grid-template-columns: 1fr; }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.75);
}

.ticks { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.ticks li { margin: 8px 0; }

/* ---------------- Founders portrait flip cards ---------------- */

.portrait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

@media (max-width: 920px) {
  .portrait-grid { grid-template-columns: 1fr; }
}

.portrait-card {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.portrait-inner {
  position: relative;
  width: 100%;
  height: 420px;
  transform-style: preserve-3d;
  transition: transform 700ms cubic-bezier(.2, .8, .2, 1);
}

.portrait-card[aria-expanded="true"] .portrait-inner {
  transform: rotateY(180deg);
}

.portrait-face {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.10);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
}

.portrait-face.front {
  background:
    radial-gradient(1200px 500px at 30% 20%, rgba(255, 210, 60, 0.26), transparent 55%),
    radial-gradient(900px 500px at 75% 70%, rgba(30, 86, 168, 0.18), transparent 60%),
    rgba(255, 255, 255, 0.92);
  background-size: cover;
  background-position: center;
}

.portrait-face.back {
  transform: rotateY(180deg);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
}

.portrait-face.back p { margin: 0 0 12px; color: var(--muted); }
.portrait-face.back ul { margin: 0; padding-left: 18px; color: var(--muted); }

.overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px;
  background: linear-gradient(180deg, transparent, rgba(17, 24, 39, 0.72));
  color: #fff;
}

.overlay h3 { margin: 0 0 6px; font-size: 18px; }

.overlay .title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.95);
}

.overlay .title.bright {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* Founder hint (no guessing) */
#founders .role {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#founders .role::after {
  content: "Click to open";
  font-size: 12px;
  opacity: 0.85;
  font-weight: 600;
}

/* Ayman silhouette block */
.portrait-image.silhouette {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 600px at 30% 20%, rgba(228, 31, 38, 0.18), transparent 60%),
    radial-gradient(900px 600px at 75% 75%, rgba(46, 184, 114, 0.14), transparent 60%),
    rgba(17, 24, 39, 0.78);
}
.portrait-image.silhouette svg { width: 120px; height: 120px; opacity: 0.95; }

/* ---------------- Contact ---------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 920px) {
  .contact-grid { grid-template-columns: 1fr; }
}

label { display: block; font-weight: 800; margin: 10px 0 6px; }

input, select, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(30, 86, 168, 0.35);
  box-shadow: 0 0 0 6px var(--ring);
}

textarea { min-height: 120px; resize: vertical; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}

.consent input { width: 18px; height: 18px; margin-top: 3px; }

.flash {
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.flash.success {
  border-color: rgba(46, 184, 114, 0.35);
  background: rgba(46, 184, 114, 0.14);
}

.flash.error {
  border-color: rgba(228, 31, 38, 0.35);
  background: rgba(228, 31, 38, 0.12);
}

/* ---------------- Footer ---------------- */

.site-footer {
  padding: 26px 0;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.70);
}

.site-footer .foot {
  display: flex;
  justify-content: center;
  align-items: center;
}

.site-footer .foot-left {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-footer .tiny {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.70);
}

.site-footer a {
  color: rgba(17, 24, 39, 0.70);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---------------- Subtle entrance animation (respects reduce-motion) ---------------- */

/* Default: elements start slightly faded + shifted */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 520ms ease, transform 520ms ease;
  will-change: opacity, transform;
}

/* When revealed */
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* Slight stagger helper (optional) */
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

/* Respect OS preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Respect your a11y toggle too */
#site-wrap.a11y-reduce-motion .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ----------------------------------
   OPEN STATE — JS DISABLED
---------------------------------- */

/* Systems */
.system-body {
  display: block !important;
}

/* Build / Govern / Enable */
.lane-body {
  display: block !important;
}

/* Remove expand affordance since nothing collapses */
.lane-head::after {
  content: "";
}



/* Animated body using grid trick (smooth, no height calc) */
.system-body{
  display:grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 420ms cubic-bezier(.2,.8,.2,1);
  padding: 0 16px;               /* keep side padding constant */
}

.system-body > .system-body-inner{
  overflow:hidden;
  padding: 0 0 16px;             /* bottom padding when open */
}

/* Open */
.system[data-open="true"] .system-body{
  grid-template-rows: 1fr;
}

/* Reduce motion */
 (prefers-reduced-motion: reduce){
  .system-body{ transition:none; }
}
#site-wrap.a11y-reduce-motion .system-body{ transition:none; }



/* --- SYSTEMS ACCORDION OVERRIDE (force closed by default) --- */
/* Robust hide/show even if earlier CSS conflicts */
.system-body{
  max-height: 0;
  overflow: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: max-height 420ms cubic-bezier(.2,.8,.2,1);
}
.system[data-open="true"] .system-body{
  max-height: 1200px; /* enough for your content */
  padding-bottom: 16px !important;
}

/* Reduce motion */
 (prefers-reduced-motion: reduce){
  .system-body{ transition: none !important; }
}
#site-wrap.a11y-reduce-motion .system-body{ transition: none !important; }
/* ---------- Modal (Privacy Policy) ---------- */
.modal[hidden]{ display:none !important; }

.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(17,24,39,0.55);
  backdrop-filter: blur(2px);
}

.modal-panel{
  position: relative;
  width: min(860px, calc(100% - 32px));
  max-height: calc(100vh - 64px);
  margin: 32px auto;
  overflow: auto;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(17,24,39,0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);
  outline: none;
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 16px 16px 10px;
  border-bottom: 1px solid rgba(17,24,39,0.08);
}

.modal-body{
  padding: 16px;
}

.modal-close{
  border: 1px solid rgba(17,24,39,0.12);
  background: rgba(255,255,255,0.85);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 900;
}

.modal-foot{
  padding-top: 12px;
}

/* Subtle entrance animation (respects reduce-motion) */
@media (prefers-reduced-motion: no-preference){
  .modal-panel{
    animation: modalIn 180ms ease-out;
  }
  @keyframes modalIn{
    from { transform: translateY(6px); opacity: 0.92; }
    to   { transform: translateY(0);   opacity: 1; }
  }
}

/* ---------------- LANGUAGE TOGGLE ---------------- */
.lang-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  background: rgba(255, 255, 255, 0.70);
}

.lang-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 16px; /* emoji size */
  line-height: 1;
  border: 1px solid transparent;
}

.lang-btn:hover{
  background: rgba(17, 24, 39, 0.04);
  border-color: rgba(17, 24, 39, 0.10);
}

.lang-btn.is-active,
.lang-btn[aria-current="page"]{
  background: rgba(17, 24, 39, 0.06);
  border-color: rgba(17, 24, 39, 0.12);
}
