/* ConvertAny2Any — shared styles
   Spacing, type and radius values follow one fixed scale. Do not add values outside it. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* spacing */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px;
  --s-300: 24px; --s-400: 32px; --s-500: 40px; --s-600: 48px;
  --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* radius (Tailwind steps) */
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;

  /* colour */
  --bg: #ffffff;
  --surface: #f5f5f3;
  --surface-2: #ebebe8;
  --line: #e2e2de;
  --text: #111111;
  --muted: #5c5c5c;
  --accent: #1f5eff;
  --accent-soft: #e8efff;
  --ok: #157f3b;
  --ok-soft: #e6f4ea;
  --err: #b42318;
  --err-soft: #fdecea;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-md); }

/* ---------- text styles ---------- */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.02em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.01em; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-1 { font-size: 14px; line-height: 20px; font-weight: 500; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-4 { font-size: 12px; line-height: 16px; font-weight: 500; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }
.muted { color: var(--muted); }

@media (max-width: 720px) {
  .heading-1 { font-size: 36px; line-height: 40px; }
  .heading-2 { font-size: 30px; line-height: 36px; }
  .heading-3 { font-size: 30px; line-height: 36px; }
  .heading-4 { font-size: 24px; line-height: 32px; }
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s-300); }
.section { padding: var(--s-900) 0; }
.section--tint { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: var(--s-600); }
.section-head p { margin-top: var(--s-200); }
@media (max-width: 720px) { .section { padding: var(--s-700) 0; } }

.skip {
  position: absolute; left: var(--s-200); top: -100px; z-index: 100;
  background: var(--text); color: #fff; padding: var(--s-75) var(--s-100);
  border-radius: var(--r-lg); text-decoration: none;
}
.skip:focus { top: var(--s-200); }

/* ---------- icons ---------- */
.icon { width: 20px; height: 20px; flex: none; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 32px; height: 32px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100);
  border: 1px solid transparent; border-radius: var(--r-xl);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), transform 300ms var(--ease), opacity 300ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--text); color: #fff; }
.btn--primary:hover { background: #2d2d2d; }
.btn--ghost { background: var(--bg); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); }
.btn--lg { padding: var(--s-100) var(--s-300); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn--icon { padding: var(--s-75); border-radius: var(--r-lg); }

/* ---------- navigation ---------- */
.nav {
  position: fixed; top: var(--s-200); left: 50%; transform: translateX(-50%);
  z-index: 50; width: max-content; max-width: calc(100% - var(--s-400));
  display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200);
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--r-2xl);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-75); text-decoration: none; font-weight: 600; }
.brand img { width: 24px; height: 24px; }
.nav__links { display: flex; align-items: center; gap: var(--s-50); list-style: none; padding: 0; }
.nav__links a {
  display: block; padding: var(--s-75) var(--s-100); border-radius: var(--r-lg);
  text-decoration: none; color: var(--muted);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.nav__links a:hover { background: var(--surface); color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); background: var(--surface); }
.nav__toggle { display: none; background: none; border: 0; padding: var(--s-75); cursor: pointer; border-radius: var(--r-lg); }
.burger { position: relative; width: 20px; height: 14px; }
.burger span {
  position: absolute; left: 0; width: 20px; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform 500ms var(--ease), opacity 300ms var(--ease);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { top: 6px; }
.burger span:nth-child(3) { top: 12px; }
.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  padding: var(--s-900) var(--s-300) var(--s-400);
  opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease);
}
.nav-open .menu { opacity: 1; pointer-events: auto; }
.menu ul { list-style: none; padding: 0; display: grid; gap: var(--s-75); }
.menu a {
  display: block; padding: var(--s-100) 0; text-decoration: none;
  opacity: 0; transform: translateY(24px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
.menu a[aria-current="page"] { color: var(--accent); }
.nav-open .menu a { opacity: 1; transform: none; }
.nav-open .menu li:nth-child(2) a { transition-delay: 60ms; }
.nav-open .menu li:nth-child(3) a { transition-delay: 120ms; }
.nav-open .menu li:nth-child(4) a { transition-delay: 180ms; }
.nav-open .menu li:nth-child(5) a { transition-delay: 240ms; }

@media (max-width: 720px) {
  .nav { left: var(--s-200); right: var(--s-200); width: auto; max-width: none; transform: none; justify-content: space-between; }
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
}
@media (min-width: 721px) { .menu { display: none; } }

/* ---------- hero ---------- */
.hero { padding: calc(var(--s-900) + var(--s-600)) 0 var(--s-800); text-align: center; }
.hero__title {
  max-width: 680px; margin: 0 auto;
  background: linear-gradient(90deg, #000000, #666666);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { max-width: 680px; margin: var(--s-300) auto 0; color: var(--muted); }
.hero__proof {
  display: inline-flex; align-items: center; gap: var(--s-75);
  margin-top: var(--s-300); color: var(--ok);
}
@media (max-width: 720px) { .hero { padding: calc(var(--s-900) + var(--s-200)) 0 var(--s-600); } }

/* ---------- converter ---------- */
.tool {
  max-width: 800px; margin: var(--s-500) auto 0; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3xl);
  padding: var(--s-200);
}
.drop {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-200);
  padding: var(--s-700) var(--s-300); text-align: center;
  background: var(--bg); border: 2px dashed #c9c9c4; border-radius: var(--r-lg);
  cursor: pointer;
  transition: border-color 300ms var(--ease), background-color 300ms var(--ease);
}
.drop:hover { border-color: #9a9a95; }
.drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop__icon {
  display: grid; place-items: center; width: 64px; height: 64px;
  border-radius: var(--r-full); background: var(--surface); color: var(--text);
}
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tool.has-files .drop { padding: var(--s-300); flex-direction: row; justify-content: center; }
.tool.has-files .drop__icon, .tool.has-files .drop__hint { display: none; }

.options {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-200);
  padding: var(--s-200) var(--s-75) var(--s-75);
}
.seg { display: inline-flex; gap: var(--s-25); padding: var(--s-25); background: var(--surface-2); border-radius: var(--r-lg); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span {
  display: block; padding: var(--s-50) var(--s-100); border-radius: var(--r-md); color: var(--muted);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.seg input:checked + span { background: var(--bg); color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.options__label { display: inline-flex; align-items: center; gap: var(--s-100); }

.files { list-style: none; padding: 0; margin-top: var(--s-75); display: grid; gap: var(--s-75); }
.file {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: var(--s-200);
  padding: var(--s-75); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  animation: rise 500ms var(--ease) both;
}
.file__thumb { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--surface-2); object-fit: cover; overflow: hidden; }
.file__info { min-width: 0; }
.file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__meta { color: var(--muted); }
.file__meta.is-error { color: var(--err); }
.file__actions { display: flex; align-items: center; gap: var(--s-50); }
.file .btn--icon { background: none; border: 0; color: var(--muted); }
.file .btn--icon:hover { background: var(--surface); color: var(--text); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transform: translateX(-100%); animation: shimmer 1200ms var(--ease) infinite;
}
.bar { width: 120px; height: 8px; border-radius: var(--r-full); margin-top: var(--s-75); }
.badge {
  display: inline-flex; align-items: center; gap: var(--s-50);
  padding: var(--s-25) var(--s-75); border-radius: var(--r-full);
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-200);
  padding: var(--s-200) var(--s-75) var(--s-75);
}
.toolbar__actions { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.notice {
  display: flex; gap: var(--s-75); align-items: flex-start;
  margin-top: var(--s-75); padding: var(--s-100) var(--s-200);
  background: var(--err-soft); color: var(--err); border-radius: var(--r-lg);
}
[hidden] { display: none !important; }

@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- tagline reveal ---------- */
.tagline { max-width: 880px; }
.tagline .w { color: rgba(17, 17, 17, 0.28); transition: color 500ms var(--ease); }
.tagline .w.on { color: var(--text); }

/* ---------- cards ---------- */
.grid { display: grid; gap: var(--s-300); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid--4, .grid--3 { grid-template-columns: 1fr; } }
.card { padding: var(--s-300); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.card__icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: var(--s-200);
  border-radius: var(--r-lg); background: var(--surface); color: var(--text);
}
.card h3 { margin-bottom: var(--s-75); }
.step__num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-bottom: var(--s-200);
  border-radius: var(--r-full); background: var(--text); color: #fff;
}

/* ---------- prose (article + legal pages) ---------- */
.prose { max-width: 720px; }
.prose h2 { margin: var(--s-600) 0 var(--s-200); }
.prose h3 { margin: var(--s-400) 0 var(--s-100); }
.prose p, .prose ul, .prose ol { margin-bottom: var(--s-200); color: #333333; }
.prose ul, .prose ol { padding-left: var(--s-300); }
.prose li { margin-bottom: var(--s-75); }
.prose a { color: var(--accent); }
.page-top { padding-top: calc(var(--s-900) + var(--s-600)); }
@media (max-width: 720px) { .page-top { padding-top: calc(var(--s-900) + var(--s-200)); } }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; margin-bottom: var(--s-200); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
th, td { text-align: left; padding: var(--s-100) var(--s-200); border-bottom: 1px solid var(--line); }
th { font-weight: 600; background: var(--surface); }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; display: grid; gap: var(--s-75); }
.faq details { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-200);
  padding: var(--s-200) var(--s-300); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform 500ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq details p { padding: 0 var(--s-300) var(--s-300); color: #333333; }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta p { max-width: 560px; margin: var(--s-200) auto var(--s-400); }

/* ---------- footer ---------- */
.footer { padding: var(--s-700) 0 var(--s-500); border-top: 1px solid var(--line); }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-400); }
.footer__links { display: flex; flex-wrap: wrap; gap: var(--s-300); list-style: none; padding: 0; }
.footer__links a { text-decoration: none; color: var(--muted); transition: color 300ms var(--ease); }
.footer__links a:hover { color: var(--text); }
.footer__note { margin-top: var(--s-300); }

/* ---------- scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js .reveal { transform: none; transition: opacity 300ms var(--ease); }
  .menu a, .burger span { transform: none !important; transition: opacity 300ms var(--ease); }
  .tagline .w { color: var(--text); transition: none; }
}

.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.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; }
.nowrap { white-space: nowrap; }
@media (max-width: 720px) { .br-desk { display: none; } }
