/* ───────────────────────────────────────────────────────────────────
   Free Tools — shared by /free-tools and every tool page under it.
   Built on css/neomeric-tokens.css + css/styles.css (container, eyebrow,
   buttons, trust cards). Only patterns those files do not already have
   live here: the product stage, the feature switcher, install steps,
   the fact sheet and the region notice.
   ─────────────────────────────────────────────────────────────────── */

h1, h2, h3, .font-display { font-family: 'Syne', sans-serif; letter-spacing: -0.025em; }
body { font-family: 'Kanit', sans-serif; }

/* ── Hero ───────────────────────────────────────────────────────── */
.ft-hero { position: relative; overflow: hidden; padding: 128px 0 0; background: var(--bg); }
.ft-hero-wash {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 55% at 85% 12%, rgba(0, 123, 255, .12), transparent 70%),
    radial-gradient(45% 50% at 8% 78%, rgba(0, 209, 178, .11), transparent 70%);
}
.ft-hero-copy { position: relative; max-width: 820px; }
.ft-h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.04; letter-spacing: -0.03em;
  margin: 14px 0 22px; text-wrap: balance; color: var(--text);
}
.ft-lead { font-size: 19px; line-height: 1.55; color: var(--text-muted); max-width: 60ch; margin: 0 0 30px; }
.ft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.ft-actions .btn { padding: 15px 26px; font-size: 15px; }
.ft-fineprint { font-size: 13.5px; color: var(--text-subtle); margin: 0; }
.ft-fineprint a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

.ft-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 8px; border-radius: 9999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 12.5px; font-weight: 500; color: var(--text);
}
.ft-pill-flag {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-100); color: var(--accent-700);
  font: 700 10px/1 var(--font-display); letter-spacing: .02em;
}
.dark .ft-pill-flag { background: rgba(0, 209, 178, .18); color: var(--accent-400); }

.ft-promises { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.ft-promises li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.ft-promises svg { color: var(--accent-600); flex: none; }

/* ── Product stage: the app window on a brand-gradient plate ────── */
.ft-stage { position: relative; margin-top: 64px; padding: 56px 56px 0; border-radius: 32px 32px 0 0; overflow: hidden; isolation: isolate; }
.ft-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(135deg, #003166 0%, #007BFF 48%, #00D1B2 100%);
}
.ft-stage::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 90% at 50% 0%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(80% 90% at 50% 0%, #000 30%, transparent 85%);
}
.ft-stage img {
  display: block; width: 100%; height: auto; margin: 0 auto -6%;
  max-width: 1040px;
  filter: drop-shadow(0 40px 60px rgba(0, 14, 26, .55));
}

/* ── Feature switcher ───────────────────────────────────────────── */
.ft-switch { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 56px; align-items: start; }
.ft-switch-list { display: grid; gap: 0; border-top: 1px solid var(--border); }
.ft-tab {
  position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 14px;
  width: 100%; padding: 20px 0 20px 18px; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-bottom: 1px solid var(--border);
  font-family: inherit; color: inherit;
}
.ft-tab::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px;
  background: var(--gradient-brand); opacity: 0; transition: opacity 220ms ease;
}
.ft-tab[aria-selected="true"]::before { opacity: 1; }
.ft-tab-num { font: 600 12px/1.9 var(--font-mono); letter-spacing: .05em; color: var(--text-subtle); }
.ft-tab[aria-selected="true"] .ft-tab-num { color: var(--secondary-700); }
.dark .ft-tab[aria-selected="true"] .ft-tab-num { color: var(--secondary-300); }
.ft-tab-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.015em; color: var(--text-muted); transition: color 220ms ease; }
.ft-tab:hover .ft-tab-title, .ft-tab[aria-selected="true"] .ft-tab-title { color: var(--text); }
.ft-tab-body { display: block; max-height: 0; overflow: hidden; opacity: 0; font-size: 15px; line-height: 1.6; color: var(--text-muted); transition: max-height 320ms ease, opacity 220ms ease, margin 220ms ease; }
.ft-tab[aria-selected="true"] .ft-tab-body { max-height: 200px; opacity: 1; margin-top: 8px; }
.ft-tab:focus-visible { outline: 2px solid var(--secondary-500); outline-offset: 2px; border-radius: 6px; }

.ft-shots { position: sticky; top: 104px; border-radius: 24px; padding: 28px; background: var(--bg-subtle); border: 1px solid var(--border); }
.dark .ft-shots { background: rgba(255, 255, 255, .03); }
.ft-shot { display: none; }
.ft-shot.is-active { display: block; animation: ft-rise 360ms cubic-bezier(.2, .8, .2, 1); }
.ft-shot img { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 34px rgba(15, 23, 42, .28)); }
@keyframes ft-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ft-shot.is-active { animation: none; } .ft-tab-body { transition: none; } }

/* ── Privacy split ──────────────────────────────────────────────── */
.ft-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ft-ledger { border: 1px solid var(--border); border-radius: 24px; background: var(--surface); overflow: hidden; }
.ft-ledger-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 17px 22px; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--text); }
.ft-ledger-row:last-child { border-bottom: 0; }
.ft-ledger-val { font: 600 12px/1 var(--font-mono); letter-spacing: .04em; padding: 7px 10px; border-radius: 9999px; background: var(--accent-100); color: var(--accent-700); white-space: nowrap; }
.dark .ft-ledger-val { background: rgba(0, 209, 178, .16); color: var(--accent-400); }

/* ── Install ────────────────────────────────────────────────────── */
.ft-install { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: start; }
.ft-steps { list-style: none; counter-reset: ft; padding: 0; margin: 0; display: grid; gap: 0; }
.ft-steps li { counter-increment: ft; position: relative; padding: 0 0 28px 62px; }
.ft-steps li::before {
  content: counter(ft); position: absolute; left: 0; top: -4px;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font: 600 14px/1 var(--font-display); color: var(--text);
  background: var(--bg); border: 1px solid var(--border-strong);
}
.ft-steps li:first-child::before { background: var(--gradient-brand); border-color: transparent; color: #fff; }
.ft-steps li::after { content: ""; position: absolute; left: 19.5px; top: 40px; bottom: 4px; width: 1px; background: var(--border); }
.ft-steps li:last-child { padding-bottom: 0; }
.ft-steps li:last-child::after { display: none; }
.ft-steps h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.015em; color: var(--text); margin: 4px 0 6px; }
.ft-steps p { font-size: 15.5px; line-height: 1.6; color: var(--text-muted); margin: 0; max-width: 56ch; }
.ft-steps strong { color: var(--text); font-weight: 600; }
.ft-note { margin-top: 28px; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); font-size: 14.5px; line-height: 1.6; color: var(--text-muted); max-width: 62ch; }
.ft-note strong { color: var(--text); font-weight: 600; }

.ft-facts { border: 1px solid var(--border); border-radius: 24px; background: var(--surface); padding: 26px 26px 22px; }
.ft-facts h3 { font-family: var(--font-display); font-weight: 700; font-size: 17px; margin: 0 0 14px; color: var(--text); }
.ft-facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0; }
.ft-facts dt, .ft-facts dd { padding: 11px 0; border-top: 1px solid var(--border); font-size: 14.5px; margin: 0; }
.ft-facts dt { color: var(--text-subtle); padding-right: 18px; white-space: nowrap; }
.ft-facts dd { color: var(--text); text-align: right; }
.ft-facts code { font: 500 11.5px/1.5 var(--font-mono); color: var(--text-muted); word-break: break-all; }
.ft-facts .btn { width: 100%; margin-top: 18px; padding: 15px 22px; font-size: 15px; }

/* ── Region notice (shown instead of the button outside Australia) ─ */
.ft-region { display: none; align-items: flex-start; gap: 12px; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); max-width: 60ch; font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }
.ft-region strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.ft-region svg { flex: none; margin-top: 2px; color: var(--secondary-600); }
.ft-region a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
[data-region="outside"] .ft-region { display: flex; }
[data-region="outside"] .ft-download { display: none; }

/* ── Tool cards on the hub ──────────────────────────────────────── */
.ft-tool {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0;
  border: 1px solid var(--border); border-radius: 28px; overflow: hidden; background: var(--surface);
  text-decoration: none; color: inherit;
  transition: transform 320ms cubic-bezier(.2, .8, .2, 1), box-shadow 320ms, border-color 320ms;
}
.ft-tool:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 30px 60px -30px rgba(0, 49, 102, .35); }
.ft-tool-copy { padding: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ft-tool-name { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -0.025em; color: var(--text); margin: 0; }
.ft-tool-desc { font-size: 16.5px; line-height: 1.6; color: var(--text-muted); margin: 0; max-width: 44ch; }
.ft-tool-meta { font: 500 12px/1 var(--font-mono); letter-spacing: .04em; color: var(--text-subtle); }
.ft-tool-art { position: relative; min-height: 340px; overflow: hidden; background: linear-gradient(135deg, #003166 0%, #007BFF 55%, #00D1B2 100%); }
.ft-tool-art img { position: absolute; left: 44px; top: 44px; width: 135%; max-width: none; filter: drop-shadow(0 30px 40px rgba(0, 14, 26, .5)); }
.ft-next { border: 1px dashed var(--border-strong); border-radius: 28px; padding: 36px 40px; display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.ft-next h3 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--text); }
.ft-next p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--text-muted); max-width: 58ch; }

/* ── FAQ (same pattern as the solutions pages) ──────────────────── */
.nm-faq-list { max-width: 800px; margin: 0; padding: 0; list-style: none; }
.nm-faq-item { border-bottom: 1px solid var(--border); }
.nm-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 24px 0; cursor: pointer; background: transparent; border: 0; text-align: left; }
.nm-faq-q-text { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text); line-height: 1.4; flex: 1; letter-spacing: -0.015em; }
.nm-faq-toggle { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong); display: inline-flex; align-items: center; justify-content: center; color: var(--text); flex-shrink: 0; transition: all 220ms; }
.nm-faq-item.open .nm-faq-toggle { background: var(--gray-900); color: white; border-color: var(--gray-900); transform: rotate(45deg); }
.dark .nm-faq-item.open .nm-faq-toggle { background: white; color: var(--gray-900); border-color: white; }
.nm-faq-a { max-height: 0; overflow: hidden; transition: max-height 280ms ease; }
.nm-faq-item.open .nm-faq-a { max-height: 420px; }
.nm-faq-a p { margin: 0 0 24px; font-size: 16px; line-height: 1.6; color: var(--text-muted); max-width: 70ch; }
.ft-faq-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 64px; align-items: flex-start; }

/* ── Closing band ───────────────────────────────────────────────── */
.ft-band { position: relative; overflow: hidden; padding: 64px; border-radius: 36px; color: #fff; background: linear-gradient(135deg, #9C7DB9 0%, #007BFF 50%, #00D1B2 100%); }
.ft-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 30% 30%, rgba(255, 255, 255, .18), transparent 60%); }
.ft-band-inner { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.ft-band h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 14px; text-wrap: balance; max-width: 20ch; }
.ft-band p { font-size: 17px; line-height: 1.55; opacity: .92; margin: 0; max-width: 48ch; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ft-switch, .ft-split, .ft-install, .ft-faq-grid, .ft-tool { grid-template-columns: 1fr; gap: 32px; }
  .ft-tool { gap: 0; }
  .ft-shots { position: static; padding: 16px; }
  .ft-stage { padding: 28px 20px 0; border-radius: 24px 24px 0 0; margin-top: 44px; }
  .ft-tool-art { min-height: 240px; order: -1; }
  .ft-tool-art img { left: 24px; top: 24px; width: 150%; }
  .ft-tool-copy { padding: 28px; }
  .ft-band { padding: 40px 28px; border-radius: 28px; }
}
@media (max-width: 600px) {
  .ft-hero { padding-top: 108px; }
  .ft-actions .btn { width: 100%; }
  .ft-steps li { padding-left: 54px; }
  .ft-next { padding: 28px; }
}
