/* Storyteller Mari Studio -- design system "noite + ouro".
   ONE copy of the tokens, buttons, fields and page chrome for index.html, pricing.html and
   app.html (CLAUDE.md §3.105: a second copy of the same decision diverges). Page-specific
   layout stays inline in each page. Brand: Storyteller Mari only (§3.142). */

:root {
  --night: #0E0C24;     /* page */
  --deep: #121031;      /* alternate band / sidebar */
  --surface: #17143A;   /* cards */
  --raised: #221E4D;    /* secondary buttons, selected */
  --line: #2E2A5E;      /* borders */
  --ink: #F5F2EA;       /* text */
  --muted: #A9A5CF;    /* secondary text */
  --gold: #F4B73F;      /* the ONE primary action per screen */
  --gold-hi: #FFC85C;
  --on-gold: #14112E;   /* text on gold */
  --success: #3DD68C;
  --attention: #FF9B73;
  --focus: #8E8CF7;     /* focus ring */
  --display: 'Fraunces', Georgia, serif;
  --ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ui); background: var(--night); color: var(--ink); line-height: 1.55; min-height: 100vh; }
img { max-width: 100%; }
a { color: var(--gold); }
a:hover { color: #FFD27A; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Buttons: one gold per screen; ghost / quiet / danger for the rest. min 44px. ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: 800 15px/1.1 var(--ui); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:hover:not(:disabled):not([aria-disabled="true"]) { transform: translateY(-1px); }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover:not(:disabled) { background: var(--gold-hi); color: var(--on-gold); box-shadow: 0 10px 30px -10px rgba(244, 183, 63, .6); }
.btn-ghost { background: var(--raised); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: #2B2660; color: var(--ink); }
.btn-quiet { background: transparent; color: var(--gold); padding: 0 12px; }
.btn-quiet:hover:not(:disabled) { background: var(--surface); color: var(--gold); }
.btn-danger { background: transparent; border-color: var(--attention); color: var(--attention); }
.btn-danger:hover:not(:disabled) { background: rgba(255, 155, 115, .16); color: var(--attention); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .42; cursor: not-allowed; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn[aria-busy="true"]::before {
  content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: studio-spin .8s linear infinite;
}
@keyframes studio-spin { to { transform: rotate(360deg); } }

/* ── Fields ── */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field > label, .label { font-weight: 800; font-size: 15px; }
.field .sub { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=file], input[type=datetime-local], textarea, select {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 500 15px/1.4 var(--ui); color-scheme: dark;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
input[type=file] { padding: 10px 12px; }
select:required:invalid { color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--gold); width: 20px; height: 20px; flex: none; margin: 0; }
input:disabled + span, input:disabled + .slider { opacity: .45; }

/* ── Segmented choice (radios): billing interval, Post now / Schedule ── */
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 800; font-size: 15px; color: var(--muted); }
.seg small { font-size: 12px; font-weight: 800; color: var(--gold); }
.seg input:checked + span { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ── Badges / notices ── */
.badge { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(61, 214, 140, .14); color: var(--success); white-space: nowrap; }
.badge.gold { background: rgba(244, 183, 63, .16); color: var(--gold); }
.badge.violet { background: rgba(142, 140, 247, .18); color: #B9B8FF; }
.badge.warn { background: rgba(255, 155, 115, .14); color: var(--attention); }
.badge.mute { background: var(--raised); color: var(--muted); }
.notice { font-size: 14px; line-height: 1.55; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.notice.info { border-color: rgba(142, 140, 247, .45); }
.notice.warn { border-color: var(--attention); color: var(--attention); background: rgba(255, 155, 115, .08); }
.notice.bad { border-color: var(--attention); color: var(--attention); background: rgba(255, 155, 115, .08); }
.notice.ok { border-color: rgba(61, 214, 140, .5); color: var(--success); }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }

/* ── Site chrome (index + pricing) ── */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(14, 12, 36, .92); backdrop-filter: blur(8px); }
.site-bar { max-width: 1228px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; }
.brand em { font-style: normal; color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 600; }
.site-nav .btn { white-space: nowrap; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a:not(.btn):hover { color: var(--ink); }

.wrap { max-width: 1180px; margin: 0 auto; }
.band { padding: 88px 24px; border-top: 1px solid var(--line); }
.band.deep { background: var(--deep); }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.h-display { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.band h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 4.4vw, 2.6rem); line-height: 1.1; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.6; }

.grid-auto { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.feat { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.feat h3 { font-size: 19px; font-weight: 800; }
.feat p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.feat svg { flex: none; }
.step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font-weight: 900; display: grid; place-items: center; }

.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 20px; position: relative; }
.plan.pick { border: 2px solid var(--gold); }
.plan .ribbon { position: absolute; top: -14px; left: 32px; background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.plan h3 { font-size: 20px; font-weight: 800; }
.plan .price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan .price b { font-family: var(--display); font-size: 52px; font-weight: 700; line-height: 1.1; }
.plan .price span { color: var(--muted); }
.plan .alt { font-size: 14px; color: var(--gold); font-weight: 700; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.plan li { display: flex; gap: 10px; }
.plan li svg { flex: none; margin-top: 2px; }
.plan .btn { margin-top: auto; }

.faq-list { display: flex; flex-direction: column; gap: 14px; }
details.faq { border: 1px solid var(--line); border-radius: 14px; padding: 6px 22px; background: var(--surface); }
details.faq summary { cursor: pointer; font-weight: 800; font-size: 17px; min-height: 44px; display: flex; align-items: center; }
details.faq p { margin: 4px 0 16px; color: var(--muted); line-height: 1.6; }

.signup-form { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.signup-form input { flex: 1 1 240px; min-height: 52px; background: var(--night); border-radius: 12px; font-size: 16px; padding: 0 18px; }
.signup-msg { min-height: 22px; font-size: 14px; color: var(--muted); }
.signup-msg.ok { color: var(--success); }
.signup-msg.err { color: var(--attention); }

.site-footer { border-top: 1px solid var(--line); padding: 40px 24px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer nav a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer nav a:hover { color: var(--ink); }

@media (max-width: 720px) {
  .site-bar { padding: 12px 16px; }
  .site-nav { gap: 6px; }
  .site-nav a.opt { display: none; }
  .brand { font-size: 17px; }
  .brand img { width: 34px; height: 34px; }
  .band { padding: 60px 16px; }
  .plan { padding: 26px 22px; }
  .plan .ribbon { left: 22px; }
  .feat { padding: 22px; }
  .lead { font-size: 16px; }
}
