/* TrustBnB website. Builds on site.css (the documentation styles): same tokens, top bar,
   buttons, badge and footer; adds the marketing sections and the interactive figures. */

:root {
  --s1: #7c5cff; /* Realistic curve */
  --s2: #1a9c8a; /* Strict curve */
  --grid: #ebe8f3;
}
@media (prefers-color-scheme: dark) {
  :root { --s1: #8a70ff; --s2: #22a08c; --grid: #262148; }
}

.site-nav { display: flex; align-items: center; gap: 22px; margin-left: 28px; }
.site-nav a { color: var(--lavender); text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: #fff; }

.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }
.section { padding: 88px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section h2, .page-head h1, .closing h2 { margin: 0 0 18px; font: 800 clamp(30px, 4vw, 44px)/1.08 var(--display); letter-spacing: -0.035em; }
.section h3 { font: 700 20px/1.3 var(--display); letter-spacing: -0.015em; margin: 1.6em 0 0.5em; }
.section p, .section li { color: var(--text-2); font-size: 17.5px; line-height: 1.65; }
.section p { margin: 0 0 1em; max-width: 40em; }
.section b, .section strong { color: var(--text); }
.kicker, .step-num { margin: 0 0 12px; color: var(--link); font: 700 13px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.more { font-weight: 650; text-decoration: none; }
.more:hover { text-decoration: underline; }

.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: center; }

/* Hero figures */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { padding: 22px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.section.alt .stat { background: var(--page); }
.stat-label { margin: 0 0 8px !important; font-size: 14.5px !important; line-height: 1.4 !important; }
.stat-value { margin: 0 !important; color: var(--text) !important; font: 650 56px/1 var(--body) !important; letter-spacing: -0.03em; }
.stat:first-child { background: var(--ink); border-color: var(--ink); }
.stat:first-child .stat-label { color: var(--lavender) !important; }
.stat:first-child .stat-value { color: var(--lime) !important; }
.source { grid-column: 1 / -1; margin: 4px 0 0 !important; font-size: 13px !important; line-height: 1.5 !important; }

/* Before/after mock of a search result */
.showcase { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 40px 0 44px; }
.showcase-arrow { color: var(--text-2); font-size: 28px; }
.mock { margin: 0; }
.mock figcaption { margin-top: 12px; text-align: center; color: var(--text-2); font-size: 14px; font-weight: 600; }
.mock-card { width: 300px; padding: 12px; border-radius: 18px; background: #fff; color: #222; box-shadow: 0 10px 30px rgb(21 18 43 / 0.1); border: 1px solid #ece9f2; font: 14.5px/1.4 system-ui, sans-serif; }
.mock-photo { height: 180px; margin-bottom: 12px; border-radius: 12px; background: linear-gradient(135deg, hsl(var(--hue) 55% 82%), hsl(calc(var(--hue) + 30) 40% 62%)); }
.mock-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mock-rating { font-weight: 500; }
.mock-sub { color: #6a6a6a; margin-top: 2px; }

.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section .card p { font-size: 15.5px; }
.section .card h3 { margin-top: 0; }

/* Three steps */
.steps-row { counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 32px 0 24px; padding: 0; list-style: none; }
.steps-row li { counter-increment: step; padding: 26px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.steps-row li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 16px; border-radius: 50%; background: var(--ink); color: var(--lime); font: 800 16px/1 var(--display); }
.steps-row h3 { margin: 0 0 8px; }
.steps-row p { margin: 0; font-size: 15.5px; }

/* Check lists */
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; color: var(--text) !important; font-weight: 550; }
.checks li::before { content: ''; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); }
.checks li::after { content: ''; position: absolute; left: 7.5px; top: 8px; width: 6px; height: 10px; border: solid var(--lime); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* FAQ */
.faq { border-bottom: 1px solid var(--line); }
.faq summary { padding: 18px 0; cursor: pointer; list-style: none; font: 700 18px/1.35 var(--display); color: var(--text); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--link); font-weight: 700; }
.faq[open] summary::after { content: '–'; }
.faq p { margin: 0 0 18px; }

/* Closing call to action */
.closing { padding: 80px 0; background: radial-gradient(120% 160% at 50% 0%, #2b2160 0%, var(--ink) 60%); color: #fff; text-align: center; }
.closing h2 { margin-bottom: 28px; }

/* Page header (inner pages) */
.page-head { padding: 72px 0 8px; }
.page-head .lead { color: var(--text-2); font-size: 19.5px; line-height: 1.6; margin: 0; }

/* Interactive figures */
.widget { margin: 28px 0 8px; padding: 22px 22px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.section.alt .widget { background: var(--page); }
.controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 28px; margin-bottom: 8px; }
.controls label { display: grid; gap: 6px; color: var(--text); font-size: 14.5px; font-weight: 650; }
.controls label.wide { flex: 1; min-width: 240px; }
.controls .value { color: var(--link); font-weight: 750; }
.controls input[type='number'] { width: 110px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); color: var(--text); font: 600 16px var(--body); }
.controls input[type='range'] { width: min(280px, 100%); accent-color: var(--iris); }
.controls label.wide input[type='range'] { width: 100%; }
.assume { margin: 0 !important; font-size: 14.5px !important; }
.readout { margin: 6px 0 0 !important; color: var(--text) !important; font-size: 16px !important; }
.readout .badge { margin: 0 2px; }

.figure { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--body); }
.figure .axis { stroke: var(--text-2); stroke-width: 1; opacity: 0.5; }
.figure .grid { stroke: var(--grid); stroke-width: 1; }
.figure .tick { fill: var(--text-2); font-size: 12.5px; }
.figure .label { fill: var(--text); font-size: 13.5px; font-weight: 650; }
.figure .note { fill: var(--text-2); font-size: 12.5px; }
.figure .mean { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: none; }
.figure .pull { stroke: var(--s1); stroke-width: 2; stroke-linecap: round; opacity: 0.45; }
.figure .dot { stroke: var(--surface); stroke-width: 2; }
.figure .dot.raw { fill: var(--text-2); }
.figure .dot.adjusted { fill: var(--s1); }
.figure .curve { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.figure .curve.s1 { stroke: var(--s1); }
.figure .curve.s2 { stroke: var(--s2); }
.figure .marker { stroke: var(--surface); stroke-width: 2; }
.figure .marker.s1 { fill: var(--s1); }
.figure .marker.s2 { fill: var(--s2); }
.figure .crosshair { stroke: var(--text-2); stroke-width: 1; opacity: 0.6; }
.figure .hit { fill: transparent; cursor: crosshair; touch-action: pan-y; }
.section.alt .figure .dot, .section.alt .figure .marker { stroke: var(--page); }

.legend { display: flex; gap: 18px; margin: 10px 0 2px; color: var(--text); font-size: 14px; font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.key { display: inline-block; width: 16px; height: 0; border-top: 2px solid; border-radius: 2px; }
.key.s1 { border-color: var(--s1); }
.key.s2 { border-color: var(--s2); }
.chart-box { position: relative; }
.tooltip { position: absolute; z-index: 2; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; line-height: 1.5; box-shadow: 0 8px 24px rgb(21 18 43 / 0.25); pointer-events: none; }
.tooltip .tip-head { color: var(--lavender); font-size: 12.5px; margin-bottom: 4px; }
.tooltip div { display: flex; align-items: center; gap: 8px; }
.tooltip b { color: #fff; font-size: 15px; min-width: 2em; }
.tooltip .key.s1 { border-color: #a995ff; }
.tooltip .key.s2 { border-color: #3cc4ad; }
.table-view { margin-top: 14px; }
.table-view summary { cursor: pointer; color: var(--link); font-weight: 650; font-size: 14.5px; }
.table-view table { margin-top: 12px; }

.rank-strip { margin: 26px 0 6px; }
.rank-bar { height: 14px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 999px 4px 4px 999px; background: var(--s1); }
.rank-labels { display: flex; justify-content: space-between; margin-top: 8px; color: var(--text-2); font-size: 13.5px; }
.rank-labels span:nth-child(2) { margin-left: 46%; color: var(--text); font-weight: 650; }

/* Privacy policy page */
.policy { padding: 64px 0 88px; }

@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .cards.three, .steps-row { grid-template-columns: 1fr; }
  .showcase { flex-direction: column; gap: 14px; }
  .showcase-arrow { transform: rotate(90deg); }
}
@media (max-width: 720px) {
  .site-nav { gap: 14px; margin-left: 12px; }
  .site-nav a:not(.keep) { display: none; }
  .section { padding: 64px 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 44px !important; }
  .mock-card { width: min(300px, calc(100vw - 40px)); }
  .rank-labels span:nth-child(2) { margin-left: 0; }
  /* The charts scale down with the screen: keep their text readable. */
  .figure .tick, .figure .note { font-size: 21px; }
  .figure .label { font-size: 22px; }
}
