/* Nijastra LLC: brand colours navy #0B1530 and cyan #19D3F0, set in Sora. (Each app keeps its own style on its own site.) */

@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-latin-400-600.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* Light theme (default) */
:root {
  --navy: #0B1530;
  --cyan: #19D3F0;
  --bg: #FFFFFF;
  --surface: #F4F6FA;
  --ink: #0B1530;
  --muted: #4E5873;
  --faint: #6B7590;
  --line: #E3E7EF;
  --link: #0B1530;
  --link-line: #19D3F0;
  --accent: #19D3F0;
  --accent-ink: #0B1530;
  color-scheme: light;
}

/* Dark theme: chosen in the switcher, or following the system when nothing is chosen */
:root[data-theme="dark"] {
  --bg: #0B1530;
  --surface: #121E40;
  --ink: #F3F6FC;
  --muted: #A9B3CC;
  --faint: #8792B0;
  --line: #24315C;
  --link: #19D3F0;
  --link-line: #19D3F0;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1530;
    --surface: #121E40;
    --ink: #F3F6FC;
    --muted: #A9B3CC;
    --faint: #8792B0;
    --line: #24315C;
    --link: #19D3F0;
    --link-line: #19D3F0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Footer stays at the bottom of the window on short pages, and below the content on long ones */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-color: var(--link-line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.65rem); margin-top: 1.8em; }
h3 { font-size: 1.05rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Header and footer */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand svg { display: block; height: 30px; width: calc(30px * 4.37); }
.top-right { display: flex; align-items: center; gap: 18px 22px; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.foot { border-top: 1px solid var(--line); margin-top: 88px; padding: 28px 0 40px; color: var(--faint); font-size: 0.9rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Home */
.hero { padding: 88px 0 32px; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.eyebrow svg { width: 14px; height: 14px; flex: none; color: var(--ink); }
.section-label { color: var(--faint); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 64px 0 16px; font-weight: 500; }

.product { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.product img { width: 120px; height: 120px; object-fit: contain; background: var(--surface); border-radius: 26px; padding: 10px; }
.product h3 { margin: 0 0 4px; font-size: 1.25rem; }
.product p { color: var(--muted); margin-bottom: 12px; }
.status { display: inline-block; font-size: 0.8rem; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; font-weight: 500; }
.link-arrow { font-weight: 500; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.grid3 h3 { margin-top: 0; }
.grid3 p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* On the home page the contact block sits at the bottom, just above the footer, when the page is shorter than the window */
.home { display: flex; flex-direction: column; }
.contact-block { margin-top: auto; }
.contact { border-top: 1px solid var(--line); padding-top: 8px; }
.contact dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px 24px; margin: 16px 0 0; }
.contact dt { color: var(--faint); }
.contact dd { margin: 0; }

/* Product page */
.product-hero { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: center; padding: 72px 0 16px; }
.product-hero img { width: 240px; background: var(--surface); border-radius: 48px; padding: 24px; }
.product-hero p.lead { font-size: 1.15rem; color: var(--muted); }
.list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.list li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.list strong { font-weight: 600; }
.list span { color: var(--muted); }

/* Legal and support pages */
.doc { padding-top: 56px; }
.doc .updated { color: var(--faint); }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.93rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; background: var(--surface); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.5em; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.path { font-weight: 600; }
.note { background: var(--surface); border-radius: 12px; padding: 16px 20px; margin: 20px 0 8px; }
.note p:last-child { margin-bottom: 0; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Appearance switcher: System / Light / Dark */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.theme-switch button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--faint); cursor: pointer; transition: background-color .15s, color .15s; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(11, 21, 48, 0.12); }
.theme-switch svg { width: 16px; height: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { .theme-switch button { transition: none; } }

@media (max-width: 680px) {
  body { font-size: 16px; }
  .brand svg { height: 26px; width: calc(26px * 4.37); }
  .hero { padding-top: 56px; }
  .product { grid-template-columns: 1fr; }
  .product img { width: 96px; height: 96px; border-radius: 22px; }
  .product-hero { grid-template-columns: 1fr; padding-top: 48px; gap: 24px; }
  .product-hero img { width: 140px; border-radius: 32px; padding: 14px; order: -1; }
  .list li, .contact dl { grid-template-columns: 1fr; gap: 2px; }
  .contact dt { margin-top: 8px; }
  .doc th, .doc td { padding: 10px 8px; }
}

/* The switcher needs JavaScript; hide it when scripts don't run */
.theme-switch { display: none; }
.js .theme-switch { display: inline-flex; }
