/* ==========================================================================
   ConvertFileHub — design system
   Dark-first, lime accent, no framework.
   ========================================================================== */

:root {
  --bg: #06090e;
  --bg-2: #0a1018;
  --surface: #0d151f;
  --card: #101a26;
  --card-2: #14202e;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --ink: #e9eff8;
  --muted: #93a4b8;
  --dim: #6b7d92;
  --accent: #a3e635;
  --accent-2: #38bdf8;
  --accent-ink: #0a1300;
  --danger: #fb7185;
  --ok: #34d399;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --max: 1180px;
}

[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-2: #eef2f7;
  --surface: #ffffff;
  --card: #ffffff;
  --card-2: #f4f7fb;
  --line: rgba(9, 30, 66, 0.1);
  --line-2: rgba(9, 30, 66, 0.2);
  --ink: #0b1524;
  --muted: #55677d;
  --dim: #7b8ba0;
  --accent: #4d7c0f;
  --accent-2: #0369a1;
  --accent-ink: #f7ffe8;
  --shadow: 0 20px 50px -30px rgba(9, 30, 66, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(163, 230, 53, 0.13), transparent 60%),
    radial-gradient(760px 460px at 88% 0%, rgba(56, 189, 248, 0.12), transparent 62%);
  z-index: 0;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(77, 124, 15, 0.1), transparent 60%),
    radial-gradient(760px 460px at 88% 0%, rgba(3, 105, 161, 0.08), transparent 62%);
}

img,
svg,
canvas,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
h3 {
  font-size: 1.15rem;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Layout ------------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
  position: relative;
  z-index: 1;
}

.main {
  min-height: 60vh;
  padding-bottom: 72px;
}

.section {
  padding-top: 64px;
  padding-bottom: 64px;
}

.section--tight {
  padding-top: 40px;
  padding-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.lede {
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 62ch;
}

.muted {
  color: var(--muted);
}
.dim {
  color: var(--dim);
}
.small {
  font-size: 0.86rem;
}
.center {
  text-align: center;
}
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; }
.hide { display: 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;
}

/* Header ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}

.nav__in {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  white-space: nowrap;
}

.logo__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #04120a;
  font-weight: 800;
  font-size: 0.95rem;
}

.logo__hub {
  color: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: 12px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__spacer {
  flex: 1;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  --btn-bg: var(--card);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--line-2);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  border-color: transparent;
  box-shadow: 0 10px 30px -14px rgba(163, 230, 53, 0.7);
}

.btn--primary:hover:not(:disabled) {
  box-shadow: 0 14px 34px -12px rgba(163, 230, 53, 0.65);
}

.btn--ghost {
  background: transparent;
}

.btn--sm {
  padding: 7px 12px;
  font-size: 0.84rem;
  border-radius: 10px;
}

.btn--block {
  width: 100%;
}

/* Hero -------------------------------------------------------------------- */

.hero {
  padding-top: 64px;
  padding-bottom: 28px;
}

.hero__title {
  max-width: 16ch;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  margin-top: 18px;
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--dim);
}

.trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex: none;
}

/* Drop zone --------------------------------------------------------------- */

.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  padding: 30px 22px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
}

.dropzone.is-over {
  transform: scale(1.006);
}

.dropzone__icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.dropzone__title {
  font-weight: 650;
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.dropzone__hint {
  font-size: 0.84rem;
  color: var(--dim);
}

.dropzone--hero {
  padding: 46px 26px;
  margin-top: 34px;
  box-shadow: var(--shadow);
}

.dropzone--hero .dropzone__icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

/* Cards & grids ----------------------------------------------------------- */

.grid {
  display: grid;
  gap: 16px;
}

.grid--3 {
  /* Auto-fit keeps 4-tool groups on one row on desktop and reflows cleanly. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  display: block;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--card-2);
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  margin-bottom: 14px;
}

.card__title {
  font-weight: 650;
  font-size: 1rem;
  margin-bottom: 4px;
}

.card__desc {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.5;
}

.card__meta {
  margin-top: 14px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.tool-group + .tool-group {
  margin-top: 44px;
}

.tool-group__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.tool-group__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tool-group__head span {
  font-size: 0.8rem;
  color: var(--dim);
}

/* Panels & forms ---------------------------------------------------------- */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 18px;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel__title {
  font-weight: 650;
  font-size: 1rem;
  margin: 0;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > label,
.field__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

select,
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

select:hover,
input:hover,
textarea:hover {
  border-color: var(--line-2);
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.87rem;
  line-height: 1.55;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}

.check input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.row--between {
  justify-content: space-between;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* File list --------------------------------------------------------------- */

.files {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  font-size: 0.9rem;
}

.file__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file__meta {
  font-size: 0.78rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.file__x {
  border: 0;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  line-height: 1;
}

.file__x:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}

.result__thumb {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
  background: var(--card-2);
  border: 1px solid var(--line);
  flex: none;
}

.result__body {
  flex: 1;
  min-width: 0;
}

.result__name {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result__meta {
  font-size: 0.78rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.result--ok .result__name::after {
  content: "";
}

/* Progress ---------------------------------------------------------------- */

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--card-2);
  overflow: hidden;
  margin-top: 16px;
}

.progress__bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s ease;
}

/* Tabs -------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

.tabpanel[hidden] {
  display: none;
}

/* Steps ------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  counter-reset: step;
}

.step {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* FAQ --------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 10px;
  max-width: 860px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 4px 18px;
}

.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 0.97rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Breadcrumb & page header ------------------------------------------------ */

.crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--dim);
  padding: 22px 0 0;
}

.crumbs a:hover {
  color: var(--ink);
}

.page-head {
  padding: 18px 0 26px;
  max-width: 76ch;
}

.page-head h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.page-head p {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}

.side-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.side-card h3 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

.side-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 0.9rem;
}

.side-card a {
  color: var(--muted);
}

.side-card a:hover {
  color: var(--accent);
}

/* Ad slots ---------------------------------------------------------------- */

.ad {
  border: 1px dashed var(--line);
  border-radius: 12px;
  min-height: 96px;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--card) 60%, transparent);
}

.ad--inline {
  min-height: 120px;
  margin: 28px 0;
}

/* Toast ------------------------------------------------------------------- */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 100;
  display: grid;
  gap: 8px;
  width: min(92vw, 420px);
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease;
}

.toast--err {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
}

.toast--ok {
  border-color: color-mix(in srgb, var(--ok) 45%, var(--line));
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Footer ------------------------------------------------------------------ */

.footer {
  border-top: 1px solid var(--line);
  padding: 42px 0 34px;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer__in {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
}

.footer__brand {
  max-width: 34ch;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}

.footer__links a:hover {
  color: var(--ink);
}

.footer__bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--dim);
}

/* Prose ------------------------------------------------------------------- */

.prose {
  max-width: 74ch;
  color: var(--muted);
}

.prose h2 {
  color: var(--ink);
  margin-top: 2em;
}

.prose h3 {
  color: var(--ink);
  margin-top: 1.6em;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Utility ----------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.badge--accent {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.kbd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--dim);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
  }
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nav__links {
    display: none;
  }
}

@media (max-width: 640px) {
  .grid--2,
  .steps {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 40px;
    padding-bottom: 18px;
  }
  .panel {
    padding: 18px;
  }
  .section {
    padding-top: 44px;
    padding-bottom: 44px;
  }
  .footer__in {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
