/* ═══════════════════════════════════════════════════
   pages.css  —  Finsight Core shared inner-page styles
   Loaded on every inner page (not home).
   ═══════════════════════════════════════════════════ */

/* ── PAGE HERO (used on all inner pages) ── */
.page-hero {
  padding: calc(var(--offset) + 64px) 5% 72px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, black, transparent 75%);
  opacity: 0.4;
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 20px;
}

.page-eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--signal);
}

.page-h1 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -2px;
  color: var(--white);
  margin-bottom: 20px;
}

.page-h1 em { font-style: italic; color: var(--signal); }

.page-lead {
  font-size: 17px;
  color: rgba(200, 214, 255, 0.65);
  line-height: 1.8;
  max-width: 560px;
  font-weight: 400;
}

/* ── INNER PAGE WRAPPER ── */
.page-wrap { padding: 80px 5%; }

.page-section { margin-bottom: 80px; }
.page-section:last-child { margin-bottom: 0; }

/* ── SECTION HEADINGS (inner) ── */
.inner-h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--white);
  margin-bottom: 14px;
}

.inner-h2 em { font-style: italic; color: var(--signal); }

.inner-h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.inner-p {
  font-size: 15px;
  color: rgba(200, 214, 255, 0.65);
  line-height: 1.8;
  margin-bottom: 16px;
}

.inner-p:last-child { margin-bottom: 0; }

/* ── TWO-COLUMN PROSE LAYOUT ── */
.prose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.prose-grid.flip { direction: rtl; }
.prose-grid.flip > * { direction: ltr; }

/* ── INFO CARD GRID ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
}

.info-card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.3s;
}

.info-card:hover {
  border-color: rgba(79, 255, 176, 0.18);
  transform: translateY(-3px);
}

.info-card-icon {
  font-size: 28px;
  margin-bottom: 16px;
  display: block;
}

.info-card-h {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.info-card-p {
  font-size: 13px;
  color: rgba(200, 214, 255, 0.55);
  line-height: 1.72;
}

/* ── TIMELINE / STEPS ── */
.timeline { display: flex; flex-direction: column; gap: 0; }

.tl-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding-bottom: 36px;
  position: relative;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-item:not(:last-child) .tl-line::after {
  content: '';
  position: absolute;
  top: 48px;
  left: 23px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.tl-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink3);
  border: 1px solid var(--line2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--signal);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.tl-body { padding-top: 10px; }
.tl-h { font-size: 17px; font-weight: 600; color: var(--white); margin-bottom: 8px; }
.tl-p { font-size: 14px; color: rgba(200, 214, 255, 0.58); line-height: 1.74; }

/* ── SIGNAL TYPE DETAIL CARDS ── */
.sig-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 40px;
}

.sig-type-card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  transition: border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.sig-type-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.sig-type-card:hover { border-color: rgba(79, 255, 176, 0.2); }
.sig-type-card:hover::before { transform: scaleX(1); }

.sig-type-card.full { grid-column: 1 / -1; }

.stc-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.stc-h {
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.stc-p {
  font-size: 14px;
  color: rgba(200, 214, 255, 0.58);
  line-height: 1.74;
  margin-bottom: 20px;
}

.stc-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.stc-tag {
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  background: var(--ink3);
  border: 1px solid var(--line);
  color: rgba(200, 214, 255, 0.6);
}

/* ── ACCURACY METRICS ── */
.acc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}

.acc-metric-card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}

.acc-metric-val {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 400;
  color: var(--white);
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 6px;
}

.acc-metric-val span { color: var(--signal); }
.acc-metric-lbl { font-size: 11px; color: rgba(200, 214, 255, 0.45); letter-spacing: 0.8px; text-transform: uppercase; }

/* ── PRICING TOGGLE ── */
.pricing-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
}

.pricing-toggle-label {
  font-size: 14px;
  color: rgba(200, 214, 255, 0.6);
}

.pricing-toggle-label.active { color: var(--white); font-weight: 600; }

.toggle-switch {
  width: 48px;
  height: 26px;
  background: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch.on { background: rgba(79, 255, 176, 0.15); border-color: var(--line2); }

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--paper);
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch.on .toggle-thumb {
  transform: translateX(22px);
  background: var(--signal);
}

.pricing-save-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--signal);
  background: rgba(79, 255, 176, 0.1);
  border: 1px solid var(--line2);
  border-radius: 20px;
  padding: 3px 10px;
}

/* ── TEAM GRID ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 40px;
}

.team-card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.team-card:hover { border-color: rgba(79, 255, 176, 0.18); transform: translateY(-3px); }

.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: white;
  font-family: 'Space Grotesk', sans-serif;
}

.team-name { font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.team-role { font-size: 12px; color: rgba(200, 214, 255, 0.5); margin-bottom: 12px; }
.team-bio  { font-size: 12px; color: rgba(200, 214, 255, 0.45); line-height: 1.65; }

/* ── VALUE PILLS (about page) ── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
}

.value-card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
}

.value-num {
  font-family: 'Instrument Serif', serif;
  font-size: 40px;
  font-weight: 400;
  color: rgba(79, 255, 176, 0.15);
  line-height: 1;
  margin-bottom: 12px;
}

.value-h { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 8px; }
.value-p { font-size: 13px; color: rgba(200, 214, 255, 0.55); line-height: 1.7; }

/* ── FAQ ACCORDION ── */
.faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 40px; }

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:first-child { border-top: 1px solid var(--line); }

.faq-q {
  width: 100%;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  text-align: left;
  transition: color 0.2s;
}

.faq-q:hover { color: var(--signal); }

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--ink3);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--signal);
  transition: transform 0.3s, background 0.2s;
}

.faq-item.open .faq-icon { transform: rotate(45deg); background: rgba(79, 255, 176, 0.1); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 14px;
  color: rgba(200, 214, 255, 0.6);
  line-height: 1.78;
}

.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: 20px;
}

/* ── CONTACT FORM ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 28px; }

.contact-info-item { display: flex; gap: 14px; align-items: flex-start; }

.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(79, 255, 176, 0.06);
  border: 1px solid var(--line2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.contact-info-h { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.contact-info-p { font-size: 13px; color: rgba(200, 214, 255, 0.5); }

.form-card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-label { font-size: 12px; font-weight: 600; color: rgba(200, 214, 255, 0.7); letter-spacing: 0.3px; }

.form-input,
.form-select,
.form-textarea {
  padding: 11px 14px;
  background: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--white);
  font-size: 14px;
  font-family: 'Space Grotesk', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--line2); }

.form-input::placeholder,
.form-textarea::placeholder { color: rgba(200, 214, 255, 0.3); }

.form-select { appearance: none; cursor: pointer; }
.form-select option { background: var(--ink3); }

.form-textarea { resize: vertical; min-height: 120px; }

.btn-submit {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: var(--signal);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: background 0.2s, transform 0.2s;
  margin-top: 8px;
}

.btn-submit:hover { background: var(--signal3); transform: translateY(-1px); }

/* ── BLOG GRID ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.blog-card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  cursor: pointer;
}

.blog-card:hover { border-color: rgba(79, 255, 176, 0.18); transform: translateY(-3px); }

.blog-card-img {
  height: 160px;
  background: var(--ink3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  border-bottom: 1px solid var(--line);
}

.blog-card-body { padding: 20px; }
.blog-tag { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--signal); margin-bottom: 10px; }
.blog-title { font-size: 16px; font-weight: 600; color: var(--white); line-height: 1.4; margin-bottom: 10px; letter-spacing: -0.2px; }
.blog-excerpt { font-size: 13px; color: rgba(200, 214, 255, 0.55); line-height: 1.65; margin-bottom: 16px; }
.blog-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: rgba(200, 214, 255, 0.4); }
.blog-read-link { color: var(--signal); font-weight: 600; font-size: 12px; text-decoration: none; }
.blog-read-link:hover { color: var(--signal3); }

/* ── CAREER LISTINGS ── */
.career-dept { margin-bottom: 44px; }
.career-dept-title { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(200, 214, 255, 0.45); margin-bottom: 14px; }

.job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
  flex-wrap: wrap;
}

.job-card:hover { border-color: rgba(79, 255, 176, 0.2); }
.job-title { font-size: 15px; font-weight: 600; color: var(--white); }
.job-meta  { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.job-tag   { font-size: 11px; padding: 3px 9px; border-radius: 5px; background: var(--ink3); border: 1px solid var(--line); color: rgba(200, 214, 255, 0.6); }

.btn-apply {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--signal);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.btn-apply:hover { background: rgba(79, 255, 176, 0.08); }

/* ── CHANGELOG ── */
.changelog-list { display: flex; flex-direction: column; gap: 0; }

.cl-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.cl-item:first-child { padding-top: 0; }
.cl-item:last-child  { border-bottom: none; }

.cl-date { font-family: 'DM Mono', monospace; font-size: 12px; color: rgba(200, 214, 255, 0.4); padding-top: 4px; }

.cl-version {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--signal);
  background: rgba(79, 255, 176, 0.08);
  border: 1px solid var(--line2);
  border-radius: 5px;
  padding: 2px 9px;
  margin-bottom: 10px;
}

.cl-title { font-size: 18px; font-weight: 600; color: var(--white); margin-bottom: 10px; letter-spacing: -0.2px; }
.cl-desc  { font-size: 14px; color: rgba(200, 214, 255, 0.6); line-height: 1.72; margin-bottom: 14px; }

.cl-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-tag  { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; }
.cl-tag.feature { background: rgba(79, 255, 176, 0.08); color: var(--signal); }
.cl-tag.fix     { background: rgba(255, 184, 77, 0.08);  color: var(--amber); }
.cl-tag.perf    { background: rgba(200, 214, 255, 0.05); color: var(--ice2); }

/* ── API ACCESS PAGE ── */
.api-endpoint {
  background: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}

.api-ep-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.api-method {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
}

.api-method.get  { background: rgba(79, 255, 176, 0.1); color: var(--signal); }
.api-method.post { background: rgba(255, 184, 77, 0.1);  color: var(--amber); }

.api-path {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--paper);
}

.api-ep-desc { padding: 14px 18px; font-size: 13px; color: rgba(200, 214, 255, 0.6); line-height: 1.65; }

/* ── LEGAL PAGES (Privacy, Terms, Disclosures) ── */
.legal-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 80px 5%;
}

.legal-wrap .inner-h2 { margin-top: 44px; margin-bottom: 12px; font-size: 22px; }
.legal-wrap .inner-h2:first-child { margin-top: 0; }
.legal-wrap .inner-p  { font-size: 15px; }

.legal-wrap ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-left: 4px;
}

.legal-wrap ul li {
  font-size: 15px;
  color: rgba(200, 214, 255, 0.6);
  line-height: 1.75;
  padding-left: 16px;
  position: relative;
}

.legal-wrap ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--signal);
}

/* ── CTA STRIP (shared bottom CTA on inner pages) ── */
.page-cta-strip {
  background: var(--ink2);
  border-top: 1px solid var(--line);
  padding: 72px 5%;
  text-align: center;
}

.page-cta-strip .inner-h2 { margin-bottom: 12px; }
.page-cta-strip .inner-p  { max-width: 440px; margin: 0 auto 32px; }

.page-cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── NAV ACTIVE STATE ── */
.nav-active {
  color: var(--white) !important;
  position: relative;
}

.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--signal);
  border-radius: 1px;
}

/* ════════════════════════════════════════
   PAGES RESPONSIVE
   ════════════════════════════════════════ */

@media (max-width: 1024px) {
  .team-grid      { grid-template-columns: repeat(2, 1fr); }
  .info-grid      { grid-template-columns: repeat(2, 1fr); }
  .acc-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .prose-grid     { grid-template-columns: 1fr; gap: 40px; }
  .sig-type-grid  { grid-template-columns: 1fr; }
  .contact-grid   { grid-template-columns: 1fr; gap: 40px; }
  .blog-grid      { grid-template-columns: repeat(2, 1fr); }
  .values-grid    { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .page-hero { padding: calc(var(--offset) + 40px) 4% 52px; }
  .page-wrap { padding: 56px 4%; }

  .info-grid      { grid-template-columns: 1fr; }
  .team-grid      { grid-template-columns: repeat(2, 1fr); }
  .blog-grid      { grid-template-columns: 1fr; }
  .values-grid    { grid-template-columns: 1fr; }
  .acc-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .cl-item        { grid-template-columns: 1fr; gap: 8px; }
  .form-row       { grid-template-columns: 1fr; }
  .page-cta-btns  { flex-direction: column; align-items: center; }
  .sig-type-card.full { grid-column: 1; }
}

@media (max-width: 480px) {
  .team-grid      { grid-template-columns: 1fr; }
  .acc-metrics-grid { grid-template-columns: 1fr 1fr; }
  .form-card      { padding: 24px 20px; }
}
