/* Bidadari — site styles.
   Shares its visual system with Bidadari Seal (seal.bidadari.app), which is the
   reference GUI for all Bidadari apps: violet accent, soft glow, 16px cards,
   system fonts, light and dark themes. Change the brand via the variables below. */

:root {
  --accent: #6d4fd8;
  --accent-hover: #5a3dc2;
  --accent-contrast: #ffffff;
  --accent-grad: linear-gradient(135deg, #7c5ce6, #6240d0);
  --accent-soft: #f0ecff;
  --bg: #faf9ff;
  --surface: #ffffff;
  --text: #1d1830;
  --muted: #5f5a75;
  --border: #e3defa;
  --focus: #3b2fb8;
  --glow: radial-gradient(60rem 30rem at 50% -10%, rgb(167 139 250 / 18%), transparent 70%);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(29 24 48 / 6%), 0 12px 32px rgb(109 79 216 / 10%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --width: 780px;     /* same as Bidadari Seal, so header and footer line up across sites */
  --measure: 40rem;
  color-scheme: light;
}

/* Dark theme: theme.js sets data-theme on <html> (Light is the default, as in Bidadari List). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #b79cff;
  --accent-hover: #cbb8ff;
  --accent-contrast: #14102a;
  --accent-grad: linear-gradient(135deg, #c4b5fd, #a78bfa);
  --accent-soft: #231c3d;
  --bg: #09070f;
  --surface: #14111f;
  --text: #f1eefc;
  --muted: #aaa4c4;
  --border: #2b2542;
  --focus: #c4b5fd;
  --glow: radial-gradient(60rem 30rem at 50% -10%, rgb(167 139 250 / 22%), transparent 70%);
  --shadow: 0 1px 2px rgb(0 0 0 / 50%), 0 12px 32px rgb(0 0 0 / 45%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--glow) no-repeat top center, var(--bg);
  background-color: var(--bg);
  color: var(--text);
  font: 1rem/1.6 var(--font);
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

.container {
  width: 100%;
  max-width: var(--width);
  margin-inline: auto;
  padding-inline: 16px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  display: block;
}

/* The wordmark is a mask so it follows the text colour in light and dark. */
.wordmark {
  display: block;
  flex: none;
  width: 129px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("../images/wordmark.svg") center / contain no-repeat;
  mask: url("../images/wordmark.svg") center / contain no-repeat;
}

.site-nav ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-footer a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent-grad);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* Hero */

.hero {
  padding-block: 40px 56px;
  text-align: center;
}

.hero-mark {
  display: block;
  margin: 0 auto 16px;
}

.hero h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.5rem);
  line-height: 1.1;
}

.hero .lead {
  max-width: 56ch;
  margin: 16px auto 28px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Sections */

.section {
  padding-block: 40px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 1.5rem;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
}

/* App grid: scales from a handful of apps to many */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-card,
.principles > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.app-card:hover,
.app-card:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.app-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.app-card h3 a {
  color: var(--text);
  text-decoration: none;
}

/* Stretched link: the whole card is clickable, one link for keyboards */
.app-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}

.app-card h3 a:focus-visible {
  outline: none;
}

.app-card:has(h3 a:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.app-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.app-meta {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.85rem !important;
}

/* Placeholder app icon. Replace with <img> from /assets/icons/apps/ when final icons exist. */

.app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 22%;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}

.app-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.app-icon-lg {
  width: 72px;
  height: 72px;
  margin-bottom: 0;
  font-size: 1.75rem;
}

/* Principles and platforms */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 14px;
  margin: 0;
}

.step-icon {
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  padding: 9px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.principles dt {
  font-weight: 650;
  font-size: 1.05rem;
}

.principles dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-list li {
  padding: 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.92rem;
}

.note {
  max-width: var(--measure);
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Inner pages */

.page {
  padding-block: 24px 56px;
}

.page > .container > * {
  max-width: var(--measure);
}

.page > .container > .link-list {
  max-width: none;
}

.page h1 {
  font-size: 2rem;
}

.page .lead {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1.1rem;
}

.page h2 {
  margin-top: 32px;
  font-size: 1.3rem;
}

.page p + p {
  margin-top: 14px;
}

.support-card {
  margin-top: 28px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.page .support-card h2 {
  margin-top: 0;
}

.support-card p + p {
  margin-top: 14px;
}

.support-meta,
.support-trust,
.support-thanks {
  color: var(--muted);
  font-size: 0.9rem;
}

.support-thanks {
  margin-top: 16px;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.92rem;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.status {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.link-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.link-list li + li {
  border-top: 1px solid var(--border);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}

.link-list a:hover {
  background: var(--accent-soft);
}

.link-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Theme switch: icon-only button in the footer; theme.js sets data-theme on <html>. */

.theme-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.theme-btn:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.theme-btn .icon {
  display: none;
  width: 22px;
  height: 22px;
}

:root:not([data-theme="dark"]) .theme-btn .t-light,
:root[data-theme="dark"] .theme-btn .t-dark {
  display: block;
}

/* Footer */

.site-footer {
  margin-top: 24px;
  padding-block: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 -12px;
  padding: 0;
  list-style: none;
}

.copyright {
  font-size: 0.85rem;
}

@media (max-width: 30rem) {
  .site-header .container {
    flex-wrap: wrap;
    padding-inline: 12px;
    gap: 0 4px;
  }

  .site-nav ul {
    gap: 0;
  }

  .brand {
    gap: 8px;
  }

  .wordmark {
    width: 108px;
    height: 12.5px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .site-nav a {
    padding: 10px 5px;
    font-size: 0.85rem;
  }

  .app-head {
    gap: 14px;
  }
}

/* Sparkle trail (assets/js/sparkle.js): small four-point stars that glow and fade. */

.sparkle {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  translate: -50% -50%;
  background: #8f73f0;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 4px #a78bfa) drop-shadow(0 0 10px rgb(167 139 250 / 70%));
  animation: sparkle-fade 0.9s ease-out forwards;
}

.sparkle-alt {
  background: #b9a4ff;
  filter: drop-shadow(0 0 4px #8b6cf0) drop-shadow(0 0 9px rgb(109 79 216 / 70%));
}



:root[data-theme="dark"] .sparkle { background: #c4b5fd; }

:root[data-theme="dark"] .sparkle-alt { background: #fff; }

@keyframes sparkle-fade {
  0% { opacity: 0; transform: translate(0, 0) scale(0.3) rotate(0); }
  20% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(var(--spin)); }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle { display: none; }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* ==========================================================================
   Bidadari Task landing page additions (the rules above are the shared
   Bidadari site styles, copied so this folder works from any hostname).
   ========================================================================== */

:root {
  --width-wide: 960px;
  --red: #c42b1c;
  --orange: #a15c07;
}

:root[data-theme="dark"] {
  --red: #ff8d83;
  --orange: #f3b04c;
}

.container-wide {
  max-width: var(--width-wide);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.product-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
  border-radius: 0 10px 10px 0;
}

.product-name:hover {
  color: var(--text);
}

.menu-btn {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.menu-btn:hover {
  background: var(--accent-soft);
}

.menu-btn .icon {
  width: 24px;
  height: 24px;
}

.menu-btn .m-close,
.menu-btn[aria-expanded="true"] .m-open {
  display: none;
}

.menu-btn[aria-expanded="true"] .m-close {
  display: inline;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Hero */

.hero-icon {
  display: block;
  margin: 0 auto 14px;
  border-radius: 22%;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--muted);
  font-weight: 650;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.hero .status {
  margin-top: 16px;
}

/* Sections */

.section {
  scroll-margin-top: 8px;
}

.demo-head {
  text-align: center;
}

.badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.demo-head h2:focus {
  outline: none;
}

.principles dt {
  margin-top: 0;
}

.also-list {
  margin-top: 10px;
}

.platform-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.platform-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.platform-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.platform-glyph {
  width: 56px;
  height: 42px;
  margin-bottom: 8px;
  color: var(--accent);
}

.link-btn {
  margin-top: auto;
  min-height: 44px;
  padding: 10px 0 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--accent-hover);
}

.availability-card {
  margin-top: 0;
}

.avail-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 650;
}

.availability-card .cta-row {
  justify-content: flex-start;
  margin-top: 16px;
}

.availability-card .support-meta {
  margin-top: 14px;
}

/* Mobile navigation */

@media (max-width: 40rem) {
  .site-header .container {
    position: relative;
    flex-wrap: nowrap;
  }

  .menu-btn {
    display: grid;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    z-index: 20;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .site-nav a {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
  }

  .wordmark {
    width: 108px;
    height: 12.5px;
  }

  .hero {
    padding-block: 24px 40px;
  }
}

.principles-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 40rem) {
  .principles-3 {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  }
}
