:root {
  --ink: #101820;
  --paper: #f6f1e8;
  --red: #b2282e;
  --gold: #f2cb07;
  --green: #2f6f68;
  --graphite: #2b323b;
  --muted: #667085;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 28px; color: white; }
.brand span:last-child { color: #e12f37; }
.brand.dark { color: var(--ink); }
.mark { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 3px solid #d92730; border-radius: 12px; color: white; background: rgba(16,24,32,.7); }
.brand.dark .mark { color: white; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 7px; font-weight: 800; border: 1px solid transparent; cursor: pointer; }
.button.primary { background: #d3222b; color: white; box-shadow: 0 14px 34px rgba(178,40,46,.28); }
.button.ghost { border-color: rgba(255,255,255,.65); color: white; background: rgba(16,24,32,.22); backdrop-filter: blur(10px); }
.button.full { width: 100%; }
.button-row { display: flex; gap: 16px; flex-wrap: wrap; }
.button-row.center { justify-content: center; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--green); font-size: 12px; font-weight: 900; }

.hero { position: relative; min-height: 100vh; overflow: hidden; color: white; background: var(--ink); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .86; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,10,18,.9), rgba(5,10,18,.35), rgba(5,10,18,.2)); }
.topbar { position: relative; z-index: 1; height: 100px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; }
.navlinks { display: flex; align-items: center; gap: 36px; font-size: 18px; font-weight: 600; }
.nav-button { background: #d3222b; color: white; padding: 17px 28px; border-radius: 7px; }
.hero-copy { position: relative; z-index: 1; max-width: 760px; margin: 12vh 0 0 5vw; }
.hero h1 { margin: 0; font-size: clamp(58px, 8vw, 124px); line-height: .93; letter-spacing: 0; }
.hero h1 span { color: #df202a; display: block; }
.hero p { max-width: 680px; font-size: clamp(21px, 2vw, 32px); line-height: 1.35; }

main > section { padding: 110px 6vw; }
.paper-section { position: relative; display: grid; grid-template-columns: .9fr 1.3fr; gap: 60px; background: var(--paper); }
.paper-section h2, .dark-showcase h2, .mobile-proof h2, .routing-section h2, .pricing h2 { margin: 0 0 18px; font-size: clamp(38px, 5vw, 78px); line-height: 1; letter-spacing: 0; }
.side-note { writing-mode: vertical-rl; position: absolute; left: 24px; top: 80px; color: var(--muted); font-size: 13px; }
.route-line { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: end; }
.route-line div { border-top: 3px solid var(--red); padding-top: 24px; }
.route-line strong { display: block; color: var(--gold); font-size: 56px; }
.route-line span { font-weight: 800; font-size: 20px; }

.dark-showcase { display: grid; grid-template-columns: 1.4fr .8fr; gap: 60px; color: white; background: radial-gradient(circle at 20% 20%, #243541, var(--ink) 58%); }
.showcase-panel { position: relative; min-height: 420px; }
.portal-preview, .queue-card, .table-card, .auth-card, .thanks-card, .review-card { border-radius: 8px; background: white; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.16); }
.portal-preview { padding: 26px; }
.portal-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 16px; padding: 18px; border-bottom: 1px solid #e8e4dc; }
.portal-row.head { color: var(--muted); font-size: 13px; text-transform: uppercase; font-weight: 900; }
.ok { color: var(--green); } .warn { color: var(--red); }
.queue-card { position: absolute; right: 0; bottom: 0; padding: 24px; width: 280px; }
.section-copy p:not(.eyebrow), .routing-section p, .pricing p, .mobile-proof p { color: inherit; font-size: 20px; line-height: 1.55; }
.section-copy a { color: var(--gold); font-weight: 900; }

.mobile-proof { text-align: center; color: white; background: linear-gradient(135deg, var(--graphite), var(--ink)); }
.mobile-proof p { max-width: 760px; margin: 0 auto 42px; color: rgba(255,255,255,.78); }
.phone-strip { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.phone-card { width: 250px; min-height: 420px; border: 10px solid #05070a; border-radius: 34px; background: #fffaf2; color: var(--ink); padding: 34px 22px; text-align: left; font-weight: 900; box-shadow: 0 20px 70px rgba(0,0,0,.4); }
.phone-card span { display: block; margin-top: 22px; color: var(--muted); font-weight: 600; }
.signature-demo em { display: block; margin-top: 120px; font-family: cursive; font-size: 38px; font-weight: 400; }
.phone-card.success { background: #f8fff9; }

.routing-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; background: linear-gradient(90deg, var(--paper) 0 76%, var(--red) 76%); }
.rating-map { background: white; border-radius: 8px; padding: 40px; box-shadow: 0 20px 60px rgba(16,24,32,.14); }
.stars { font-size: 62px; color: var(--gold); letter-spacing: 4px; }
.split-paths { display: grid; gap: 14px; margin: 24px 0; font-weight: 800; }
textarea, input { width: 100%; border: 1px solid #d7d2ca; border-radius: 7px; padding: 14px 16px; background: #fffefa; }

.pricing { text-align: center; color: white; background: linear-gradient(180deg, var(--ink), #17232e); }
.pricing > p { max-width: 820px; margin: 0 auto 34px; color: rgba(255,255,255,.74); }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 20px; margin: 34px 0; }
.plans article { text-align: left; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; padding: 28px; background: rgba(255,255,255,.06); }
.plans strong { font-size: 42px; color: var(--gold); }
.pricing footer { margin-top: 34px; color: rgba(255,255,255,.58); }

.portal-bg { background: #f3efe7; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: white; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.sidebar .brand { margin-bottom: 24px; font-size: 22px; }
.sidebar a, .sidebar button { color: white; background: transparent; border: 0; text-align: left; padding: 10px 0; cursor: pointer; font-weight: 700; }
.portal-main { padding: 42px; }
.portal-main.narrow { max-width: 860px; }
.portal-main.standalone { margin: 0 auto; }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.portal-head h1, .portal-main h1 { margin: 0 0 24px; font-size: clamp(34px, 4vw, 58px); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin-bottom: 24px; }
.metrics article { background: white; border-radius: 8px; padding: 24px; box-shadow: 0 10px 30px rgba(16,24,32,.08); }
.metrics span { color: var(--muted); font-size: 13px; text-transform: uppercase; font-weight: 900; }
.metrics strong { display: block; font-size: 42px; }
.table-card { padding: 24px; margin-bottom: 24px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px; border-bottom: 1px solid #eee7dc; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.settings-form p { display: grid; gap: 7px; }

.auth-shell, .center-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card, .thanks-card, .review-card { width: min(100%, 520px); padding: 34px; }
.auth-card h1, .thanks-card h1, .review-card h1 { margin: 24px 0; font-size: 42px; line-height: 1; }
.auth-card label { display: grid; gap: 8px; margin-bottom: 16px; font-weight: 800; }
.success-dot { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--green); font-size: 32px; }

.waiver-bg, .review-bg { background: linear-gradient(145deg, var(--ink), var(--graphite)); }
.waiver-shell { min-height: 100vh; display: grid; grid-template-columns: .85fr 1.15fr; gap: 34px; padding: 42px; }
.waiver-brand { color: white; position: sticky; top: 42px; align-self: start; }
.waiver-brand img { max-width: 240px; max-height: 150px; object-fit: contain; }
.tenant-logo { width: 110px; height: 110px; border-radius: 24px; display: grid; place-items: center; background: var(--tenant-primary); color: white; font-size: 54px; font-weight: 900; }
.waiver-brand h1 { font-size: clamp(42px, 5vw, 78px); line-height: 1; margin: 28px 0 14px; }
.waiver-card { background: var(--paper); padding: 28px; border-radius: 8px; box-shadow: 0 30px 100px rgba(0,0,0,.3); }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field-grid label { display: grid; gap: 7px; font-weight: 800; }
.waiver-text { max-height: 360px; overflow: auto; padding: 20px; margin: 24px 0; border: 1px solid #ddd4c7; border-radius: 8px; background: white; line-height: 1.6; }
.checkline { display: flex; gap: 10px; margin: 12px 0; align-items: flex-start; font-weight: 700; }
.checkline input { width: auto; margin-top: 4px; }
.signature-box { margin: 24px 0; background: white; border-radius: 8px; border: 1px solid #ddd4c7; overflow: hidden; }
.signature-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #eee7dc; }
.signature-head button { border: 0; background: transparent; color: var(--red); font-weight: 900; cursor: pointer; }
#signature-canvas { display: block; width: 100%; height: 220px; touch-action: none; background: #fff; }
.form-errors, .error { color: var(--red); font-weight: 800; }
.signature-image { width: 100%; max-width: 620px; border: 1px solid #ddd; background: white; }
.star-picker { display: flex; justify-content: center; gap: 8px; }
.star-picker button { border: 0; background: transparent; color: var(--gold); font-size: clamp(42px, 9vw, 78px); cursor: pointer; line-height: 1; }

@media (max-width: 860px) {
  .topbar { height: auto; padding: 22px; align-items: flex-start; }
  .navlinks { gap: 14px; font-size: 14px; }
  .navlinks a:not(.nav-button) { display: none; }
  .hero-copy { margin: 12vh 22px 0; }
  .paper-section, .dark-showcase, .routing-section, .waiver-shell, .app-shell { grid-template-columns: 1fr; }
  .route-line, .plans, .metrics { grid-template-columns: 1fr; }
  .side-note { display: none; }
  .field-grid { grid-template-columns: 1fr; }
  .waiver-shell { padding: 18px; }
  .waiver-brand { position: static; }
  .sidebar { min-height: auto; }
  main > section { padding: 72px 22px; }
}
