
/**
 * Clarity University — prestige visual layer
 * Inspired by prior Journey Map plaques/tiles · day & night · full viewport
 * Educational only · not a physical university
 */

@import url("https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:wght@600;700&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap");

:root {
  --cu-gold: #c9a84c;
  --cu-gold-soft: rgba(201, 168, 76, 0.28);
  --cu-teal: #1e7d5e;
  --cu-teal-deep: #0f4d3a;
  --cu-ink: #13201a;
  --cu-cream: #f6f1e6;
  --cu-panel: #fffcf5;
  --cu-muted: #5c6b63;
  --cu-radius: 18px;
  --cu-max: min(72rem, 100%);
  --cu-read: min(44rem, 100%);
}

html[data-theme="dark"],
html:not([data-theme="light"]) {
  --cu-bg: #0b1410;
  --cu-panel: rgba(16, 28, 22, 0.92);
  --cu-ink: #e8efe9;
  --cu-muted: #a8b5ad;
  --cu-border: rgba(201, 168, 76, 0.32);
  --cu-tile: linear-gradient(145deg, rgba(22, 38, 30, 0.95), rgba(12, 22, 18, 0.98));
  --cu-plaque: linear-gradient(160deg, rgba(28, 44, 36, 0.95), rgba(14, 26, 20, 0.98));
}

html[data-theme="light"] {
  --cu-bg: #efe8da;
  --cu-panel: #fffcf5;
  --cu-ink: #13201a;
  --cu-muted: #5c6b63;
  --cu-border: rgba(160, 130, 60, 0.28);
  --cu-tile: linear-gradient(145deg, #fffef9, #f3ede0);
  --cu-plaque: linear-gradient(160deg, #e8e2d4, #d9d2c2);
}

body.cu-page {
  background: var(--cu-bg, #0b1410);
  color: var(--cu-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

main.cu-wrap {
  max-width: var(--cu-max) !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(0.75rem, env(safe-area-inset-left));
  padding-right: max(0.75rem, env(safe-area-inset-right));
  box-sizing: border-box;
}

/* —— Bismillah hero —— */
.cu-bismillah-hero {
  text-align: center;
  padding: 1.25rem 0.75rem 1rem;
  max-width: var(--cu-read);
  margin: 0.5rem auto 1rem;
}
.cu-bismillah {
  font-family: "Amiri", "Traditional Arabic", serif;
  font-size: clamp(1.55rem, 5.5vw, 2.35rem);
  line-height: 1.55;
  color: var(--cu-gold);
  font-weight: 700;
  direction: rtl;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  margin: 0;
}
html[data-theme="light"] .cu-bismillah {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 2px rgba(120, 90, 20, 0.2);
}
.cu-rabbi {
  font-family: "Amiri", serif;
  font-size: clamp(1.05rem, 3.2vw, 1.35rem);
  direction: rtl;
  color: var(--cu-ink);
  opacity: 0.92;
  margin: 0.55rem 0 0.25rem;
  font-weight: 400;
}
.cu-rabbi-en {
  font-size: 0.78rem;
  color: var(--cu-muted);
  margin: 0;
  letter-spacing: 0.02em;
}

/* —— Embossed section titles —— */
.cu-zone-label,
.cu-emboss {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cu-gold);
  margin: 1.35rem auto 0.5rem;
  max-width: var(--cu-max);
}
.cu-emboss-sub {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.75;
  margin-left: 0.35rem;
}

/* —— Plaques (how phases work style) —— */
.cu-plaque,
.cu-info-plaque {
  background: var(--cu-plaque);
  border: 1px solid var(--cu-border);
  border-radius: var(--cu-radius);
  padding: 0.95rem 1.1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: var(--cu-max);
  margin-left: auto;
  margin-right: auto;
}
html[data-theme="light"] .cu-plaque,
html[data-theme="light"] .cu-info-plaque {
  box-shadow: 0 6px 18px rgba(80, 60, 20, 0.08);
}

/* —— Tiles / rich cards —— */
.cu-rich-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)) !important;
  gap: 0.85rem !important;
  max-width: var(--cu-max);
  margin: 0.65rem auto 1.25rem;
}
.cu-rich-card,
.cu-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--cu-tile);
  border: 1px solid var(--cu-border);
  border-radius: var(--cu-radius);
  padding: 1rem 1.05rem;
  min-height: 6rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
html[data-theme="light"] .cu-rich-card,
html[data-theme="light"] .cu-tile {
  box-shadow: 0 8px 20px rgba(60, 50, 20, 0.1);
}
.cu-rich-card:hover,
.cu-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 125, 94, 0.45);
}
.cu-rich-card strong,
.cu-tile strong {
  display: block;
  font-size: 1.05rem;
  margin: 0.25rem 0 0.35rem;
  color: var(--cu-gold);
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
}
html[data-theme="light"] .cu-rich-card strong {
  color: #6b5a1e;
}
.cu-rich-card .desc,
.cu-tile .desc {
  font-size: 0.86rem;
  color: var(--cu-muted);
  line-height: 1.4;
}
.cu-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--cu-border);
  background: rgba(201, 168, 76, 0.12);
}
.cu-badge.open {
  background: rgba(30, 125, 94, 0.28);
  border-color: rgba(30, 125, 94, 0.45);
  color: inherit;
}

/* —— Soft continue / status bars —— */
.cu-student-status,
.cu-day-panel,
.cu-map-continue {
  border-radius: var(--cu-radius) !important;
  border: 1px solid var(--cu-border) !important;
  background: var(--cu-panel) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.1);
}

/* —— Phase icon row (portal optional) —— */
.cu-phase-icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto;
  max-width: var(--cu-max);
}
.cu-phase-icon {
  width: 4.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.9;
}
.cu-phase-icon span {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--cu-border);
  background: var(--cu-tile);
  font-size: 1.25rem;
}

/* —— Pills soft bar —— */
.cu-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  padding: 0.4rem 0.5rem;
  margin: 0.5rem auto 0.75rem;
  max-width: var(--cu-max);
  border-radius: 999px;
  background: var(--cu-panel);
  border: 1px solid var(--cu-border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.cu-pills a {
  text-decoration: none;
  color: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.cu-pills a.here,
.cu-pills a[aria-current="page"] {
  background: var(--cu-teal);
  color: #fff !important;
}

/* —— Admission panels prestige —— */
.adm-panel {
  background: var(--cu-panel) !important;
  border: 1px solid var(--cu-border) !important;
  border-radius: var(--cu-radius) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.adm-steps button.on {
  background: var(--cu-teal) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.cu-foot {
  text-align: center;
  font-size: 0.78rem;
  color: var(--cu-muted);
  padding: 1.5rem 1rem 2rem;
  max-width: var(--cu-max);
  margin: 0 auto;
}

@media (max-width: 520px) {
  .cu-rich-grid {
    grid-template-columns: 1fr !important;
  }
}



/* —— Bismillah calligraphy strength —— */
.cu-bismillah-hero {
  text-align: center;
  padding: 1.75rem 1rem 1.25rem;
  max-width: min(36rem, 100%);
  margin: 0.25rem auto 1.25rem;
  position: relative;
}
.cu-bismillah-hero::before,
.cu-bismillah-hero::after {
  content: "";
  display: block;
  height: 1px;
  max-width: 12rem;
  margin: 0.65rem auto;
  background: linear-gradient(90deg, transparent, var(--cu-gold, #c9a84c), transparent);
  opacity: 0.55;
}
.cu-bismillah {
  font-family: "Amiri", "Noto Naskh Arabic", "Traditional Arabic", serif !important;
  font-size: clamp(1.75rem, 6.5vw, 2.75rem) !important;
  line-height: 1.7 !important;
  color: var(--cu-gold, #d4b45a) !important;
  font-weight: 700 !important;
  direction: rtl !important;
  unicode-bidi: isolate;
  margin: 0.35rem 0 !important;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 24px rgba(201, 168, 76, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.25);
}
html[data-theme="light"] .cu-bismillah {
  text-shadow:
    0 1px 0 #fff,
    0 2px 4px rgba(100, 70, 10, 0.18);
}
.cu-rabbi {
  font-family: "Amiri", "Noto Naskh Arabic", serif !important;
  font-size: clamp(1.2rem, 3.8vw, 1.55rem) !important;
  direction: rtl !important;
  unicode-bidi: isolate;
  color: var(--cu-ink, #e8efe9) !important;
  margin: 0.45rem 0 0.2rem !important;
  font-weight: 400 !important;
  opacity: 0.95;
}
.cu-rabbi-en {
  font-size: 0.8rem !important;
  color: var(--cu-muted, #a8b5ad) !important;
  margin: 0.15rem 0 0 !important;
  font-style: italic;
}

/* Admission page uses wider stage */
.adm-stage {
  max-width: min(72rem, 100%);
  margin: 0 auto;
  padding: 0 0.5rem 2.5rem;
}
.adm-main-col {
  max-width: min(40rem, 100%);
  margin: 0 auto;
}
.adm-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
  max-width: min(72rem, 100%);
  margin: 1.25rem auto 0;
}



/* —— Interactive plaque & tile hover —— */
@media (hover: hover) and (pointer: fine) {
  .cu-plaque,
  .cu-info-plaque,
  .adm-panel.cu-plaque {
    transition:
      transform 0.22s ease,
      box-shadow 0.22s ease,
      border-color 0.22s ease,
      background 0.22s ease;
  }
  .cu-plaque:hover,
  .cu-info-plaque:hover,
  .adm-panel.cu-plaque:hover {
    transform: translateY(-3px);
    border-color: rgba(30, 125, 94, 0.55);
    box-shadow:
      0 14px 36px rgba(0, 0, 0, 0.22),
      0 0 0 1px rgba(201, 168, 76, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  html[data-theme="light"] .cu-plaque:hover,
  html[data-theme="light"] .cu-info-plaque:hover,
  html[data-theme="light"] .adm-panel.cu-plaque:hover {
    box-shadow:
      0 14px 32px rgba(60, 50, 20, 0.14),
      0 0 0 1px rgba(30, 125, 94, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .cu-rich-card,
  .cu-tile {
    transition:
      transform 0.2s ease,
      box-shadow 0.2s ease,
      border-color 0.2s ease,
      background 0.2s ease;
  }
  .cu-rich-card:hover,
  .cu-tile:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(30, 125, 94, 0.6);
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.28),
      0 0 24px rgba(30, 125, 94, 0.12),
      inset 0 1px 0 rgba(232, 213, 163, 0.12);
  }
  html[data-theme="light"] .cu-rich-card:hover,
  html[data-theme="light"] .cu-tile:hover {
    box-shadow:
      0 16px 36px rgba(40, 50, 40, 0.14),
      0 0 20px rgba(30, 125, 94, 0.1),
      inset 0 1px 0 #fff;
  }
  .cu-rich-card:hover strong,
  .cu-tile:hover strong {
    color: #f0e0a8;
  }
  html[data-theme="light"] .cu-rich-card:hover strong,
  html[data-theme="light"] .cu-tile:hover strong {
    color: #1e7d5e;
  }
  .cu-rich-card:hover .cu-badge.open,
  .cu-tile:hover .cu-badge.open {
    background: rgba(30, 125, 94, 0.45);
  }

  .cu-phase-icon {
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .cu-phase-icon:hover {
    transform: translateY(-3px);
    opacity: 1;
  }
  .cu-phase-icon:hover span {
    border-color: rgba(30, 125, 94, 0.55);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background: rgba(30, 125, 94, 0.15);
  }

  .cu-student-status:hover,
  .cu-day-panel:hover {
    border-color: rgba(201, 168, 76, 0.5);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  }

  .cu-pills a:hover {
    background: rgba(30, 125, 94, 0.2);
  }
  .cu-pills a.here:hover,
  .cu-pills a[aria-current="page"]:hover {
    background: #186b50;
  }
}

/* Focus-visible for keyboard (same lift language) */
.cu-rich-card:focus-visible,
.cu-tile:focus-visible,
.cu-phase-icon:focus-visible {
  outline: 2px solid rgba(30, 125, 94, 0.7);
  outline-offset: 3px;
  transform: translateY(-2px);
}

/* Active press */
.cu-rich-card:active,
.cu-tile:active {
  transform: translateY(-1px) scale(0.99);
}



/* —— Dual embossed Bismillah / duʿā plaques + insignia —— */
.cu-open-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  max-width: min(44rem, 100%);
  margin: 0.75rem auto 1.15rem;
  padding: 0 0.5rem;
}
.cu-insignia {
  flex: 0 0 auto;
  width: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cu-insignia-mark {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.55);
  display: grid;
  place-items: center;
  font-family: "Amiri", serif;
  font-size: 1.85rem;
  color: var(--cu-gold, #d4b45a);
  background: radial-gradient(circle at 35% 30%, rgba(232, 213, 163, 0.2), transparent 55%),
    var(--cu-tile, rgba(16, 28, 22, 0.95));
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.cu-open-plaques {
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.cu-verse-plaque {
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--cu-border, rgba(201, 168, 76, 0.32));
  background: var(--cu-plaque, linear-gradient(160deg, rgba(28, 44, 36, 0.95), rgba(14, 26, 20, 0.98)));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}
html[data-theme="light"] .cu-verse-plaque {
  background: linear-gradient(160deg, #f7f1e4, #ebe3d2);
}
.cu-verse-plaque .ar {
  font-family: "Amiri", "Noto Naskh Arabic", serif;
  direction: rtl;
  unicode-bidi: isolate;
  font-size: clamp(1.15rem, 3.5vw, 1.55rem);
  line-height: 1.65;
  color: var(--cu-gold, #d4b45a);
  margin: 0;
  font-weight: 700;
}
.cu-verse-plaque .en {
  font-size: 0.8rem;
  color: var(--cu-muted, #a8b5ad);
  margin: 0.35rem 0 0;
  line-height: 1.4;
}
.cu-verse-plaque.bismillah .ar {
  font-size: clamp(1.35rem, 4.5vw, 1.95rem);
}
.cu-verse-plaque.dua .ar {
  font-size: clamp(1.1rem, 3.2vw, 1.4rem);
  color: var(--cu-ink, #e8efe9);
  font-weight: 400;
}
html[data-theme="light"] .cu-verse-plaque.dua .ar {
  color: #13201a;
}

/* Desk module top verse (replaces Continue · Seeker) */
.cu-desk-verse {
  max-width: min(48rem, 100%);
  margin: 0.65rem auto 1rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--cu-border, rgba(201, 168, 76, 0.35));
  background: var(--cu-plaque);
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.cu-desk-verse .ar {
  font-family: "Amiri", serif;
  direction: rtl;
  unicode-bidi: isolate;
  font-size: clamp(1.2rem, 3.8vw, 1.65rem);
  line-height: 1.7;
  color: var(--cu-gold, #d4b45a);
  margin: 0;
  font-weight: 700;
}
.cu-desk-verse .en {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--cu-muted);
  line-height: 1.45;
}
.cu-desk-verse .ref {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

/* Bottom desk navigation — leave module */
.cu-desk-bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
  margin: 1.5rem auto 0;
  max-width: min(72rem, 100%);
  background: var(--cu-panel, rgba(12, 22, 18, 0.94));
  border-top: 1px solid var(--cu-border, rgba(201, 168, 76, 0.3));
  backdrop-filter: blur(8px);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
}
.cu-desk-bottom-nav a {
  min-height: 42px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  border: 1px solid rgba(201, 168, 76, 0.35);
  display: inline-flex;
  align-items: center;
  background: transparent;
}
.cu-desk-bottom-nav a.primary {
  background: #1e7d5e;
  color: #fff !important;
  border-color: transparent;
}

/* Hide redundant continue-to-self bars on desk pages */
body[data-phase-room] .cu-continue,
body[data-phase-room] #cu-continue,
body[data-campus-page="desk"] .cu-map-continue {
  display: none !important;
}
