/* Pijuh public website. Built by Gasine First. */
:root {
  color-scheme: dark;
  --night: #0b0618;
  --surface: #140c26;
  --surface-2: #1c1233;
  --line: #2a1f42;
  --cream: #f5e6b8;
  --text: #d8cfe8;
  --muted: #9d91b5;
  --violet: #b98cf5;
  --violet-ink: #170b2c;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 96px;
  --r-control: 10px;
  --r-panel: 20px;
  --wrap: 1120px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.6 var(--body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); color: var(--cream); line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(36px, 6.2vw, 68px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 650; }
h3 { font-size: clamp(19px, 2vw, 22px); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s3); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s5); } }
.label { font: 600 13px/1.2 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--violet); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }
.prose { max-width: 68ch; }
.prose p + p { margin-top: var(--s3); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--night); padding: 8px 12px; border-radius: var(--r-control); z-index: 50; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(11, 6, 24, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--s3); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); font: 700 21px/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: var(--s4); }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--violet); text-underline-offset: 8px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--cream); width: 42px; height: 42px; border-radius: var(--r-control); align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--night); border-bottom: 1px solid var(--line); padding: var(--s2) var(--s3) var(--s3); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; margin-top: var(--s2); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--r-control); font: 600 15px/1 var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color 180ms ease-out, color 180ms ease-out, border-color 180ms ease-out; }
.btn-primary { background: var(--cream); color: var(--night); }
.btn-primary:hover { background: #fff3cf; color: var(--night); }
.btn-ghost { border-color: var(--line); color: var(--cream); background: transparent; }
.btn-ghost:hover { border-color: var(--violet); color: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.nav .btn { min-height: 40px; color: var(--night); }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); }

/* Sections */
section { padding: var(--s8) 0; }
@media (max-width: 720px) { section { padding: var(--s7) 0; } }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; gap: var(--s3); margin-bottom: var(--s6); max-width: 760px; }
.page-hero { padding: var(--s7) 0 var(--s6); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); margin: var(--s3) 0; max-width: 18ch; }

/* Home hero with the channel carousel. Sized from the viewport height so the whole hero fits one screen. */
.hero { min-height: calc(100vh - 64px); min-height: calc(100svh - 64px); display: flex; align-items: center; padding: var(--s4) 0; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s6); align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero h1 { margin: var(--s2) 0 var(--s3); max-width: 13ch; font-size: clamp(34px, min(6.2vw, 8.4svh), 68px); }
.hero .lede { margin-bottom: var(--s4); font-size: clamp(16px, min(1.6vw, 2.4svh), 20px); }
.orbit { position: relative; width: min(100%, max(180px, min(440px, calc(100svh - 320px)))); aspect-ratio: 1; margin: 0 auto; }
.orbit-ring { position: absolute; inset: 9%; border: 1px dashed var(--line); border-radius: 50%; }
.orbit-core { position: absolute; left: 50%; top: 50%; width: 30%; transform: translate(-50%, -50%); border-radius: 50%; box-shadow: 0 0 0 10px rgba(185, 140, 245, 0.07); }
.orbit-core img { border-radius: 50%; width: 100%; }
.orbit-list { position: absolute; inset: 0; transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1); }
.orbit-btn { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-control); background: var(--surface-2); color: var(--text); border: 1px solid var(--line); font: 600 14px/1 var(--body); cursor: pointer; white-space: nowrap; transition: transform 700ms cubic-bezier(0.4, 0, 0.2, 1), background-color 180ms ease-out, border-color 180ms ease-out, color 180ms ease-out; }
.orbit-btn svg { width: 16px; height: 16px; }
.orbit-btn:hover { border-color: var(--violet); color: var(--cream); }
.orbit-btn[aria-selected="true"] { background: var(--violet); color: var(--violet-ink); border-color: var(--violet); }
.orbit-panel { margin-top: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: var(--s3) var(--s4); min-height: 120px; }
.orbit-panel h3 { margin-bottom: var(--s2); font-size: clamp(20px, 2.4svh, 26px); }
.orbit-panel p { color: var(--text); font-size: 16px; line-height: 1.5; }
.orbit-panel .eg { margin-top: var(--s2); font-size: 14px; color: var(--muted); border-left: 2px solid var(--violet); padding-left: 12px; }
.orbit-controls { display: flex; justify-content: flex-end; margin-top: var(--s2); }
.orbit-pause { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: var(--r-control); padding: 6px 12px; font: 600 13px/1 var(--body); cursor: pointer; }
.orbit-pause:hover { color: var(--cream); border-color: var(--violet); }
@media (max-width: 960px) {
  .hero { min-height: 0; padding: var(--s6) 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: var(--s5); }
  .orbit { width: min(100%, 320px); }
}
/* Landscape phones and short tablets: keep two columns so the hero stays on one screen */
@media (max-width: 960px) and (min-aspect-ratio: 1/1) and (min-width: 561px) {
  .hero { padding: var(--s3) 0; }
  .hero .wrap { grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .hero h1 { font-size: clamp(26px, 5.4svh, 44px); margin: var(--s1) 0 var(--s2); }
  .hero .lede { font-size: 15px; margin-bottom: var(--s3); }
  .orbit { width: min(100%, max(160px, min(300px, calc(100svh - 230px)))); }
  .orbit-panel { padding: var(--s2) var(--s3); min-height: 0; }
  .orbit-panel p { font-size: 14px; }
  .orbit-panel .eg { display: none; }
}
@media (max-width: 960px) and (min-aspect-ratio: 1/1) and (min-width: 561px) and (max-height: 500px) {
  .hero .label { display: none; }
  /* too short for the ring: channels become a wrapped row, as on phones */
  .orbit { width: 100%; aspect-ratio: auto; display: flex; flex-direction: column; }
  .orbit-ring, .orbit-core { display: none; }
  .orbit-list { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; transform: none !important; }
  .orbit-btn { position: static; transform: none !important; padding: 7px 10px; font-size: 13px; }
  .hero .lede { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .orbit-panel p { -webkit-line-clamp: 2; }
}
@media (max-width: 560px) {
  /* Phones: the orb on top, channels as a scrolling row underneath. */
  .orbit { width: 100%; aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; }
  .orbit-ring, .orbit-core { display: none; }
  .hero { padding: var(--s4) 0; }
  .hero .wrap { gap: var(--s4); }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); margin: var(--s2) 0; }
  .hero .lede { font-size: 16px; margin-bottom: var(--s3); }
  .hero .actions { flex-wrap: nowrap; }
  .hero .actions .btn { flex: 1 1 auto; padding: 0 12px; font-size: 14px; }
  .orbit-list { position: static; display: flex; gap: var(--s2); overflow-x: auto; width: 100%; padding-bottom: 6px; scrollbar-width: none; transform: none !important; }
  .orbit-list::-webkit-scrollbar { display: none; }
  .orbit-btn { position: static; transform: none !important; flex: 0 0 auto; }
  .orbit-panel { min-height: 0; padding: var(--s3); width: 100%; }
  .orbit-panel .eg { display: none; }
  .orbit-controls { margin-top: var(--s2); }
}
/* Short phones: keep the whole hero on one screen */
@media (max-width: 560px) and (max-height: 600px) {
  .hero { padding: var(--s3) 0; }
  .hero .label { display: none; }
  .hero .wrap { gap: var(--s3); }
  .hero .actions .btn { min-height: 42px; }
  .hero .lede { -webkit-line-clamp: 2; }
  .hero h1 { font-size: clamp(26px, 8vw, 34px); }
  .hero .actions .btn-ghost { display: none; }
  .orbit-panel p { -webkit-line-clamp: 2; }
  .orbit-controls { margin-top: 4px; }
}
@media (max-width: 560px) and (max-height: 700px) {
  .hero .lede { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .hero .actions { margin-top: 0; }
  .orbit-panel p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (min-width: 561px) and (max-height: 760px) {
  .hero .lede { margin-bottom: var(--s3); }
  .orbit-panel { min-height: 0; }
}

/* Split and lists */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--s6); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--s4); } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: var(--s4); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: var(--s3); align-items: start; }
.steps li::before { content: counter(step, decimal-leading-zero); font: 700 15px/48px var(--display); color: var(--violet); border: 1px solid var(--line); border-radius: 50%; width: 48px; height: 48px; text-align: center; }
.steps h3 { margin-bottom: 6px; }
.rows { display: grid; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 220px 1fr; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.row h3 { display: flex; gap: 10px; align-items: center; }
.row h3 svg { width: 20px; height: 20px; color: var(--violet); flex: none; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; gap: var(--s2); } }
.ticks { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.ticks svg { width: 18px; height: 18px; margin-top: 4px; color: var(--violet); }
.ticks.no svg { color: var(--muted); }

/* Scope table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-panel); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--cream); font-weight: 600; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td code { font-size: 14px; color: var(--cream); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; white-space: nowrap; }

/* Callout and CTA band */
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: var(--s5); }
.cta { text-align: left; display: grid; grid-template-columns: 1fr auto; gap: var(--s4); align-items: center; }
@media (max-width: 720px) { .cta { grid-template-columns: 1fr; } }

/* Legal pages */
.legal { padding: var(--s6) 0 var(--s7); }
.legal h2 { font-size: clamp(22px, 2.6vw, 28px); margin: var(--s6) 0 var(--s3); }
.legal h3 { margin: var(--s4) 0 var(--s2); }
.legal p, .legal li { max-width: 72ch; }
.legal p + p { margin-top: var(--s3); }
.legal ul { padding-left: 22px; margin: var(--s3) 0 0; }
.legal li { margin: 6px 0; }
.toc { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.toc a { font-size: 14px; border: 1px solid var(--line); border-radius: var(--r-control); padding: 6px 12px; text-decoration: none; color: var(--text); }
.toc a:hover { border-color: var(--violet); color: var(--cream); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--s6) 0 var(--s5); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s5); }
.footer-grid h2 { font: 600 13px/1.2 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--cream); text-decoration: underline; }
.footer-base { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Request an account drawer: right side on desktop, bottom sheet on phones */
html.drawer-open, html.drawer-open body { overflow: hidden; }
.drawer-root { position: fixed; inset: 0; z-index: 60; }
.drawer-root[hidden] { display: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(11, 6, 24, 0.72); animation: fade-in 180ms ease-out; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(0, 0, 0, 0.4); animation: drawer-in 240ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 26px; }
.drawer-close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: none; color: var(--cream); border: 1px solid var(--line); border-radius: var(--r-control); cursor: pointer; }
.drawer-close:hover { border-color: var(--violet); }
.drawer-close svg { width: 20px; height: 20px; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--s4); }
.drawer-success h3 { margin-bottom: var(--s2); }
.drawer-success h3:focus { outline: none; }
.drawer-success p { color: var(--text); }
.field { margin-bottom: var(--s3); }
.field > label { display: block; font: 600 15px/1.3 var(--body); color: var(--cream); margin-bottom: 6px; }
.field .req, .field .opt { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 6px; }
.field input:not([type="checkbox"]), .field select, .field textarea { display: block; width: 100%; min-height: 46px; padding: 10px 12px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-control); font: 400 16px/1.4 var(--body); }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--violet); outline-offset: 2px; border-color: var(--violet); }
.field .hint { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.field [aria-invalid="true"] { border-color: #ff8a9b; }
.field-error { color: #ffa3b1; font-size: 14px; margin-top: 6px; }
.field-error:empty { display: none; }
.field.check > label { display: flex; align-items: flex-start; gap: 10px; font: 400 15px/1.5 var(--body); color: var(--text); }
.field.check input { flex: none; width: 18px; height: 18px; margin-top: 4px; accent-color: var(--violet); }
.form-error { margin-bottom: var(--s3); padding: 12px 14px; border: 1px solid #ff8a9b; border-radius: var(--r-control); color: #ffd3da; font-size: 15px; }
.form-error[hidden] { display: none; }
.form-submit { width: 100%; margin-top: var(--s2); }
.form-submit:disabled { opacity: 0.6; cursor: progress; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@media (max-width: 560px) {
  .drawer { top: auto; left: 0; width: 100%; max-height: 92svh; border-left: 0; border-top: 1px solid var(--line); border-radius: var(--r-panel) var(--r-panel) 0 0; animation-name: sheet-in; }
  .drawer-body { padding: var(--s3); }
}
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-backdrop { animation: none; } }
/* The header button sits inside the mobile menu: make it full width there */
@media (max-width: 860px) {
  .nav .btn { width: 100%; margin-top: var(--s3); min-height: 46px; }
}

/* Contact page */
.contact-wrap { max-width: 640px; }
.contact-note { margin: var(--s2) 0 var(--s4); color: var(--muted); font-size: 15px; }
.contact-success h2 { font-size: 26px; margin-bottom: var(--s2); }
.contact-success h2:focus { outline: none; }
.contact-success p { color: var(--text); }
