/* Rumi brand system — Night Atelier. Pigment, not glow. */
:root {
  /* Official Rumi triad: black, white, and brand blue from hirerumi.com (#0064D4). */
  --black: #000000;
  --ink: #000000;
  --raised: #111214;
  --white: #FFFFFF;
  --paper: #FFFFFF;
  --mute: #B8BDC6;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --blue: #0064D4;
  --blue-2: #0057B8;
  --blue-text: #1793FF; /* official light companion; #0064D4 fails 4.5:1 on black for small type */
  --enamel: var(--blue);
  --enamel-text: var(--blue-text);
  --enamel-deep: var(--blue-2);
  --display: Fraunces, "Times New Roman", serif;
  --sans: Sora, "Helvetica Neue", sans-serif;
  --wrap: 1220px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 8px 28px -8px rgba(0, 0, 0, 0.55);
  --nav-bg: rgba(10, 11, 12, 0.88);
  --hover-fill: rgba(255, 255, 255, 0.04);
  --ghost-hover: rgba(255, 255, 255, 0.05);
  --film-bg: #070808;
  --work-bg: #0C0D0E;
  --block: rgba(255, 255, 255, 0.12);
  --timeline-fill: rgba(255, 255, 255, 0.16);
  --film-fade: linear-gradient(180deg, transparent 62%, rgba(10, 11, 12, 0.45) 100%);
  --on-media: #FFFFFF;
}
html { color-scheme: dark; }
html[data-theme="light"] {
  color-scheme: light;
  /* White ground, black type, official Rumi blue as pigment. */
  --ink: #FFFFFF;
  --paper: #000000;
  --raised: #F3F5F8;
  --mute: #3F4653;
  --line: rgba(0, 0, 0, 0.10);
  --line-strong: rgba(0, 0, 0, 0.22);
  --blue-text: #0064D4; /* official blue passes 5.57:1 on white; #1793FF does not */
  --enamel-text: var(--blue-text);
  --shadow: 0 8px 28px -8px rgba(0, 0, 0, 0.16);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --hover-fill: rgba(0, 0, 0, 0.04);
  --ghost-hover: rgba(0, 0, 0, 0.04);
  --film-bg: #E8EBEF;
  --work-bg: #FFFFFF;
  --block: rgba(0, 0, 0, 0.10);
  --timeline-fill: rgba(0, 0, 0, 0.14);
  --film-fade: linear-gradient(180deg, transparent 62%, rgba(10, 11, 12, 0.45) 100%);
  --on-media: #FFFFFF;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}
::selection { background: var(--blue); color: var(--white); }
:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { width: min(var(--wrap), calc(100% - 36px)); margin: 0 auto; }

/* Browser surfaces */
body { caret-color: var(--blue-text); }
* { scrollbar-color: var(--enamel-deep) var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--enamel-deep); }

.preview-bar {
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px;
}
.preview-bar .note { font-weight: 400; opacity: 0.7; }
.themes { display: inline-flex; gap: 12px; margin: 0; padding: 0; letter-spacing: 0.06em; }
.themes a { color: inherit; opacity: 0.4; }
.themes a:hover { opacity: 1; }
.themes a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -1px 0 currentColor; }

.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(12px)) {
  .nav { backdrop-filter: blur(12px); }
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); }
.brand .appicon {
  width: 28px; height: 28px; display: block; flex-shrink: 0;
  border-radius: 6.5px;
}
.brand .mark { width: 22px; height: 22px; display: block; color: var(--blue); }
.brand .wordmark { width: 108px; height: 26px; display: block; background: currentColor;
  -webkit-mask: url("brand/wordmark.svg") center / contain no-repeat;
  mask: url("brand/wordmark.svg") center / contain no-repeat; }
.nav-r { display: flex; align-items: center; gap: 6px; }
.login {
  color: var(--mute); font-weight: 500; font-size: 13px;
  padding: 8px 12px; letter-spacing: 0.01em;
}
.login:hover { color: var(--paper); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue); color: var(--white);
  font-family: var(--sans); font-weight: 600; font-size: 13px; line-height: 1;
  letter-spacing: 0.02em;
  padding: 12px 16px; border-radius: 2px; border: 0;
  transition: background 0.18s var(--ease);
}
.btn:hover { background: var(--blue-2); }
.btn-lg { padding: 14px 18px; font-size: 14px; }
.btn-ghost {
  background: transparent; color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.btn-ghost:hover { background: var(--ghost-hover); }

/* Hero */
.hero { padding: 36px 0 20px; }
.hero-grid { display: grid; gap: 28px; align-items: end; }
h1 {
  font-family: var(--display);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(2.35rem, 8vw, 5.15rem);
  line-height: 1.05;
  letter-spacing: -0.034em;
  max-width: 14ch;
}
h1 em { font-style: italic; font-weight: 450; }
.lead {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 42em;
}
.byline { margin-top: 14px; font-size: 13px; color: var(--mute); font-weight: 400; }
.byline strong { color: var(--paper); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.film {
  position: relative;
  background: var(--film-bg);
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.film.portrait { aspect-ratio: 4 / 5; }
.film.wide { aspect-ratio: 16 / 9; }
.film img.poster { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.film .ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--paper); text-align: center; padding: 20px;
  background: var(--raised);
}
.film .ph .hold { width: 28px; height: 28px; color: var(--blue); }
.film .ph p { font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.film .ph small { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); font-weight: 500; }
.play {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--white); color: var(--black);
  pointer-events: none;
}
.play svg { margin-left: 2px; }
.vcap {
  position: absolute; right: 16px; bottom: 18px; z-index: 2;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-media); font-weight: 500;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}
.film:has(img.poster)::after {
  content: ""; position: absolute; inset: 0;
  background: var(--film-fade);
  pointer-events: none;
}
html[data-theme="light"] .film {
  box-shadow: none;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}
.film:not(:has(img.poster)) .vcap {
  color: var(--mute);
  text-shadow: none;
}

/* Sections */
section { padding: 56px 0; }
.sec-h { margin-bottom: 28px; }
.sec-h h2 {
  font-family: var(--display);
  font-weight: 500;
  font-optical-sizing: auto;
  font-size: clamp(1.85rem, 4.6vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 22ch;
}
.sec-h p { margin-top: 12px; color: var(--mute); font-size: 16px; max-width: 44em; }

/* Workbench — the team, at work */
.floor { padding-top: 24px; }
.bench {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  background: var(--raised);
  min-height: 0;
}
.roster { border-bottom: 1px solid var(--line); }
.roster button {
  display: grid; grid-template-columns: 10px 1fr; gap: 10px; align-items: center;
  width: 100%; text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--mute); font-size: 13px; font-weight: 500;
  letter-spacing: 0.01em;
}
.roster button:last-child { border-bottom: 0; }
.roster button:hover { color: var(--paper); background: var(--hover-fill); }
.roster button[aria-selected="true"] { color: var(--paper); background: rgba(0, 100, 212, 0.14); }
.dot {
  width: 6px; height: 6px; background: transparent;
  box-shadow: inset 0 0 0 1px var(--mute);
}
.roster button[aria-selected="true"] .dot { background: var(--enamel); box-shadow: none; }
.stage { padding: 18px 16px 20px; min-height: 280px; display: flex; flex-direction: column; gap: 12px; }
.stage-top { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; align-items: flex-start; }
    @media (min-width: 800px) { .stage-top { flex-direction: row; align-items: baseline; gap: 12px; } }
.stage h3 { font-family: var(--display); font-weight: 500; font-size: 1.45rem; letter-spacing: -0.03em; }
.status { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--enamel-text); font-weight: 600; white-space: nowrap; }
.work {
  flex: 1;
  background: var(--work-bg);
  border: 1px solid var(--line);
  padding: 16px;
  font-size: 13.5px; line-height: 1.55; color: var(--paper);
  min-height: 168px;
  position: relative;
}
.work .cursor {
  display: inline-block; width: 7px; height: 1em; background: var(--blue-text);
  vertical-align: -2px; margin-left: 2px;
}
.work .meta { color: var(--mute); font-size: 12px; margin-bottom: 10px; letter-spacing: 0.04em; }
.work .line { margin: 0 0 6px; }
.work .block {
  height: 10px; background: var(--block); margin: 0 0 8px;
}
.work .block.short { width: 42%; }
.work .block.mid { width: 68%; }
.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow span {
  border: 1px solid var(--line-strong); padding: 6px 8px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute);
}
.flow i { width: 16px; height: 1px; background: var(--line-strong); display: inline-block; }
.timeline { display: flex; gap: 6px; align-items: end; height: 72px; margin-top: 8px; }
.timeline b { display: block; background: var(--timeline-fill); width: 18%; }
.opsheet { display: grid; gap: 6px; }
.opsheet div { display: grid; grid-template-columns: 1.2fr 0.8fr 0.6fr; gap: 8px; }
.opsheet em { font-style: normal; color: var(--mute); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }

/* How */
.beats { display: grid; gap: 0; border-top: 1px solid var(--line); }
.beat {
  display: grid; gap: 8px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.beat h3 { font-family: var(--display); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.03em; }
.beat p { color: var(--mute); font-size: 15px; max-width: 42em; }

.how-grid { display: grid; gap: 20px; }

/* Guards as typographic columns, not nested cards */
.guards { display: grid; gap: 24px; border-top: 1px solid var(--line); padding-top: 28px; }
.guard h3 { font-family: var(--display); font-weight: 500; font-size: 1.35rem; letter-spacing: -0.03em; }
.guard p { margin-top: 8px; color: var(--mute); font-size: 14.5px; }

.tools { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tools li { font-size: 14px; color: var(--paper); }
.tools li small { color: var(--enamel-text); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; margin-left: 6px; font-weight: 600; }

/* Plans — typographic, one plan in focus */
.plans { border-top: 1px solid var(--line); }
.plan-switch { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.plan-switch button {
  padding: 12px 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--mute);
  border-right: 1px solid var(--line);
}
.plan-switch button:last-child { border-right: 0; }
.plan-switch button[aria-selected="true"] { color: var(--ink); background: var(--paper); }
.plan-view { padding: 28px 0 8px; display: grid; gap: 18px; }
.plan-view .for { color: var(--mute); font-size: 14px; }
.price {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(3rem, 10vw, 5.5rem);
  letter-spacing: -0.035em; line-height: 0.95;
}
.price small { font-size: 0.28em; letter-spacing: 0; color: var(--mute); margin-left: 4px; font-family: var(--sans); font-weight: 500; }
.plan-view ul { display: grid; gap: 8px; margin: 4px 0 8px; }
.plan-view li { font-size: 15px; color: var(--paper); padding-left: 0; }
.plan-view li::before { content: "— "; color: var(--blue-text); }
.note { font-size: 13px; color: var(--mute); }
.refills { font-size: 13px; color: var(--mute); }
.refills a { color: var(--paper); box-shadow: inset 0 -1px 0 var(--blue); }
.refills a:hover { color: var(--blue-text); }

/* FAQ typographic */
.faq { display: grid; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary {
  font-family: var(--display); font-weight: 500; font-size: 1.2rem;
  letter-spacing: -0.02em; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
details p { margin-top: 8px; font-size: 15px; color: var(--mute); max-width: 62ch; }

.close { padding-bottom: 72px; }
.close-box { border-top: 1px solid var(--line); padding-top: 36px; }
.close h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.03em; max-width: 16ch; }
.close p { margin-top: 12px; color: var(--mute); max-width: 36em; }

footer { border-top: 1px solid var(--line); padding: 22px 0 40px; }
.foot { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 16px; }
.foot a, .foot p { font-size: 12px; color: var(--mute); letter-spacing: 0.04em; }
.foot a:hover { color: var(--paper); }

/* Reveals */
.reveal { opacity: 1; transform: none; }
.reveal.will-reveal { opacity: 0; transform: translateY(18px); }
.reveal.in, .reveal.immediate { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes typecaret {
  50% { opacity: 0; }
}

@media (min-width: 800px) {
  .wrap { width: min(var(--wrap), calc(100% - 64px)); }
  .hero { padding: 56px 0 28px; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.72fr); gap: 56px; align-items: end; }
  .lead { font-size: 17px; }
  section { padding: 72px 0; }
  .bench { grid-template-columns: minmax(200px, 0.42fr) minmax(0, 1fr); }
  .roster { border-bottom: 0; border-right: 1px solid var(--line); max-height: none; }
  .stage { padding: 24px 24px 26px; min-height: 360px; }
  .how-grid { grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: start; }
  .guards { grid-template-columns: 1fr 1fr 1fr; gap: 36px; }
  .plan-view { grid-template-columns: 1fr auto; align-items: end; gap: 32px; }
  .close-box { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
  .close .cta-row { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { animation: none; opacity: 1; transform: none; transition: none; }
  .work .cursor { display: none; }
  * { transition: none !important; animation: none !important; }
}
