/*
 * Landing page (/): the free-tools hero and the marketing sections below it.
 * Shared pieces (dropzone, record button, plans, ads) live in spokly.css.
 */

/* ============================================================ Free tools hero */
.hero-tools { padding-bottom: 80px; }
.free-tools { position: relative; z-index: 1; max-width: 960px; margin-top: 40px; }

.ft-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px;
  background: var(--field); border-radius: 22px;
}
.ft-tab {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px;
  border: 0; border-radius: 18px; background: transparent; color: var(--text-2); text-align: left;
  font: inherit; transition: background-color .2s, box-shadow .2s, color .2s;
}
.ft-tab:hover { color: var(--text); }
.ft-tab[aria-selected="true"] { background: var(--thumb); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .06); }
.ft-tab .tile { width: 36px; height: 36px; border-radius: 11px; }
.ft-tab .tile .icon { width: 18px; height: 18px; }
.ft-tab-text { flex: 1; min-width: 0; }
.ft-tab-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-tab-text small { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-tab .badge { flex: none; }

/* On phones the tabs become a horizontally scrollable row of chips. */
@media (max-width: 760px) {
  .ft-tabs { display: flex; gap: 8px; padding: 2px 0 6px; background: none; border-radius: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
  .ft-tabs::-webkit-scrollbar { display: none; }
  .ft-tab { flex: none; scroll-snap-align: start; padding: 8px 14px 8px 8px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); gap: 8px; }
  .ft-tab[aria-selected="true"] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
  .ft-tab .tile { width: 28px; height: 28px; border-radius: 50%; }
  .ft-tab .tile .icon { width: 14px; height: 14px; }
  .ft-tab-text small { display: none; }
  .ft-tab .badge { display: none; }
}

.ft-card { margin-top: 14px; padding: 24px; min-height: 520px; text-align: left; display: flex; flex-direction: column; gap: 18px; }
.ft-media, .ft-voice { display: flex; flex-direction: column; gap: 18px; }
.ft-voice { align-items: center; text-align: center; padding-top: 12px; }
.ft-voice .cluster { justify-content: center; }
.vt-lang { width: min(300px, 100%); text-align: left; }
.vt-text { width: 100%; text-align: left; }
.ft-card .dropzone { min-height: 200px; }
@media (max-width: 640px) { .ft-card { padding: 16px; min-height: 0; } }

.link-box { display: flex; flex-direction: column; gap: 8px; }
.link-row { display: flex; gap: 8px; }
.link-row .input { flex: 1; }
@media (max-width: 480px) { .link-row { flex-direction: column; } }
.link-msg { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); font-size: 14px; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.link-msg.is-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.link-msg a { color: inherit; font-weight: 500; }

.ft-result { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; border-top: 1px solid var(--border); }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; }
.ft-result .textarea { min-height: 220px; }
.tt-out { max-height: 360px; overflow: auto; padding: 14px 16px; border-radius: 12px; background: var(--field); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.tt-out.is-cues { font: 13px/1.6 var(--mono); }
.free-tools { max-width: 1080px; }
@media (max-width: 1100px) and (min-width: 761px) { .ft-tab-text small { display: none; } .ft-tab .badge { display: none; } }

.cue-list { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
.cue { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.cue:last-child { border-bottom: 0; }
.cue-num { font-size: 12px; color: var(--text-2); padding-top: 6px; min-width: 2ch; text-align: right; }
.cue-time { font-size: 12px; color: var(--text-2); }
.cue-text { grid-column: 2; width: 100%; min-height: 0; resize: vertical; border: 1px solid transparent; border-radius: 8px; background: transparent; padding: 4px 8px; margin-left: -8px; font: 400 14px/1.5 var(--font); color: var(--text); }
.cue-text:hover { background: var(--field); }
.cue-text:focus { background: var(--field); border-color: var(--border-strong); }
.cue > .cue-num { grid-row: span 2; }

.upsell {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-top: auto;
  border-radius: 14px; background: var(--bg-subtle); border: 1px solid var(--border);
  color: var(--text-2); font-size: 14px; text-decoration: none; transition: border-color .15s, background-color .15s;
}
.upsell:hover { border-color: var(--border-strong); background: var(--hover); }
.upsell > span:nth-child(2) { flex: 1; }
.upsell strong { color: var(--text); font-weight: 600; }
.upsell .icon { flex: none; color: var(--text); }

.ft-limits { margin-top: 14px; font-size: 13px; color: var(--text-2); text-align: center; }
.trust { margin-top: 6px; font-size: 14px; color: var(--text-2); text-align: center; }

/* ============================================================ Demo */
.demo-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; padding: 20px; }
.demo-input .textarea { min-height: 300px; height: 100%; font-size: 14px; }
.demo-output { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.demo-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.demo-out { flex: 1; min-height: 280px; max-height: 380px; overflow: auto; padding: 16px 18px; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 820px) { .demo-card { grid-template-columns: minmax(0, 1fr); } .demo-input .textarea { min-height: 180px; } }
.section-actions { justify-content: center; margin-top: 32px; }
.section-link { margin-top: 28px; text-align: center; }

/* ============================================================ Works with */
.works { padding: 28px 0; border-block: 1px solid var(--border); }
.works-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 32px; }
.works-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; }
.works-list li { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-2); }

/* ============================================================ How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); }
.step p { color: var(--text-2); font-size: 14px; }
.step-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: 14px; font-weight: 500; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================ Free vs AI */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.compare-col { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.compare-col .btn { margin-top: auto; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--success) 14%, transparent);
}
.ticks li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 6px; height: 9px; border: solid var(--success-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
@media (max-width: 760px) { .compare { grid-template-columns: minmax(0, 1fr); } }

/* ============================================================ Pricing teaser & CTA */
.plan-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.cta-band { overflow: clip; text-align: center; }
