/* Homepage only. Builds on the tokens in styles.css, so every color follows light/dark mode. */
:root {
  --phone-frame: #050C09;
  --slot-a: #1F8A5C; --slot-a-fg: #FFFFFF;
  --slot-b: #2A5446; --slot-b-fg: #EAF2EE;
  --slot-c: #F1B33C; --slot-c-fg: #0B1712;
  --toast-bg: rgba(23,44,35,.96); --toast-fg: #EAF2EE; --toast-line: #2A4639;
}
:root[data-theme="light"] {
  --phone-frame: #0E1F18;
  --slot-b: #13352C; --slot-b-fg: #EAF2EE;
  --toast-bg: rgba(19,53,44,.95); --toast-fg: #F2F7F4; --toast-line: transparent;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g { color: var(--green-text); }
.y { color: var(--sun); }

/* Hero */
.home-hero { padding: 56px 0 88px; }
.home-hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.02; margin: 20px 0 22px; }
.home-hero .lede { font-size: 19px; line-height: 30px; }
.live-tag { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; color: var(--green-text); border: 1px solid var(--hairline); background: var(--surface-raised); border-radius: var(--r-pill); padding: 5px 13px 5px 10px; }
.live-tag i { width: 7px; height: 7px; border-radius: 50%; background: var(--green-text); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(125,238,173,.5); } 70% { box-shadow: 0 0 0 8px rgba(125,238,173,0); } 100% { box-shadow: 0 0 0 0 rgba(125,238,173,0); } }

/* Phone + calendar */
.phone-col { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone { width: 330px; max-width: 100%; background: var(--phone-frame); border-radius: 44px; padding: 11px; box-shadow: 0 0 0 1px var(--hairline), 0 40px 80px -30px var(--shadow); }
.screen { background: var(--surface-raised); border-radius: 34px; overflow: hidden; height: 600px; position: relative; display: flex; flex-direction: column; }
.statusbar { display: flex; justify-content: space-between; padding: 14px 26px 6px; font-size: 12px; font-weight: 600; }
.apphead { padding: 6px 20px 12px; border-bottom: 1px solid var(--hairline); }
.apphead small { font-size: 11px; color: var(--ink-muted); display: block; line-height: 16px; }
.apphead strong { font-size: 17px; line-height: 24px; font-weight: 600; }
.apphead .count { float: right; text-align: right; }
.apphead .count b { font-family: var(--mono); font-weight: 500; font-size: 22px; color: var(--green-text); font-variant-numeric: tabular-nums; display: block; line-height: 24px; }
.cal { flex: 1; display: grid; grid-template-columns: 26px repeat(5, 1fr); grid-template-rows: auto 1fr; padding: 8px 10px 14px 6px; gap: 0 4px; position: relative; }
.cal .dh { font-size: 10px; font-weight: 600; color: var(--ink-muted); text-align: center; padding-bottom: 4px; }
.hours { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: var(--ink-muted); text-align: right; padding-right: 4px; }
.daycol { grid-row: 2; position: relative; background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(12.5% - 1px), var(--hairline) calc(12.5% - 1px), var(--hairline) 12.5%); border-radius: 6px; }
.slot { position: absolute; left: 2px; right: 2px; border-radius: 5px; font-size: 8.5px; line-height: 11px; padding: 3px 4px; overflow: hidden; background: var(--slot-a); color: var(--slot-a-fg); transform-origin: top; animation: pop .35s ease both; }
.slot.f { background: var(--slot-b); color: var(--slot-b-fg); }
.slot.s { background: var(--slot-c); color: var(--slot-c-fg); }
@keyframes pop { from { transform: scaleY(.2); opacity: 0; } to { transform: none; opacity: 1; } }
.toasts { position: absolute; top: 44px; left: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; z-index: 3; }
.toast { background: var(--toast-bg); color: var(--toast-fg); border: 1px solid var(--toast-line); border-radius: 14px; padding: 9px 12px; font-size: 11.5px; line-height: 16px; display: flex; gap: 9px; align-items: center; animation: drop .35s ease both; box-shadow: 0 10px 24px -12px rgba(0,0,0,.5); }
.toast .ic { flex: 0 0 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #0B1712; }
.toast b { display: block; font-weight: 600; }
.toast.out { animation: fade .4s ease forwards; }
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { to { opacity: 0; transform: translateY(-6px); } }
.empty-msg { position: absolute; inset: 0; display: none; place-items: center; text-align: center; font-size: 13px; color: var(--ink-muted); }
.cal.is-empty .empty-msg { display: grid; }

/* Segmented control (calendar + listing) */
.seg { display: inline-flex; gap: 2px; background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 4px; }
.seg button { border: 0; background: transparent; border-radius: var(--r-pill); padding: 7px 15px; font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.seg button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }

/* Count-up strip */
.facts .fact { padding-block: 32px; }
.facts .fact b { display: flex; align-items: baseline; gap: 2px; line-height: 1; }
.facts .fact .n { font-style: normal; font-size: clamp(40px, 4.4vw, 52px); font-weight: 500; letter-spacing: -.05em; color: var(--green-text); font-variant-numeric: tabular-nums; }
.facts .fact small { font-family: var(--font); font-size: 17px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); margin-left: 8px; }
.facts .fact > span { margin-top: 12px; max-width: 24em; }

/* Steps */
.steps { display: flex; flex-direction: column; gap: 20px; }
.step { display: grid; grid-template-columns: 320px 1fr; background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
.step-info { padding: 32px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--hairline); }
.stair { display: flex; align-items: flex-end; gap: 5px; height: 44px; }
.stair i { width: 18px; border-radius: 2px; background: var(--hairline); }
.stair i:nth-child(1) { height: 16px; } .stair i:nth-child(2) { height: 28px; } .stair i:nth-child(3) { height: 44px; }
.stair i.on1 { background: var(--sun); } .stair i.on2 { background: var(--green); } .stair i.on3 { background: var(--step3); }
.step-info h3 { font-size: 28px; line-height: 32px; font-weight: 600; }
.step-info p { color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.step-info ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.step-info li { display: flex; gap: 10px; }
.step-info li::before { content: ""; flex: 0 0 8px; height: 8px; margin-top: 6px; background: var(--green); border-radius: 2px; }
.step-links { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); font-size: 14px; font-weight: 500; }
.step-links a { text-decoration: none; }
.step-links a:hover { text-decoration: underline; }
.step-demo { padding: 32px; background: var(--surface); display: flex; flex-direction: column; gap: 16px; min-height: 360px; min-width: 0; }
.demo-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 4px 12px; color: var(--ink-muted); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-text); }

/* Google listing demo */
.rank { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 620px; font-size: 13px; color: var(--ink-muted); border: 1px dashed var(--hairline); border-radius: var(--r-md); padding: 10px 14px; }
.rank b { color: var(--ink); font-weight: 500; }
.rank .rank-n { font-family: var(--mono); font-size: 22px; color: var(--green-text); transition: color .3s ease; }
.rank.bad .rank-n { color: var(--warn); }
.listing { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 20px; display: grid; grid-template-columns: 1fr 150px; gap: 20px; max-width: 620px; }
.listing h4 { font-size: 18px; line-height: 24px; font-weight: 600; }
.stars { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 4px 0 8px; }
.stars .r { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.stars .s { color: var(--sun); letter-spacing: 1px; font-size: 15px; transition: color .3s ease; }
.stars .s.dim { color: var(--hairline); }
.listing .meta { font-size: 13px; line-height: 20px; color: var(--ink-muted); display: flex; flex-direction: column; gap: 4px; }
.listing .meta span { animation: drop .3s ease both; }
.listing .meta .warn { color: var(--warn); }
.listing .meta .ok { color: var(--green-text); }
.listing .acts { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.listing .acts span { font-size: 12px; border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 3px 10px; color: var(--ink-muted); }
.listing .acts span.book { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 10px; overflow: hidden; align-content: start; }
.photos div { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; font-size: 10px; color: var(--ink-muted); text-align: center; transition: background .4s ease; }
.photos.good div { color: transparent; animation: pop .4s ease both; }
.photos.good div:nth-child(1) { background: linear-gradient(135deg, #C9A27A, #8C6A4F); }
.photos.good div:nth-child(2) { background: linear-gradient(135deg, #E6D3B3, #B99B74); animation-delay: .08s; }
.photos.good div:nth-child(3) { background: linear-gradient(135deg, #7E9C8A, #3F5F51); animation-delay: .16s; }
.photos.good div:nth-child(4) { background: linear-gradient(135deg, #D9B98C, #A57C4E); animation-delay: .24s; }

/* Missed call demo */
.callbox { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mini-phone { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: 22px; padding: 16px; min-height: 270px; display: flex; flex-direction: column; gap: 10px; }
.mini-phone .who { font-size: 12px; color: var(--ink-muted); text-align: center; border-bottom: 1px solid var(--hairline); padding-bottom: 8px; }
.step-demo .bubble { animation: drop .3s ease both; }
.callside { display: flex; flex-direction: column; gap: 14px; justify-content: center; align-items: flex-start; }
.callside p { font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.callside .btn[disabled] { opacity: .7; cursor: default; transform: none; }
.timer { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); display: flex; align-items: baseline; gap: 10px; }
.timer b { color: var(--green-text); font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ring { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ring i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: blink 1s infinite; }
.ring i:nth-child(2) { animation-delay: .15s; } .ring i:nth-child(3) { animation-delay: .3s; }

/* Chat demo */
.chat { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--r-md); display: flex; flex-direction: column; max-width: 620px; }
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--hairline); display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.chat-head i { width: 30px; height: 30px; border-radius: 9px; background: var(--forest); display: grid; place-items: center; color: var(--mint); font-style: normal; font-size: 11px; }
.chat-head small { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 11px; line-height: 14px; color: var(--green-text); }
.chat-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green-text); }
.chat-log { padding: 16px; display: flex; flex-direction: column; gap: 8px; height: 250px; overflow-y: auto; scroll-behavior: smooth; }
.chat-q { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px 0; border-top: 1px solid var(--hairline); }
.chat-q button, .slots button { border: 1px solid var(--hairline); background: var(--surface); border-radius: var(--r-pill); padding: 6px 12px; font-size: 12.5px; color: var(--ink); }
.chat-q button:hover, .slots button:hover { border-color: var(--green-text); }
.slots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.slots button { font-family: var(--mono); font-size: 12px; color: var(--green-text); }
.slots button[disabled] { opacity: .45; cursor: default; }
.chat-in { display: flex; gap: 8px; padding: 12px 16px 14px; }
.chat-in input { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 10px 14px; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); }
.chat-in input::placeholder { color: var(--ink-muted); }
.chat-in input:focus { outline: 2px solid var(--green-text); outline-offset: 0; border-color: transparent; }
.chat-in button { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 0; background: var(--btn-bg); color: var(--btn-fg); font-size: 17px; font-weight: 600; }
.typing { display: inline-flex; gap: 3px; padding: 4px 0; }
.typing i { width: 5px; height: 5px; background: var(--ink-muted); border-radius: 50%; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }

/* Missed-call calculator */
.calc { display: grid; grid-template-columns: 1.1fr .9fr; border: 1px solid var(--hairline); border-radius: 24px; overflow: hidden; background: var(--surface-raised); }
.calc-in { padding: 44px; display: flex; flex-direction: column; gap: 12px; }
.calc-in h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 600; }
.calc-in > p { color: var(--ink-muted); font-size: 17px; }
.sliders { display: flex; flex-direction: column; gap: 22px; margin-top: 18px; }
.sliders label { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: 14px; font-weight: 500; }
.sliders output { font-family: var(--mono); font-size: 15px; color: var(--green-text); font-variant-numeric: tabular-nums; }
.sliders input { grid-column: 1 / -1; width: 100%; accent-color: var(--green-text); height: 22px; }
.calc-out { padding: 44px; background: radial-gradient(100% 80% at 100% 0, rgba(241,179,60,.12), transparent 60%), var(--surface-2); display: flex; flex-direction: column; gap: 8px; justify-content: center; border-left: 1px solid var(--hairline); }
.calc-out small { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; }
.calc-out .big { font-family: var(--mono); font-weight: 500; font-size: clamp(40px, 5vw, 56px); line-height: 1.05; color: var(--warn); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.calc-out .mid { font-family: var(--mono); font-weight: 500; font-size: 30px; color: var(--green-text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.cbar { height: 8px; border-radius: 99px; background: var(--hairline); overflow: hidden; margin-bottom: 14px; }
.cbar i { display: block; height: 100%; width: 50%; background: var(--warn); border-radius: 99px; transition: width .35s ease; }
.cbar.won i { background: var(--green-text); }
.calc-out .fine { font-size: 14px; color: var(--ink-muted); margin: 4px 0 14px; }
.calc-out .fine b { color: var(--ink); font-weight: 600; }
.calc-out .btn { align-self: flex-start; }

/* Process bars grow in when scrolled into view */
.process.anim .bar { transform: scaleY(0); transform-origin: bottom; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.process.anim .pstep:nth-child(2) .bar { transition-delay: .12s; }
.process.anim .pstep:nth-child(3) .bar { transition-delay: .24s; }
.process.anim .pstep:nth-child(4) .bar { transition-delay: .36s; }
.process.anim.in .bar { transform: none; }

/* About */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.about h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin-top: 14px; font-weight: 600; }
.about p { font-size: 17px; line-height: 28px; color: var(--ink-muted); max-width: 36em; }
.about p + p { margin-top: 14px; }
.towns { margin-top: 24px; }

/* Audit form */
.audit { background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: 28px; padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.audit h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 14px 0 16px; font-weight: 600; }
.audit p { color: var(--ink-muted); font-size: 17px; line-height: 28px; }
form.af { display: flex; flex-direction: column; gap: 14px; }
form.af label { font-size: 13px; font-weight: 500; display: flex; flex-direction: column; gap: 6px; }
form.af input { font: inherit; font-size: 15px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); }
form.af input::placeholder { color: var(--ink-muted); }
form.af input:focus { outline: 2px solid var(--green-text); outline-offset: 0; border-color: transparent; }
form.af .btn { justify-content: center; }
form.af .hp { position: absolute; left: -9999px; }
.af-msg { font-size: 14px; line-height: 21px; color: var(--green-text); min-height: 21px; }
.af-msg.err { color: var(--warn); }

@media (max-width: 960px) {
  .audit, .about, .calc { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; }
  .step-info { border-right: 0; border-bottom: 1px solid var(--hairline); }
  .calc-out { border-left: 0; border-top: 1px solid var(--hairline); }
  .audit { padding: 36px 24px; }
  .calc-in, .calc-out { padding: 32px 24px; }
  .about { gap: 20px; }
}
@media (max-width: 600px) {
  .callbox, .listing { grid-template-columns: 1fr; }
  .phone { width: 300px; } .screen { height: 560px; }
  .home-hero { padding-top: 32px; }
  .step-info, .step-demo { padding: 22px; }
  .photos { grid-template-columns: repeat(4, 1fr); }
}

/* Industries (tabs) */
.ind { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.ind-tabs { display: flex; flex-direction: column; gap: 6px; }
.ind-tabs button { text-align: left; border: 1px solid var(--hairline); background: var(--surface-raised); color: var(--ink); border-radius: var(--r-md); padding: 14px 16px; font-size: 15px; font-weight: 500; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: border-color .15s ease, background .15s ease; }
.ind-tabs button::after { content: "→"; color: var(--green-text); opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; }
.ind-tabs button:hover { border-color: var(--green); }
.ind-tabs button[aria-selected="true"] { border-color: var(--accent-line); background: var(--surface-2); }
.ind-tabs button[aria-selected="true"]::after { opacity: 1; transform: none; }
.ind-panel { grid-column: 2; border: 1px solid var(--hairline); background: var(--surface-raised); border-radius: var(--r-lg); padding: 32px; display: flex; flex-direction: column; gap: 10px; min-width: 0; animation: drop .3s ease both; }
.ind-panel h3 { font-size: 26px; line-height: 32px; font-weight: 600; margin-bottom: 10px; }
.ind-panel .prob { font-size: 18px; line-height: 28px; max-width: 36em; margin-bottom: 14px; }
.ind-build { list-style: none; display: grid; gap: 8px; margin-bottom: 8px; }
.ind-build li { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--hairline); font-size: 15px; line-height: 22px; animation: drop .3s ease both; }
.ind-build li:nth-child(2) { animation-delay: .06s; } .ind-build li:nth-child(3) { animation-delay: .12s; }
.st { width: 10px; height: 10px; border-radius: 3px; }
.st.found { background: var(--sun); } .st.booked { background: var(--green); } .st.grow { background: var(--step3); }
.ind-build small { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); white-space: nowrap; }
.ind-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--ink-muted); }
.ind-foot b { color: var(--ink); font-weight: 600; }
.ind-foot a { font-weight: 500; text-decoration: none; margin-left: 16px; }
.ind-foot a:first-child { margin-left: 0; }
.ind-foot a:hover { text-decoration: underline; }
.noprice { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; gap: 20px 32px; flex-wrap: wrap; border: 1px dashed var(--accent-line); border-radius: var(--r-lg); padding: 24px 28px; }
.noprice > div { flex: 1 1 420px; min-width: 0; }
.noprice h3 { font-size: 20px; line-height: 28px; font-weight: 600; margin-bottom: 6px; }
.noprice p { color: var(--ink-muted); max-width: 48em; font-size: 15px; line-height: 24px; }
@media (max-width: 960px) {
  .ind { grid-template-columns: 1fr; }
  .ind-panel { grid-column: 1; }
  .ind-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .ind-tabs::-webkit-scrollbar { display: none; }
  .ind-tabs button { flex: 0 0 auto; white-space: nowrap; padding: 10px 14px; font-size: 14px; }
  .ind-tabs button::after { display: none; }
}
@media (max-width: 600px) {
  .ind-panel { padding: 22px; }
  .ind-build li { grid-template-columns: 10px 1fr; }
  .ind-build small { grid-column: 2; }
}
