/* Build S48: the landing pages (the role pages, the industry pages, /ai-receptionist-cost and
   /missed-calls-calculator). They are the home page (index.html, body.page-home.page-landing) with their own
   sections in .page-sections (routes/pages.js). Loaded only on those pages, so the home page is unchanged.
   Takes over what css/role.css (retired) had for the table, the sources and the questions. */

.page-landing .page-eyebrow { margin-bottom: 12px; }
/* The role and industry h1s are longer than the home page's headline. */
.page-landing .hero-title { font-size: clamp(32px, 4.6vw, 60px); }
.page-landing .page-calc-hero { margin: 24px 0 8px; max-width: 960px; }

.page-landing .page-sec .h-section { margin-bottom: 24px; }
.page-landing .page-text { max-width: 720px; font-size: 17px; line-height: 1.55; margin: 0 0 14px; }
.page-landing .page-text a, .page-landing .role-roles a, .page-landing .role-sources a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.page-landing .page-cta { margin: 24px 0 0; }
.page-landing .page-calc { margin-top: 8px; }

.page-landing .role-does { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; margin: 0; list-style: none; }
.page-landing .role-does li { padding: 16px 18px; border-radius: 12px; background: var(--paper, #fff); border: 1px solid rgba(18, 19, 21, .1); font-size: 16px; line-height: 1.5; }
.page-landing .role-does strong { display: block; margin-bottom: 4px; }

.page-landing .role-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.page-landing .role-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.page-landing .role-table th, .page-landing .role-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid rgba(18, 19, 21, .12); }
.page-landing .role-table thead th { font-family: var(--font-mono, monospace); font-size: 13px; }
.page-landing .role-table tr.is-ours { background: rgba(255, 91, 26, .08); }
.page-landing .role-sources { font-size: 13px; opacity: .85; margin: 12px 0 0; padding-left: 18px; }
.page-landing .role-sources li { margin: 4px 0; }

.page-landing .role-faq { margin: 0; max-width: 760px; }
.page-landing .role-faq dt { font-weight: 600; margin-top: 18px; font-size: 17px; }
.page-landing .role-faq dd { margin: 6px 0 0; font-size: 16px; line-height: 1.55; }
.page-landing .role-roles { font-size: 16px; line-height: 1.55; margin: 0 0 10px; max-width: 760px; }

/* Build S49: /ai-vs-virtual-assistant. Four columns, so the table is wider than a phone: it scrolls sideways in its
   own box (.role-table-wrap) and the page itself never does. */
.page-landing .role-table-wrap { max-width: 100%; }
.page-landing .va-table { min-width: 760px; font-size: 14px; }
.page-landing .va-table thead th { min-width: 150px; }
.page-landing .va-table th.is-ours, .page-landing .va-table td.is-ours { background: rgba(255, 91, 26, .08); }
.page-landing .va-table tr.va-good td { font-style: italic; }
.page-landing .va-refs { white-space: nowrap; font-size: 12px; }
.page-landing .va-refs a { color: var(--orange-dark, #C2410C); text-decoration: none; }
.page-landing .va-sources { padding-left: 24px; }
.page-landing .va-hint { font-size: 15px; color: var(--text-3, #3B3D42); }
.page-landing .va-ours-note { margin-top: 14px; font-size: 15px; }
.page-landing .va-table-wrap:focus-visible { box-shadow: var(--focus); }

/* ===== Build S163 (Matt, 16 Nov 2026): the example is seen being converted =====
   js/landing-demo.js sets data-demo on #hx (the two cards) and on #hx-mini (the strip on phones and tablets):
   armed, scan, build, done or off. Only opacity, transform, filter, box-shadow and background move, so nothing
   changes size and the page never jumps. With reduced motion none of this applies and the page is as it was. */

/* The drop zone's note: the example is a generic role, drop your real one. */
.page-landing .dz-generic {
  display: block; max-width: 460px; margin: 0 auto 6px; padding: 10px 14px; border-radius: 12px;
  background: #FFF1E9; border: 1px solid rgba(194, 65, 12, .35);
  font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink); text-wrap: pretty;
}

/* The roles to pick from, over the role field. */
.page-landing .dz-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page-landing .dz-pick {
  appearance: none; min-height: 34px; padding: 7px 12px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.1; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.page-landing .dz-pick:hover { background: #FFF1E9; }
.page-landing .dz-pick[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.page-landing .dz-pick:focus-visible { outline: none; box-shadow: var(--focus); }
@media (max-width: 600px) {
  .page-landing .dz-pick { min-height: 38px; padding: 8px 12px; }
  .page-landing .dz-generic { padding: 8px 12px; font-size: 13px; }
}

/* The strip: the same example, small, where the cards stack (the AI card is far down the page there). */
.page-landing .hx-mini { display: none; }
@media (max-width: 900px) {
  .page-landing .hx-mini { display: block; max-width: 560px; margin-top: 16px; }
  .page-landing .hx-mini-label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
  .page-landing .hx-mini-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1.3fr); align-items: stretch; margin-top: 8px; }
  .page-landing .hx-mini-card { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 12px 14px; border-radius: 16px; overflow: hidden; }
  .page-landing .hx-mini-human { background: var(--paper); border: 1.5px dashed var(--ink); }
  .page-landing .hx-mini-ai { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 10px; align-content: center; background: var(--ink); color: var(--on-ink); border: 1.5px solid var(--ink); }
  .page-landing .hx-mini-face { position: relative; grid-row: 1 / span 3; align-self: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #2A2D32; }
  .page-landing .hx-mini-name { font-stretch: 125%; font-weight: 800; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
  .page-landing .hx-mini-role { font-size: 12px; line-height: 1.3; color: var(--text-3); }
  .page-landing .hx-mini-ai .hx-mini-role { color: var(--on-ink-2); }
  .page-landing .hx-mini-cost { font-size: 13px; font-weight: 700; line-height: 1.3; }
  .page-landing .hx-mini-ai .hx-mini-cost { color: var(--orange-light); }
  .page-landing .hx-mini-arrow { align-self: center; justify-self: center; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: var(--ink); }
  .page-landing .hx-mini-arrow svg { width: 15px; height: 15px; }
}

.page-landing .hx-arrow { position: relative; isolation: isolate; }

@media (prefers-reduced-motion: no-preference) {
  /* Before the script runs, the AI side is held back for 5 seconds at most, then shows whatever happens. */
  .page-landing .hx[data-state="idle"]:not([data-demo]) .hx-ai :is(.hx-face, .hx-ai-name, .hx-ai-role, .hx-chips.hx-ghost li, .hx-tasks-label, .hx-task-list.hx-ghost li, .hx-foot, .hx-save),
  .page-landing .hx-mini:not([data-demo]) .hx-mini-ai > * { animation: hxd-hold 5s steps(1, end); }

  /* Held back, frosted, until the conversion reaches it. */
  .page-landing .hx:is([data-demo="armed"], [data-demo="scan"]) .hx-ai :is(.hx-face, .hx-ai-name, .hx-ai-role, .hx-chips.hx-ghost li, .hx-tasks-label, .hx-task-list.hx-ghost li, .hx-foot, .hx-save),
  .page-landing .hx-mini:is([data-demo="armed"], [data-demo="scan"]) .hx-mini-ai > * { opacity: .26; filter: blur(6px); }

  /* Scan: a line reads down the human card, its name and salary light up as it passes, the arrow streams. */
  .page-landing .hx[data-demo="scan"] .hx-human::after,
  .page-landing .hx-mini[data-demo="scan"] .hx-mini-human::after {
    content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 91, 26, 0) 0, rgba(255, 91, 26, .12) 70%, rgba(255, 91, 26, .9) 97%, rgba(255, 91, 26, 0) 100%) no-repeat;
    background-size: 100% 180px; background-position: 0 -180px;
    animation: hxd-scan 1.4s cubic-bezier(.45, 0, .55, 1) forwards;
  }
  .page-landing .hx-mini[data-demo="scan"] .hx-mini-human::after { background-size: 100% 70px; background-position: 0 -70px; animation: hxd-scan-mini .9s cubic-bezier(.45, 0, .55, 1) forwards; }
  .page-landing .hx[data-demo="scan"] .hx-human .hx-person .hx-ghost { animation: hxd-read 1.1s ease; }
  .page-landing .hx[data-demo="scan"] .hx-human .hx-foot .hx-ghost { animation: hxd-read 1.1s ease .7s; }
  .page-landing .hx:is([data-demo="scan"], [data-demo="build"]) .hx-arrow { animation: hx-pulse 1.1s ease-in-out infinite; }
  .page-landing .hx:is([data-demo="scan"], [data-demo="build"]) .hx-arrow::before {
    content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: 84px; height: 4px; margin: -2px 0 0 -42px; border-radius: 2px;
    background: repeating-linear-gradient(90deg, var(--orange) 0 7px, rgba(255, 91, 26, 0) 7px 14px);
    animation: hxd-flow-x .35s linear infinite;
  }
  .page-landing .hx-mini:is([data-demo="scan"], [data-demo="build"]) .hx-mini-arrow { animation: hx-pulse 1s ease-in-out infinite; }
  .page-landing .hx:is([data-demo="scan"], [data-demo="build"]) .hx-ai-tag::after {
    content: "..."; display: inline-block; width: 0; overflow: hidden; vertical-align: bottom; white-space: nowrap;
    animation: hxd-dots 1s steps(4, end) infinite;
  }

  /* Build: each piece of the AI employee lands in turn (--hxd-at is when). */
  .page-landing .hx[data-demo="build"] .hx-ai :is(.hx-ai-name, .hx-ai-role, .hx-chips.hx-ghost li, .hx-tasks-label, .hx-task-list.hx-ghost li, .hx-foot, .hx-save),
  .page-landing .hx-mini[data-demo="build"] .hx-mini-ai > * { animation: hxd-in .6s cubic-bezier(.2, .8, .2, 1) var(--hxd-at, 0ms) backwards; }
  .page-landing .hx[data-demo="build"] .hx-ai .hx-face,
  .page-landing .hx-mini[data-demo="build"] .hx-mini-ai > .hx-mini-face { animation: hxd-pop .7s cubic-bezier(.2, .8, .2, 1) backwards; }
  .page-landing .hx .hx-ai-name { --hxd-at: 150ms; }
  .page-landing .hx .hx-ai-role { --hxd-at: 650ms; }
  .page-landing .hx .hx-chips.hx-ghost li:nth-child(1) { --hxd-at: 800ms; }
  .page-landing .hx .hx-chips.hx-ghost li:nth-child(2) { --hxd-at: 870ms; }
  .page-landing .hx .hx-chips.hx-ghost li:nth-child(3) { --hxd-at: 940ms; }
  .page-landing .hx .hx-chips.hx-ghost li:nth-child(4) { --hxd-at: 1010ms; }
  .page-landing .hx .hx-chips.hx-ghost li:nth-child(5) { --hxd-at: 1080ms; }
  .page-landing .hx .hx-tasks-label { --hxd-at: 1200ms; }
  .page-landing .hx .hx-task-list.hx-ghost li:nth-child(1) { --hxd-at: 1300ms; }
  .page-landing .hx .hx-task-list.hx-ghost li:nth-child(2) { --hxd-at: 1430ms; }
  .page-landing .hx .hx-task-list.hx-ghost li:nth-child(3) { --hxd-at: 1560ms; }
  .page-landing .hx .hx-ai .hx-foot { --hxd-at: 1750ms; }
  .page-landing .hx .hx-ai .hx-save { --hxd-at: 2000ms; }
  .page-landing .hx-mini .hx-mini-ai > .hx-mini-name { --hxd-at: 150ms; }
  .page-landing .hx-mini .hx-mini-ai > .hx-mini-role { --hxd-at: 650ms; }
  .page-landing .hx-mini .hx-mini-ai > .hx-mini-cost { --hxd-at: 900ms; }
  /* The name is typed (Bob, BobA, BobAI): a caret while it is. */
  .page-landing .hx-ai-name.is-typing .hx-ghost::after,
  .page-landing .hx-mini-ai.is-typing .hx-mini-name::after {
    content: ""; display: inline-block; width: 2px; height: .85em; margin-left: 3px; vertical-align: -.06em; background: var(--orange-light);
    animation: hxd-caret .5s steps(1, end) infinite;
  }

  /* Done: one glow on the AI employee, and the note in the drop zone says it is their turn. */
  .page-landing .hx[data-demo="done"] .hx-ai { animation: hxd-glow 1.4s ease-out; }
  .page-landing .hx-mini[data-demo="done"] .hx-mini-ai { animation: hxd-glow-mini 1.2s ease-out; }
  .page-landing .hx[data-demo="done"] .hx-ai-tag { animation: hxd-tag 1s ease; }
  .page-landing .hx[data-demo="done"] .hx-save-value { animation: hxd-tag 1s ease; }
  .page-landing .hx[data-demo="done"] .dz-generic { animation: hxd-nudge 1.5s ease .4s; }
}
/* On a phone the chips and tasks are not shown before a result, so the price and the saving land sooner
   (landing-demo.js counts the saving up at the same moment). */
@media (max-width: 600px) {
  .page-landing .hx .hx-ai .hx-foot { --hxd-at: 850ms; }
  .page-landing .hx .hx-ai .hx-save { --hxd-at: 1100ms; }
}
/* Where the cards stack, the arrow's stream runs down. */
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  .page-landing .hx:is([data-demo="scan"], [data-demo="build"]) .hx-arrow::before {
    width: 4px; height: 76px; margin: -38px 0 0 -2px;
    background: repeating-linear-gradient(180deg, var(--orange) 0 7px, rgba(255, 91, 26, 0) 7px 14px);
    animation-name: hxd-flow-y;
  }
}
@keyframes hxd-hold { from { opacity: .26; filter: blur(6px); } }
@keyframes hxd-in { from { opacity: .26; filter: blur(6px); transform: translateY(10px) scale(.98); } }
@keyframes hxd-pop {
  from { opacity: 0; filter: blur(4px); transform: scale(.5); }
  60% { opacity: 1; filter: blur(0); transform: scale(1.08); }
  to { transform: none; }
}
@keyframes hxd-scan { from { background-position: 0 -180px; } to { background-position: 0 calc(100% + 180px); } }
@keyframes hxd-scan-mini { from { background-position: 0 -70px; } to { background-position: 0 calc(100% + 70px); } }
@keyframes hxd-read { 25%, 65% { opacity: 1; } }
@keyframes hxd-flow-x { to { background-position: 14px 0; } }
@keyframes hxd-flow-y { to { background-position: 0 14px; } }
@keyframes hxd-dots { to { width: 2.3em; } }
@keyframes hxd-caret { 50% { opacity: 0; } }
@keyframes hxd-glow { from { box-shadow: 0 0 0 0 rgba(255, 91, 26, .6); } to { box-shadow: 0 0 0 24px rgba(255, 91, 26, 0); } }
@keyframes hxd-glow-mini { from { box-shadow: 0 0 0 0 rgba(255, 91, 26, .6); } to { box-shadow: 0 0 0 12px rgba(255, 91, 26, 0); } }
@keyframes hxd-tag { 30% { color: #FFFFFF; text-shadow: 0 0 14px rgba(255, 138, 92, .9); } }
@keyframes hxd-nudge { 20%, 60% { background: #FFD9C6; border-color: var(--orange-dark); box-shadow: 0 0 0 4px rgba(255, 91, 26, .18); } }

/* ===== Build S164 (Matt, 17 Nov 2026: "ok do it how you think"): on a landing page the role comes first =====
   A visitor from an ad rarely has a job description to hand, and the role is already filled in. So the card
   opens on the note, the picks, the role field and "Make my AI employee" (the orange button), and the file and
   the paste link follow as the second way in. The markup keeps the home page's order (the home page still shows
   it): here the paste link and the role form leave their wrapper (display: contents) and each part of the column
   is given its place. The whole card still takes a dropped file. */
.page-landing .dz-generic { order: 1; margin: 0 auto 14px; text-align: center; }
.page-landing .dz-alt:not([hidden]) { display: contents; }
.page-landing .dz-alt .dz-role { order: 2; align-self: center; margin-top: 0; text-align: center; }
.page-landing .dz-area .dropzone { order: 3; }
.page-landing .dz-alt .dz-paste-toggle { order: 4; align-self: center; }
.page-landing .dz-paste { order: 5; }
/* The note talks about the role field, which the paste box replaces. */
.page-landing .dz-area.is-pasting .dz-generic { display: none; }

/* "Make my AI employee" is the button to press: orange, full width. */
.page-landing .dz-role .dz-role-submit { align-self: stretch; min-height: 56px; margin-top: 6px; background: var(--orange); color: var(--ink); font-size: 18px; }
.page-landing .dz-role .dz-role-submit:hover { background: #ff6d33; color: var(--ink); }

/* The file: the second way in, under a line, with a plain button. */
.page-landing .dz-area .dropzone { margin-top: 20px; padding: 18px 8px 4px; gap: 8px; border-top: 1px solid var(--track); border-radius: 0; }
.page-landing .dz-area .dropzone .dz-title { font-size: 17px; }
.page-landing .dz-area .dropzone .dz-button { min-height: 44px; margin-top: 2px; padding: 0 22px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); font-size: 15px; }
.page-landing .dz-area .dropzone:hover .dz-button { background: #FFF1E9; }
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  .page-landing .dz-area .dropzone .dz-button { min-height: 48px; }
}
