/* Agent pages (clickcraft.io/agents/<slug>/). Loaded after styles.css, which supplies the brand colours,
   type, buttons, header, booking band, footer and motion. Built 2026-11-15. */

.eyebrow { font-size: 14px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--red); margin-bottom: 18px; }
.ap-sec { padding: clamp(80px, 9vw, 140px) 0; }
.ap-two { display: grid; grid-template-columns: 5fr 6fr; gap: 6vw; align-items: start; }

/* ---------- hero: the red field, copy left, phone right ---------- */
.agent-hero { min-height: 0; padding: 150px var(--gutter) 110px; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.agent-hero h1 { font-size: clamp(44px, 5.4vw, 92px); line-height: .98; max-width: 15ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; opacity: .9; margin-bottom: 26px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ap-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.ap-tags .agent-name { margin: 0; color: var(--white); border-color: rgba(255, 255, 255, .7); }
.ap-tag { font-size: 14px; line-height: 1; padding: 6px 10px; background: var(--white); color: var(--red); font-weight: 500; letter-spacing: .02em; }
.agent-hero .hero-art { justify-content: center; }
/* the homepage hero splits its copy across grid rows (display: contents); here the copy stays one block */
.agent-hero .hero-copy { display: block; grid-column: 1; grid-row: 1; }
.agent-hero h1, .agent-hero .lede, .agent-hero .actions { grid-column: auto; grid-row: auto; }
.agent-hero .hero-art { grid-column: 2; grid-row: 1; align-self: center; }

/* ---------- the phone conversation ---------- */
.phone { width: 100%; max-width: 400px; margin: 0; }
.phone-body { background: var(--white); color: var(--navy); border-radius: 34px; padding: 22px 20px 20px; box-shadow: 0 40px 80px -30px rgba(3, 6, 22, .55), 0 0 0 1px rgba(3, 6, 22, .06);
  min-height: 540px; display: flex; flex-direction: column; }
.phone-head { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 4px 4px 16px; border-bottom: 1px solid #ececf0; }
.phone-ic { width: 44px; height: 44px; display: grid; place-items: center; background: #fff0ec; color: var(--red); border-radius: 12px; }
.phone-ic .ic { width: 22px; height: 22px; }
.phone-title { font-size: 16px; font-weight: 500; line-height: 1.2; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-soft); }
.live i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(255, 61, 25, .5); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 61, 25, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 25, 0); } }
.msgs { display: flex; flex-direction: column; gap: 10px; padding: 18px 0 14px; flex: 1; }
.msg { max-width: 86%; padding: 12px 15px; font-size: 16px; line-height: 1.38; border-radius: 18px; }
.msg.them { align-self: flex-start; background: var(--grey); border-bottom-left-radius: 6px; }
.msg.bot { align-self: flex-end; background: var(--navy); color: var(--white); border-bottom-right-radius: 6px; }
.msg.typing { display: none; }
.done { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; background: #fff0ec; border-radius: 14px; font-size: 15px; font-weight: 500; line-height: 1.35; }
.done .tick { flex: none; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--red); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.phone figcaption { margin-top: 14px; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .85); }
.replay { margin-left: 10px; background: none; border: 0; padding: 0; color: var(--white); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* played out one message at a time (agent-page.js); without motion everything simply shows.
   Messages not yet sent take no space, so each one arrives at the bottom like a real chat. */
.js .phone .msg:not(.typing):not(.shown) { display: none; }
.js .phone .msg.shown { animation: msg-in .55s var(--ease-out) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.97); filter: blur(4px); } }
.js .phone .done { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease-out), transform .6s var(--ease-out); }
.js .phone .done.shown { opacity: 1; transform: none; }
.js .phone .msg.typing.on { display: inline-flex; gap: 4px; align-self: var(--side, flex-end); background: var(--grey); padding: 14px 16px; animation: msg-in .35s var(--ease-out) both; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a9cab; animation: dots 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---------- where it leaks ---------- */
.ap-leak h2 { max-width: 16ch; }
.pains li { display: grid; grid-template-columns: 30px 1fr; gap: 16px; align-items: start; padding: 24px 0; border-bottom: 1px solid #c9cad0; font-size: 21px; line-height: 1.35; }
.pains li:first-child { border-top: 1.5px solid var(--navy); }
.pains .x { width: 26px; height: 26px; margin-top: 2px; fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; }

/* ---------- what it does: navy, numbered ---------- */
.ap-handles { background: var(--navy); color: var(--white); }
.ap-handles h2 { max-width: 20ch; }
.handles { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255, 255, 255, .18); }
.handles li { padding: 34px 34px 40px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.handles li:not(:nth-child(3n + 1)) { padding-left: 34px; border-left: 1px solid rgba(255, 255, 255, .18); }
.hn { display: block; font-size: 15px; color: var(--red); letter-spacing: .06em; margin-bottom: 18px; }
.handles h3 { font-size: clamp(24px, 2vw, 30px); }
.handles p { margin-top: 10px; color: #b9bccb; max-width: 34ch; }

/* ---------- how it works ---------- */
.ap-how { background: var(--grey); scroll-margin-top: 60px; }

/* ---------- FAQ ---------- */
.ap-faq-sec { border-top: 1px solid #e0e1e4; }
.ap-faq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 6vw; align-items: start; }
.ap-faq-grid > div:first-child { position: sticky; top: 110px; }
.ap-faq-sec .btn { margin-top: 30px; }
.faqs details { border-bottom: 1px solid #c9cad0; }
.faqs details:first-child { border-top: 1.5px solid var(--navy); }
.faqs summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr 28px; gap: 20px; align-items: center; padding: 24px 0; font-size: 21px; line-height: 1.3; }
.faqs summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--navy); }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: var(--navy); transform: translate(-50%, -50%); transition: transform .3s var(--ease-out); }
.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] .plus::after { transform: translate(-50%, -50%) rotate(0deg); }
details[open] .plus { background: var(--navy); }
details[open] .plus::before, details[open] .plus::after { background: var(--white); }
.faqs details p { padding: 0 48px 26px 0; color: var(--ink-soft); max-width: 62ch; }

/* review builds only: answers waiting on Michael */
.faqs details.unconfirmed { outline: 2px dashed #e0a100; outline-offset: 4px; background: #fffaeb; }
.faqs details.unconfirmed summary::after { content: "Michael to confirm"; grid-column: 1 / -1; font-size: 13px; font-weight: 500; color: #8a6200; margin-top: -12px; }
.review-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #e0a100; color: var(--navy); text-align: center; font-size: 14px; font-weight: 500; padding: 8px 16px; }

/* ---------- the rest of the team ---------- */
.ap-team { background: var(--grey); }
.team { margin-top: 56px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.team a { display: flex; flex-direction: column; height: 100%; padding: 24px 22px 22px; background: var(--white); text-decoration: none; transition: transform .35s var(--ease-out), box-shadow .35s ease; }
.team a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(3, 6, 22, .35); }
.team .ic { width: 26px; height: 26px; color: var(--red); margin-bottom: 18px; }
.tj { font-size: 22px; line-height: 1.1; }
.team .agent-name { margin-top: 10px; align-self: flex-start; color: var(--ink-soft); border-color: #c9cad0; background: none; }
.tt { margin-top: 14px; color: var(--ink-soft); font-size: 16px; flex: 1; }
.tm { margin-top: 18px; font-size: 15px; font-weight: 500; color: var(--red); }

/* the homepage hides this button on phones (it shows the calendar there instead); agent pages keep it */
.agent-page .book-btn { display: inline-flex; margin-top: 10px; }

@media (max-width: 1200px) { .team { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .agent-hero { grid-template-columns: 1fr; padding-top: 110px; padding-bottom: 80px; }
  .agent-hero .hero-art { grid-column: 1; grid-row: 2; margin: 44px 0 0; }
  .phone-body { min-height: 0; }
  .ap-two, .ap-faq-grid { grid-template-columns: 1fr; }
  .ap-faq-grid > div:first-child { position: static; }
  .handles { grid-template-columns: 1fr; }
  .handles li, .handles li:not(:nth-child(3n + 1)) { padding: 26px 0; border-left: 0; }
  .team { grid-template-columns: 1fr 1fr; }
  .pains li, .faqs summary { font-size: 19px; }
  .faqs details p { padding-right: 0; }
}
@media (max-width: 520px) { .team { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .live i { animation: none; } }

/* header on agent pages: solid as soon as the page scrolls (agent-page.js sets body.scrolled);
   same look as the homepage's .top.solid, which motion.js controls separately */
.agent-page.scrolled .top { background: var(--navy); padding-top: 12px; padding-bottom: 12px; box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.agent-page.scrolled .top .btn-navy { background: var(--red); }
.agent-page.scrolled .top .btn-navy:hover { color: var(--red); }
.js .phone .measure { animation: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 1200px) and (min-width: 961px) { .team { grid-template-columns: repeat(5, 1fr); gap: 10px; } .team a { padding: 20px 16px; } .tj { font-size: 19px; } }
