/* cadtomesh — marketing homepage */

.page-home {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(45, 212, 191, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(37, 99, 235, 0.08), transparent 55%),
    var(--bg);
}

/* nav */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  background: rgba(240, 253, 250, 0.8);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav .container { display: flex; align-items: center; gap: var(--sp-6); }
.brand { display: inline-flex; align-items: center; gap: var(--wm-gap-icon); font-weight: 700; font-size: var(--text-lg); color: var(--ink-strong); }
.brand .mark { width: 24px; height: 24px; }
.brand .mark svg { width: 24px; height: 24px; display: block; }
.nav-links { display: flex; gap: var(--sp-5); margin-left: auto; align-items: center; }
.nav-links a { font-size: var(--text-sm); font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--teal-700); }
.nav-cta { margin-left: var(--sp-4); }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); align-items: center; justify-content: center; }

/* hero */
.hero { position: relative; padding: calc(var(--nav-h) + var(--sp-9)) 0 var(--sp-9); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; }
.hero-bg .b1 { width: 480px; height: 480px; top: -120px; right: -80px; background: radial-gradient(circle, var(--teal-300), transparent 70%); animation: drift 18s var(--ease-in-out) infinite alternate; }
.hero-bg .b2 { width: 380px; height: 380px; bottom: -140px; left: -100px; background: radial-gradient(circle, #bfdbfe, transparent 70%); animation: drift 22s var(--ease-in-out) infinite alternate-reverse; }
.hero-bg .grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--overlay) 1px, transparent 1px), linear-gradient(90deg, var(--overlay) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(900px 500px at 50% 0%, #000, transparent 75%);
}
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 30px) scale(1.1); } }

.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-8); align-items: center; }
.hero-copy { max-width: 560px; }
.hero h1 { font-size: var(--text-hero); font-weight: 700; letter-spacing: -0.035em; margin: var(--sp-4) 0 var(--sp-5); }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--teal-600), var(--teal-400) 45%, var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lede { font-size: var(--text-lg); color: var(--muted); max-width: 48ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.hero-note { display: inline-flex; align-items: center; gap: 8px; margin-top: var(--sp-5); font-size: var(--text-sm); color: var(--teal-700); font-weight: 500; }
.hero-note svg { width: 18px; height: 18px; }

/* live odometer: the site-wide "MB converted" figure */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #14b8a6; animation: livePulse 2.4s var(--ease-in-out) infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(20, 184, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

/* digit columns */
.cm-odo { display: inline-flex; align-items: flex-start; height: 1em; overflow: hidden; }
.cm-odo .w { display: block; height: 1em; overflow: hidden; }
.cm-odo .w, .cm-odo .s, .cm-odo .s b { width: 0.62em; }
.cm-odo .s { display: block; will-change: transform; transition: transform 0.7s cubic-bezier(0.16, 0.84, 0.24, 1); }
.cm-odo .s b { display: block; height: 1em; line-height: 1; text-align: center; font-weight: 800; }
.cm-odo .sep { display: inline-block; width: 0.3em; text-align: center; }
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .cm-odo .s { transition: none; }
}

/* dropzone */
.dropzone {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, var(--surface), var(--teal-50));
  padding: var(--sp-9) var(--sp-7);
  text-align: center;
  box-shadow: var(--shadow-lg);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--teal-500);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}
.dropzone.drag { background: var(--teal-100); }
.dz-icon {
  width: 84px; height: 84px; margin: 0 auto var(--sp-5);
  border-radius: 22px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
  color: #fff; box-shadow: var(--shadow-teal);
}
.dz-icon svg { width: 38px; height: 38px; }
.dropzone h3 { font-size: var(--text-2xl); margin-bottom: var(--sp-3); }
.dropzone p { color: var(--muted); font-size: var(--text-base); }
.dz-formats { margin-top: var(--sp-5); font-family: var(--font-mono); font-size: var(--text-sm); line-height: 1.7; color: var(--muted-2); letter-spacing: 0.04em; }
.dz-cta { margin-top: var(--sp-6); }
.dz-samples { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }
.dz-samples span { font-size: var(--text-sm); color: var(--muted-2); }
.sample-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  font-size: var(--text-sm); font-weight: 500; color: var(--ink);
  box-shadow: var(--shadow-sm); transition: all var(--dur) var(--ease);
}
.sample-chip:hover { border-color: var(--teal-400); color: var(--teal-700); transform: translateY(-2px); box-shadow: var(--shadow); }
.sample-chip svg { width: 15px; height: 15px; color: var(--teal-500); }

/* trust strip */
.trust { border-block: 1px solid var(--border); background: rgba(255, 255, 255, 0.6); }
.trust .container { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--sp-6); align-items: center; padding-block: var(--sp-7); }
.trust-item { text-align: center; }
.trust-item .num { font-family: var(--font-mono); font-size: var(--text-xl); font-weight: 600; color: var(--teal-600); }
.trust-item .lbl { font-size: var(--text-sm); color: var(--muted); margin-top: 2px; }

/* live counter — ALLUNITS-style card, center of the trust strip */
.t-live {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  padding: var(--sp-5) var(--sp-6);
}
.t-live::before {
  content: ""; position: absolute; inset: -18px -40px; z-index: 0; border-radius: 28px;
  background: radial-gradient(closest-side, rgba(20, 184, 166, 0.13), rgba(191, 219, 254, 0.10) 62%, transparent 78%);
  pointer-events: none;
}
.t-live > * { position: relative; z-index: 1; }
.t-live-top { display: inline-flex; align-items: center; gap: 8px; }
.t-live-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal-600); }
.t-live-num {
  display: inline-flex; align-items: baseline; gap: 0.22em;
  font-family: var(--font-mono); font-weight: 800; line-height: 1;
  font-size: clamp(2.75rem, 6.5vw, 4.5rem); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--teal-700);
}
.t-live-unit { font-size: 0.34em; font-weight: 700; letter-spacing: 0.1em; color: var(--teal-500); }
.t-live-rule {
  width: 150px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-500), var(--blue));
}
.t-live-cap { font-size: var(--text-sm); color: var(--muted); margin: 0; }

/* sections */
.section { padding: var(--sp-9) 0; }
.section-head { max-width: 640px; margin-bottom: var(--sp-7); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--text-3xl); margin: var(--sp-3) 0 var(--sp-4); }
.section-head p { color: var(--muted); font-size: var(--text-lg); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.step { padding: var(--sp-6); position: relative; overflow: hidden; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step .step-no { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--teal-500); letter-spacing: 0.1em; }
.step .step-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-600); margin: var(--sp-4) 0; border: 1px solid var(--border); }
.step .step-ico svg { width: 24px; height: 24px; }
.step h3 { font-size: var(--text-lg); margin-bottom: var(--sp-2); }
.step p { color: var(--muted); font-size: var(--text-sm); }

/* formats */
.fmt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: var(--sp-3); }
.fmt-cell {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--sp-4) var(--sp-2); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: all var(--dur) var(--ease); text-align: center;
}
.fmt-cell:hover { border-color: var(--teal-400); transform: translateY(-3px); box-shadow: var(--shadow); }
.fmt-cell .ext { font-family: var(--font-mono); font-weight: 600; font-size: var(--text-base); color: var(--ink-strong); }
.fmt-cell .nm { font-size: var(--text-xs); color: var(--muted-2); }
.fmt-cell.in .ext { color: var(--teal-700); }
.fmt-cell.out { background: var(--teal-50); border-color: var(--border-strong); }
.fmt-legend { display: flex; gap: var(--sp-5); margin-bottom: var(--sp-5); font-size: var(--text-sm); color: var(--muted); }
.fmt-legend .k { display: inline-flex; align-items: center; gap: 8px; }
.fmt-legend .sw { width: 12px; height: 12px; border-radius: 4px; }

/* conversion matrix */
.matrix { display: flex; flex-direction: column; gap: var(--sp-3); }
.matrix-row { display: grid; grid-template-columns: 160px 1fr; gap: var(--sp-4); align-items: center; padding: var(--sp-4) var(--sp-5); }
.matrix-src { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-strong); }
.matrix-src .tag { font-family: var(--font-mono); font-size: var(--text-xs); padding: 4px 10px; border-radius: 7px; background: var(--teal-600); color: #fff; }
.matrix-src .arrow { color: var(--faint); }
.matrix-targets { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.matrix-targets a {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--muted);
  transition: all var(--dur-fast) var(--ease);
}
.matrix-targets a:hover { background: var(--teal-50); border-color: var(--teal-400); color: var(--teal-700); }

/* privacy */
.privacy-band { background: linear-gradient(135deg, var(--teal-700), var(--teal-600) 55%, #0e7490); color: #fff; border-radius: var(--radius-xl); padding: var(--sp-8); position: relative; overflow: hidden; box-shadow: var(--shadow-xl); }
.privacy-band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 90% 10%, rgba(94, 234, 212, 0.3), transparent 60%); pointer-events: none; }
.privacy-band .container { position: relative; z-index: 1; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: center; }
.privacy-band h2 { color: #fff; font-size: var(--text-3xl); margin-bottom: var(--sp-4); }
.privacy-band p { color: rgba(255, 255, 255, 0.85); font-size: var(--text-lg); }
.privacy-points { display: grid; gap: var(--sp-4); }
.privacy-point { display: flex; gap: var(--sp-3); align-items: flex-start; }
.privacy-point .pi { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.14); color: var(--teal-200); }
.privacy-point .pi svg { width: 20px; height: 20px; }
.privacy-point h4 { color: #fff; font-size: var(--text-base); margin-bottom: 2px; }
.privacy-point p { font-size: var(--text-sm); color: rgba(255, 255, 255, 0.78); }

/* faq */
.faq { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--sp-3); }
.faq-item { overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-5); background: none; border: none; text-align: left; font-size: var(--text-base); font-weight: 600; color: var(--ink-strong); }
.faq-q .chev { flex: none; width: 22px; height: 22px; color: var(--teal-500); transition: transform var(--dur) var(--ease); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease); }
.faq-a p { padding: 0 var(--sp-5) var(--sp-5); color: var(--muted); font-size: var(--text-sm); }

/* footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: var(--sp-8) 0 var(--sp-6); margin-top: var(--sp-9); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-7); }
.footer h4 { font-size: var(--text-sm); margin-bottom: var(--sp-4); color: var(--ink-strong); }
.footer p, .footer li { font-size: var(--text-sm); color: var(--muted); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--teal-700); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; align-items: center; margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--hairline); font-size: var(--text-xs); color: var(--muted-2); }
.footer-bottom .mono { font-family: var(--font-mono); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: var(--sp-7); }
  .hero-copy { max-width: none; }
  .steps { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .matrix-row { grid-template-columns: 1fr; gap: var(--sp-3); }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  /* the CTA sits outside the drawer, so hiding it would leave no header route to the converter */
  .nav-cta { flex: 0 0 auto; padding: 0 13px; min-height: 44px; font-size: var(--text-sm); white-space: nowrap; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--sp-5); gap: var(--sp-4); box-shadow: var(--shadow-lg);
  }
}
@media (max-width: 560px) {
  .trust .container { grid-template-columns: 1fr; gap: var(--sp-5); }
  .t-live { order: -1; gap: 5px; padding: var(--sp-4) var(--sp-3); }
  .t-live::before { inset: -12px 0; }
  .t-live-cap { font-size: var(--text-xs); }
  .footer-grid { grid-template-columns: 1fr; }
  .privacy-band { padding: var(--sp-6); }
  .section { padding: var(--sp-8) 0; }
  .nav .container { gap: var(--sp-4); padding-inline: var(--sp-4); }
  .nav-toggle { flex: 0 0 42px; }
  .nav-cta { margin-left: 0; padding: 0 10px; font-size: 12px; letter-spacing: 0; }
}
/* 320px legacy phones cannot fit brand + menu + CTA on one line */
@media (max-width: 350px) {
  .nav-cta { display: none; }
}
/* language switcher */
.lang-wrap{position:relative;display:inline-flex;align-items:center}
.lang-wrap .globe{position:absolute;left:9px;width:14px;height:14px;color:var(--teal-700);pointer-events:none}
.lang-select{appearance:none;-webkit-appearance:none;border:1px solid var(--border,#d3e8e0);border-radius:8px;background:#fff;color:var(--ink,#134E4A);font:500 13px/1 "IBM Plex Sans",system-ui,sans-serif;padding:8px 26px 8px 30px;cursor:pointer}
.lang-select:hover{border-color:#0d9488}
@media(max-width:560px){.lang-select{padding:7px 20px 7px 28px;max-width:128px}}
