/*
Theme Name: Rightly Beta
Theme URI: https://rightlyapp.com/
Author: NorthMac Services
Description: Private beta landing-page theme for Rightly. Visual Camp language.
Version: 1.4.0
Text Domain: rightly-beta
*/

@font-face {
  font-family: 'Fraunces';
  src: url('./assets/fonts/fraunces-latin-wght-normal.woff2') format('woff2-variations');
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: 'Fraunces';
  src: url('./assets/fonts/fraunces-latin-wght-italic.woff2') format('woff2-variations');
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('./assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('./assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --camp: hsl(40, 42%, 93%);
  --camp-2: hsl(38, 36%, 90%);
  --paper: hsl(40, 48%, 97%);
  --paper-2: hsl(38, 32%, 93%);
  --paper-3: hsl(36, 26%, 88%);
  --surface: hsl(40, 60%, 99%);
  --ink: hsl(22, 18%, 12%);
  --ink-2: hsl(22, 10%, 28%);
  --ink-3: hsl(24, 8%, 44%);
  --rule: hsl(34, 18%, 84%);
  --rule-2: hsl(36, 20%, 90%);
  --accent: hsl(210, 48%, 36%);
  --accent-2: hsl(206, 42%, 44%);
  --gold: hsl(40, 82%, 48%);
  --gold-soft: hsl(42, 78%, 78%);
  --midnight: hsl(220, 28%, 7%);
  --midnight-2: hsl(220, 26%, 11%);
  --midnight-ink: hsl(40, 28%, 94%);
  --midnight-ink-2: hsl(38, 16%, 80%);
  --midnight-ink-3: hsl(220, 10%, 62%);
  --midnight-rule: hsl(220, 16%, 22%);
  --midnight-gold: hsl(40, 78%, 62%);
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-serif: 'Source Serif 4', Charter, Georgia, serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --text-display: clamp(40px, 2.8vw + 28px, 68px);
  --text-h2: clamp(30px, 1.4vw + 22px, 42px);
  --text-lead: clamp(17px, 0.35vw + 15px, 20px);
  --text-body: 17px;
  --text-caption: 15px;
  --text-kicker: 12.5px;
  --shadow-soft: 0 1px 2px hsla(22, 30%, 12%, 0.04), 0 10px 28px hsla(22, 24%, 16%, 0.06);
  --shadow-pop: 0 1px 2px hsla(22, 30%, 12%, 0.06), 0 18px 44px hsla(22, 24%, 16%, 0.12);
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --section-pad: clamp(72px, 9vw, 144px);
  --measure: 660px;
  --stage: 1240px;
  --page-pad: clamp(20px, 5vw, 64px);
  --radius-frame: 18px;
  --radius-ui: 12px;
  --radius-pill: 999px;
  --dur-hover: 120ms;
  --dur-reveal: 200ms;
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--camp);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

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

a:hover { color: var(--accent-2); }

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

.section--midnight :focus-visible,
.beta-form :focus-visible {
  outline-color: var(--gold);
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: var(--s4);
  z-index: 10;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--gold-soft);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
}

.skip-link:focus { transform: translateY(0); }

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  padding: 0 var(--page-pad);
  border-bottom: none;
  background: var(--camp);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 25px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variation-settings: 'opsz' 144;
  text-decoration: none;
  border-bottom: none;
  padding: 0;
}
.brand__r {
  color: var(--gold);
}

.nav-cta {
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-ui);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.nav-cta:hover {
  color: var(--ink);
  background: var(--gold);
}

.section { padding: var(--section-pad) 0; }

.hero { padding-top: clamp(56px, 7vw, 112px); }

.section--band {
  background: var(--camp-2);
  border-top: none;
  border-bottom: none;
}

.section--midnight {
  background: var(--midnight);
  color: var(--midnight-ink);
}

.wrap {
  width: min(var(--stage), calc(100% - 2 * var(--page-pad)));
  margin: 0 auto;
}

.prose {
  max-width: var(--measure);
}

.centered { margin: 0 auto; text-align: center; }

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 48, 'SOFT' 30;
  color: inherit;
}

h1 {
  max-width: var(--measure);
  margin-bottom: var(--s4);
  font-size: var(--text-display);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
}

h2 {
  margin-bottom: var(--s4);
  font-size: var(--text-h2);
  line-height: 1.12;
}

h3 {
  margin-bottom: var(--s3);
  font-size: 20px;
  line-height: 1.25;
}

.lead {
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: var(--text-lead);
  line-height: 1.55;
}

.section--midnight .lead,
.section--midnight p { color: var(--midnight-ink-2); }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: var(--s4);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-ui);
  background: var(--ink);
  color: var(--gold-soft);
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 hsla(40, 40%, 92%, 0.12), 0 1px 2px hsla(18, 30%, 10%, 0.2);
  transition: transform var(--dur-hover) var(--ease), box-shadow var(--dur-hover) var(--ease);
}

.button:hover {
  background: var(--ink);
  color: var(--gold-soft);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 hsla(40, 40%, 92%, 0.14), 0 6px 16px hsla(18, 30%, 10%, 0.22);
}

.button--light { background: var(--gold); color: var(--ink); cursor: pointer; }
.button--light:hover { background: var(--gold-soft); color: var(--ink); }
.button--light:focus-visible { outline-color: var(--ink); }

.desktop-note {
  margin-top: var(--s4);
  margin-bottom: var(--s7);
  color: var(--ink-2);
  font-size: var(--text-caption);
}

.evidence-frame {
  margin: var(--s7) 0 0;
}

.evidence-frame picture {
  display: block;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--rule);
  border-radius: var(--radius-frame);
  overflow: hidden;
  background: var(--surface);
  box-shadow: none;
}

.evidence-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
}

.evidence-frame--stage {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.evidence-frame--stage picture { aspect-ratio: 16 / 10; }
.evidence-frame--stage img { object-position: center top; }
.evidence-frame--original img { object-position: center top; }
.evidence-frame--hero img { height: 100%; object-position: center top; }

/* Reuses the real hero capture, cropped to the research companion so the
   passage-to-cited-research moment is shown, not described. */
.evidence-frame--research {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.evidence-frame--research picture { aspect-ratio: 16 / 10; }
.evidence-frame--research img {
  height: 100%;
  object-position: center top;
}

figcaption {
  padding: 12px 4px 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}

.capabilities-close {
  max-width: var(--measure);
  margin: var(--s5) 0 0;
  color: var(--ink);
}

/* Steve 2026-08-28: bring back one deliberate 50-user callout. Set as a marked
   passage, a gold marginal rule with the note indented beside it, so the cohort
   reads as consequential without a badge, a counter, or scarcity chrome. */
.cohort-note {
  display: flex;
  gap: var(--s5);
  max-width: 780px;
  margin: var(--s7) auto 0;
  text-align: left;
}
.cohort-note__rule {
  flex: none;
  width: 2px;
  border-radius: 1px;
  background: var(--midnight-gold);
}
.cohort-note__body {
  flex: 1 1 auto;
}
.cohort-note__lead {
  margin-bottom: var(--s4);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  font-variation-settings: 'opsz' 48, 'SOFT' 30;
}
.cohort-note p {
  margin-bottom: var(--s4);
}
.cohort-note p:last-child {
  margin-bottom: 0;
}
.section--midnight .cohort-note__lead {
  color: var(--midnight-ink);
}
.section--midnight .cohort-note__fine {
  color: var(--midnight-ink-3);
  font-size: 14px;
  line-height: 1.6;
}

.beta-form {
  max-width: 780px;
  margin: var(--s7) auto var(--s8);
  padding: var(--s6);
  border: none;
  border-radius: var(--radius-frame);
  background: var(--midnight-2);
  box-shadow: var(--shadow-pop);
}

.form-preview-note {
  margin-bottom: var(--s6);
  color: var(--midnight-ink-2);
}

.form-preview-note strong { color: var(--midnight-ink); }

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s5);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: var(--s5);
  color: var(--midnight-ink);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--midnight-rule);
  border-radius: var(--radius-ui);
  background: var(--midnight);
  color: var(--midnight-ink);
  font: inherit;
  padding: 12px 14px;
}

textarea { resize: vertical; }

.optional { color: var(--midnight-ink-3); font-weight: 400; }

.error {
  min-height: 18px;
  color: hsl(36, 78%, 76%);
  font-size: 14px;
  font-weight: 400;
}

[aria-invalid="true"] { border-color: hsl(36, 78%, 66%); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--midnight-gold);
}
.check-error { display: block; margin-top: -18px; margin-bottom: var(--s5); }

.beta-form .fluentform {
  margin-top: var(--s6);
}

.beta-form .ff-el-group {
  margin-bottom: var(--s5);
}

.beta-form .ff-el-input--label label {
  display: block;
  margin-bottom: 8px;
  color: var(--midnight-ink);
  font-weight: 500;
}

.beta-form .ff-el-form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.beta-form .ff-el-form-check-input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--midnight-gold);
}

.beta-form .ff-el-form-check-label {
  display: block;
  margin: 0;
  color: var(--midnight-ink-2);
  font-weight: 400;
}

.beta-form .ff-el-form-control,
.beta-form .ff-default .ff-el-form-control {
  background-color: var(--midnight);
  background-image: none;
  border: 1px solid var(--midnight-rule);
  color: var(--midnight-ink);
  box-shadow: none;
}

.beta-form .ff-el-form-control:focus,
.beta-form .ff-el-form-control:focus-visible,
.beta-form .ff-default .ff-el-form-control:focus,
.beta-form .ff-default .ff-el-form-control:focus-visible {
  background-color: var(--midnight-2);
  background-image: none;
  border-color: var(--gold);
  color: var(--midnight-ink);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: none;
}

.beta-form .ff-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: none;
  border-radius: var(--radius-ui);
  background: var(--gold);
  color: var(--ink);
  font: 650 15px/1 var(--font-sans);
  letter-spacing: -0.01em;
  padding: 14px 22px;
  cursor: pointer;
}

.beta-form .ff-btn-submit:hover,
.beta-form .ff-btn-submit:focus-visible {
  background: var(--gold-soft);
  border-color: transparent;
  color: var(--ink);
}

.beta-form .ff-el-is-error .text-danger,
.beta-form .error.text-danger {
  color: hsl(36, 78%, 76%);
}

.beta-form .ff-message-success {
  margin: var(--s6) 0 0;
  padding: var(--s5);
  border: 1px solid var(--midnight-rule);
  border-radius: var(--radius-ui);
  background: var(--midnight);
  color: var(--midnight-ink-2);
  box-shadow: none;
}

.beta-form .ff-message-success h2 {
  color: var(--midnight-ink);
}

.confirmation {
  max-width: var(--measure);
  margin: var(--s7) auto var(--s8);
  padding: var(--s6);
  border: none;
  border-radius: var(--radius-frame);
  background: var(--midnight-2);
  text-align: center;
}

.confirmation h2 { color: var(--midnight-ink); }

.faq {
  max-width: var(--measure);
  margin: var(--s8) auto 0;
}

.faq h2 { margin-bottom: var(--s5); }

.faq article {
  padding: var(--s5) 0;
  border-top: 1px solid var(--midnight-rule);
}

.faq p { margin-bottom: 0; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s8);
  padding-top: var(--s5);
  border-top: 1px solid var(--midnight-rule);
  color: var(--midnight-ink-3);
  font-family: var(--font-sans);
  font-size: var(--text-kicker);
  font-weight: 500;
  letter-spacing: 0;
}

.footer p { margin-bottom: 0; color: var(--midnight-ink-3); }

.reveal { opacity: 1; transform: translateY(0); }

.reveal.reveal--pending { opacity: 0; transform: translateY(8px); }

.reveal.reveal--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease);
}

@media (max-width: 1023px) {
  .wrap { width: calc(100% - 64px); }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
  .cohort-note { gap: var(--s4); margin-top: var(--s6); }
  .cohort-note__lead { font-size: 21px; }

  body { font-size: 16px; }
  .topbar { align-items: center; flex-direction: row; padding-top: var(--s4); padding-bottom: var(--s4); }
  .nav-cta { margin-left: auto; text-align: right; }
  .wrap { width: calc(100% - 40px); }
  .hero { padding-top: var(--s8); }
  .section { padding: 72px 0; }
  .centered { text-align: left; }
  .button { width: 100%; }
  .desktop-note { margin-bottom: var(--s5); }
  .evidence-frame {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .evidence-frame picture { aspect-ratio: 16 / 10; order: 1; }
  .evidence-frame--hero img { height: 100%; object-position: center top; }
  .evidence-frame--stage img { object-position: center top; }
  .evidence-frame--original img { object-position: center top; }
  figcaption { order: 2; padding: 10px 4px 0; }
  .beta-form { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); border-left: 0; border-right: 0; border-radius: 0; padding: var(--s5) 20px; }
  .footer { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal,
  .reveal.reveal--pending,
  .reveal.reveal--visible { opacity: 1; transform: none; transition: none; }
}
