/* ============================================
   Imageconvertix – Design System
   Matches: src/index.css + tailwind.config.ts
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --bg:          hsl(220, 20%, 6%);
  --fg:          hsl(210, 20%, 95%);
  --card:        hsl(220, 18%, 10%);
  --card-fg:     hsl(210, 20%, 95%);
  --primary:     hsl(174, 72%, 50%);
  --primary-fg:  hsl(220, 20%, 6%);
  --secondary:   hsl(220, 16%, 16%);
  --secondary-fg:hsl(210, 20%, 90%);
  --muted:       hsl(220, 14%, 14%);
  --muted-fg:    hsl(215, 15%, 55%);
  --border:      hsl(220, 14%, 18%);
  --ring:        hsl(174, 72%, 50%);
  --success:     hsl(150, 60%, 50%);
  --destructive: hsl(0, 72%, 55%);
  --radius:      0.75rem;
  --radius-sm:   calc(var(--radius) - 4px);
  --radius-md:   calc(var(--radius) - 2px);
  --glow:        174, 72%, 50%;
  --surface:     hsl(220, 16%, 12%);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid var(--border); }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  min-height: 100vh;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Space Grotesk', sans-serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ── Utility Classes ── */

/* Display / Visibility */
.hidden { display: none !important; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Flex helpers */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }
.shrink-0 { flex-shrink: 0; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0,1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.col-span-1 { grid-column: span 1; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-5 { grid-column: span 5; }

/* Spacing */
.p-0 { padding: 0; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-14 { padding-top: 3.5rem; }
.pt-28 { padding-top: 7rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-10 { padding-bottom: 2.5rem; }
.pb-14 { padding-bottom: 3.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-14 { margin-bottom: 3.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mb-0\.5 { margin-bottom: 0.125rem; }

/* Sizing */
.w-full { width: 100%; }
.w-fit { width: fit-content; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-xl  { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-md  { max-width: 28rem; }
.h-3  { height: 0.75rem; }
.h-4  { height: 1rem; }
.h-5  { height: 1.25rem; }
.h-6  { height: 1.5rem; }
.h-8  { height: 2rem; }
.h-9  { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.w-3  { width: 0.75rem; }
.w-4  { width: 1rem; }
.w-5  { width: 1.25rem; }
.w-6  { width: 1.5rem; }
.w-8  { width: 2rem; }
.w-9  { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-14 { width: 3.5rem; }

/* Typography */
.text-xs   { font-size: 0.75rem; line-height: 1rem; }
.text-sm   { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg   { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 1.5rem; line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl  { font-size: 3rem; line-height: 1.1; }
.text-6xl  { font-size: 3.75rem; line-height: 1; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-display  { font-family: 'Space Grotesk', sans-serif; }
.leading-tight   { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Colors */
.text-foreground      { color: var(--fg); }
.text-muted-foreground{ color: var(--muted-fg); }
.text-primary         { color: var(--primary); }
.text-primary-foreground { color: var(--primary-fg); }
.text-white           { color: #fff; }
.bg-background        { background-color: var(--bg); }
.bg-card              { background-color: var(--card); }
.bg-secondary         { background-color: var(--secondary); }
.bg-primary\/5        { background-color: hsl(174,72%,50%,0.05); }
.bg-primary\/10       { background-color: hsl(174,72%,50%,0.1); }
.bg-primary\/15       { background-color: hsl(174,72%,50%,0.15); }
.bg-primary\/20       { background-color: hsl(174,72%,50%,0.2); }
.text-emerald-400 { color: hsl(160,84%,60%); }
.text-blue-400    { color: hsl(213,94%,68%); }
.text-amber-400   { color: hsl(43,96%,56%); }
.text-violet-400  { color: hsl(263,90%,75%); }
.text-rose-400    { color: hsl(351,95%,71%); }
.text-yellow-400  { color: hsl(48,96%,53%); }
.text-cyan-400    { color: hsl(188,94%,60%); }

/* Borders */
.border           { border-width: 1px; border-style: solid; border-color: var(--border); }
.border-t         { border-top: 1px solid var(--border); }
.border-b         { border-bottom: 1px solid var(--border); }
.border-border    { border-color: var(--border); }
.border-primary\/20 { border-color: hsl(174,72%,50%,0.2); }
.border-primary\/30 { border-color: hsl(174,72%,50%,0.3); }
.border-primary\/50 { border-color: hsl(174,72%,50%,0.5); }
.border-primary   { border-color: var(--primary); }

/* Border Radius */
.rounded     { border-radius: 0.25rem; }
.rounded-lg  { border-radius: var(--radius); }
.rounded-xl  { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full{ border-radius: 9999px; }

/* Shadows */
.shadow-lg  { box-shadow: 0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1); }
.shadow-xl  { box-shadow: 0 20px 25px -5px rgb(0 0 0/.1),0 8px 10px -6px rgb(0 0 0/.1); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Relative/Absolute */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }

/* Z-Index */
.z-50 { z-index: 50; }

/* Aspect Ratio */
.aspect-video { aspect-ratio: 16/9; }

/* Object Fit */
.object-cover { object-fit: cover; }

/* Resize */
.resize-none { resize: none; }

/* Opacity */
.opacity-0   { opacity: 0; }
.opacity-90  { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Select */
.select-none { user-select: none; }

/* Space between */
.space-y-2   > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3   > * + * { margin-top: 0.75rem; }
.space-y-4   > * + * { margin-top: 1rem; }
.space-y-5   > * + * { margin-top: 1.25rem; }
.space-y-8   > * + * { margin-top: 2rem; }
.space-x-4   > * + * { margin-left: 1rem; }

/* List */
.list-disc { list-style-type: disc; }
.list-none { list-style-type: none; }
.pl-5 { padding-left: 1.25rem; }

/* Table */
table { border-collapse: collapse; }
.w-full { width: 100%; }
th, td { text-align: left; padding: 0.75rem 0; }
th { font-weight: 600; }

/* Transition */
.transition-all      { transition: all 0.2s ease; }
.transition-colors   { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.transition-opacity  { transition: opacity 0.2s ease; }
.transition-transform{ transition: transform 0.3s ease; }
.duration-200 { transition-duration: 0.2s; }
.duration-300 { transition-duration: 0.3s; }

/* Transform */
.translate-x-0 { transform: translateX(0); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-top-3    { top: -0.75rem; }
.left-1\/2 { left: 50%; }
.shrink-0  { flex-shrink: 0; }
.min-w-0   { min-width: 0; }

/* ── Custom Utilities ── */

.glow-border {
  box-shadow:
    0 0 20px -5px hsl(var(--glow) / 0.3),
    inset 0 0 20px -10px hsl(var(--glow) / 0.1);
}

.glow-text {
  text-shadow: 0 0 30px hsl(var(--glow) / 0.5);
}

.gradient-primary {
  background: linear-gradient(135deg, hsl(174, 72%, 50%), hsl(190, 80%, 45%));
}

.gradient-surface {
  background: linear-gradient(180deg, hsl(220,18%,10%), hsl(220,20%,6%));
}

.drop-zone-active {
  border-color: var(--primary) !important;
  background: hsl(174,72%,50%,0.08) !important;
}

/* ── Layout ── */

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(220,14%,18%,0.5);
  background: hsl(220,20%,6%,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideDown 0.5s ease;
}

@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.nav-inner {
  display: flex;
  height: 4rem;
  max-width: 72rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav-logo-icon {
  display: flex;
  height: 2rem; width: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, hsl(174,72%,50%), hsl(190,80%,45%));
}

.nav-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--fg);
}

.nav-logo-text span { color: var(--primary); }

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--muted-fg);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--fg); }

.nav-hamburger {
  display: flex;
  height: 2.25rem; width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
}

.mobile-menu {
  display: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  animation: mobileMenuOpen 0.2s ease;
}

@keyframes mobileMenuOpen {
  from { height: 0; opacity: 0; }
  to   { opacity: 1; }
}

.mobile-menu.open { display: block; }

.mobile-menu-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-menu a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  transition: background 0.15s, color 0.15s;
}
.mobile-menu a:hover { background: var(--secondary); color: var(--fg); }

/* ── Hero Section ── */
.hero-section {
  padding: 7rem 1.5rem 2.5rem;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
}

.hero-subtitle {
  margin: 1.25rem auto 0;
  max-width: 36rem;
  color: var(--muted-fg);
  font-size: 1rem;
}

/* ── Tab Bar ── */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-fg);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover { border-color: hsl(174,72%,50%,0.5); color: var(--fg); }
.tab-btn.active {
  border-color: var(--primary);
  background: hsl(174,72%,50%,0.15);
  color: var(--primary);
  box-shadow: 0 0 20px -5px hsl(var(--glow)/0.3), inset 0 0 20px -10px hsl(var(--glow)/0.1);
}

.tab-content { display: none; margin-top: 2rem; }
.tab-content.active { display: block; animation: fadeInUp 0.3s ease; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: hsl(174,72%,50%,0.3);
  background: hsl(174,72%,50%,0.04);
  box-shadow: 0 8px 32px -8px hsl(174,72%,50%,0.1);
}

.card-icon {
  display: flex;
  height: 2.5rem; width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: hsl(174,72%,50%,0.15);
  color: var(--primary);
  margin: 0 auto 1rem;
  transition: background 0.2s, transform 0.2s;
}
.card:hover .card-icon { background: hsl(174,72%,50%,0.25); transform: scale(1.05); }

.card h2, .card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.card p { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.6; }

/* ── Format Link (used in Image Converters grid on tools.html) ── */
.format-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--card);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-fg);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.format-link:hover {
  border-color: hsl(174,72%,50%,0.4);
  color: var(--primary);
  background: hsl(174,72%,50%,0.06);
  box-shadow: 0 2px 12px -4px hsl(174,72%,50%,0.2);
}

/* ── Section Titles ── */
.section {
  padding: 3.5rem 1.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  border: 1px solid hsl(174,72%,50%,0.2);
  background: hsl(174,72%,50%,0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted-fg);
  max-width: 32rem;
  margin: 0 auto;
}

/* ── CTA Block ── */
.cta-block {
  border: 1px solid hsl(174,72%,50%,0.2);
  border-radius: 0.75rem;
  background: var(--card);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 20px -5px hsl(174,72%,50%,0.3), inset 0 0 20px -10px hsl(174,72%,50%,0.1);
}

.cta-block h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.75rem;
}

.cta-block p { color: var(--muted-fg); max-width: 32rem; margin: 0 auto 1.5rem; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, hsl(174,72%,50%), hsl(190,80%,45%));
  color: var(--primary-fg);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid hsl(174,72%,50%,0.3);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-outline:hover { background: hsl(174,72%,50%,0.05); }

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover,
.drop-zone.drag-over { border-color: var(--primary); background: hsl(174,72%,50%,0.05); }

/* ── Quality Slider ── */
.quality-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: var(--secondary);
  outline: none;
}
.quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 9999px;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 0 4px hsl(174,72%,50%,0.2);
}

/* ── Results Panel ── */
.result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  transition: border-color 0.2s;
}
.result-item:hover { border-color: hsl(174,72%,50%,0.3); }

.result-thumb {
  width: 3rem; height: 3rem;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.size-badge {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: hsl(174,72%,50%,0.1);
  color: var(--primary);
  font-weight: 600;
}

/* ── Accordion ── */
.accordion-item {
  border: 1px solid hsl(220,14%,20%);
  border-radius: 1rem;
  background: hsl(220,18%,10%);
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
.accordion-item.open {
  border-color: hsl(174,72%,50%,0.4);
  background: hsl(174,72%,50%,0.07);
  box-shadow: 0 4px 24px -6px hsl(174,72%,50%,0.15);
}
.accordion-item:hover:not(.open) {
  border-color: hsl(220,14%,28%);
  background: hsl(220,18%,11%);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
  gap: 1rem;
}
.accordion-trigger:hover { color: var(--primary); }
.accordion-item.open .accordion-trigger { color: var(--fg); }

.accordion-icon {
  width: 1.125rem; height: 1.125rem;
  flex-shrink: 0;
  color: hsl(215,15%,45%);
  transition: transform 0.3s ease, color 0.3s ease;
}
.accordion-item:hover:not(.open) .accordion-icon { color: var(--fg); }
.accordion-item.open .accordion-icon { transform: rotate(180deg); color: var(--primary); }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.accordion-item.open .accordion-content {
  max-height: 500px;
}
.accordion-content-inner {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: 1.75;
  padding: 0 1.5rem 1.375rem;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem 1.5rem 2rem;
  overflow-x: hidden;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  max-width: 72rem;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  }
}

.footer-brand p { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.625; margin-top: 0.75rem; }

.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }

.footer-col a {
  font-size: 0.875rem;
  color: var(--muted-fg);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  flex-wrap: wrap;
  text-align: center;
}
.footer-bottom > div {
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom a:hover { color: var(--fg); }

/* ── Input / Form ── */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.375rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--muted-fg); }
.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(174,72%,50%,0.2);
}
.form-textarea { resize: none; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--card);
  border: 1px solid hsl(174,72%,50%,0.3);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 25px rgb(0,0,0,0.3);
  z-index: 9999;
  animation: toastIn 0.3s ease;
  max-width: 20rem;
}
.toast h4 { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--fg); font-size: 0.875rem; }
.toast p  { font-size: 0.75rem; color: var(--muted-fg); margin-top: 0.25rem; }

@keyframes toastIn {
  from { transform: translateY(1rem); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Target Size Selector ── */
.size-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.size-chip {
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: transparent;
  color: var(--muted-fg);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.size-chip:hover { border-color: hsl(174,72%,50%,0.5); color: var(--fg); }
.size-chip.active { border-color: var(--primary); color: var(--primary); background: hsl(174,72%,50%,0.1); }

/* ── Popular Conversion Tool Buttons ── */
.conv-btn {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  width: 100%;
}
.conv-btn:hover {
  border-color: hsl(174,72%,50%,0.3);
  background: hsl(174,72%,50%,0.04);
  box-shadow: 0 8px 24px -4px hsl(0,0%,0%,0.2);
}
.conv-btn-icon {
  display: flex;
  height: 3.25rem; width: 3.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  flex-shrink: 0;
  transition: transform 0.25s;
}
.conv-btn:hover .conv-btn-icon { transform: scale(1.08); }
.conv-btn-icon svg { color: white; }
.conv-btn h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.9375rem; color: var(--fg); }
.conv-btn p  { font-size: 0.8125rem; color: var(--muted-fg); margin-top: 0.2rem; }
.conv-btn-arrow { margin-left: auto; color: hsl(215,15%,45%); transition: transform 0.25s, color 0.25s; flex-shrink: 0; }
.conv-btn:hover .conv-btn-arrow { transform: translateX(4px); color: var(--primary); }

/* ── Pricing cards ── */
.pricing-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  padding: 1.5rem;
}
.pricing-card.featured {
  border-color: hsl(174,72%,50%,0.3);
  box-shadow: 0 0 20px -5px hsl(174,72%,50%,0.3), inset 0 0 20px -10px hsl(174,72%,50%,0.1);
}
.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, hsl(174,72%,50%), hsl(190,80%,45%));
  color: var(--primary-fg);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.pricing-price { font-family: 'Space Grotesk', sans-serif; font-size: 2.25rem; font-weight: 700; color: var(--fg); }
.pricing-period { font-size: 0.875rem; color: var(--muted-fg); }
.pricing-feature { display: flex; align-items: flex-start; gap: 0.625rem; font-size: 0.875rem; color: var(--fg); }
.pricing-check { color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* ── Blog ── */
.blog-card {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  background: var(--card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, background 0.3s;
}
.blog-card:hover { border-color: hsl(174,72%,50%,0.3); background: hsl(174,72%,50%,0.05); }
.blog-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform 0.3s; }
.blog-card:hover img { transform: scale(1.05); }
.blog-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.blog-category {
  display: inline-block;
  padding: 0.125rem 0.75rem;
  border-radius: 9999px;
  background: hsl(174,72%,50%,0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.blog-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
.blog-card:hover h2 { color: var(--primary); }
.blog-card p { font-size: 0.875rem; color: var(--muted-fg); flex: 1; }
.blog-meta { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--muted-fg); margin-top: auto; padding-top: 1rem; align-items: center; }

/* ── Animate on scroll ── */
.anim-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-hidden.anim-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .sm\:flex-row    { flex-direction: row; }
  .sm\:text-lg     { font-size: 1.125rem; }
  .sm\:text-4xl    { font-size: 2.25rem; line-height: 2.5rem; }
  .sm\:text-5xl    { font-size: 3rem; line-height: 1.1; }
  .sm\:pt-36       { padding-top: 9rem; }
  .hero-section    { padding: 9rem 1.5rem 4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: row; text-align: left; }
  .footer-bottom > div { justify-content: flex-start; }
  .nav-hamburger { display: none; }
  .nav-links     { display: flex; }
}

@media (min-width: 768px) {
  .md\:max-w-screen-md { max-width: 48rem; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .lg\:col-span-1  { grid-column: span 1; }
  .lg\:col-span-2  { grid-column: span 2; }
  .lg\:col-span-3  { grid-column: span 3; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }
}

/* Prose for blog posts */
.prose h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--fg); margin: 2rem 0 1rem; }
.prose h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 600; color: var(--fg); margin: 1.5rem 0 0.75rem; }
.prose p  { color: var(--muted-fg); margin-bottom: 1rem; line-height: 1.75; font-size: 0.9375rem; }
.prose ul { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--muted-fg); }
.prose li { margin-bottom: 0.4rem; line-height: 1.7; font-size: 0.9375rem; }
.prose strong { color: var(--fg); font-weight: 600; }

/* Mobile bottom padding (for mobile nav bar) */
@media (max-width: 639px) {
  body { padding-bottom: 3.5rem; }
}

/* ── Image Format Selector Buttons ── */
.fmt-btn {
  padding: .75rem .5rem;
  border: 1px solid var(--border);
  border-radius: .875rem;
  background: var(--card);
  color: var(--fg);
  font-family: 'Space Grotesk', sans-serif;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  line-height: 1.3;
}
.fmt-btn:hover:not(:disabled) {
  border-color: hsl(174,72%,50%,0.5);
  background: hsl(174,72%,50%,0.06);
}
.fmt-btn.selected {
  border-color: var(--primary);
  background: hsl(174,72%,50%,0.15);
  color: var(--primary);
  box-shadow: 0 0 18px -5px hsl(174,72%,50%,0.35), inset 0 0 18px -8px hsl(174,72%,50%,0.1);
}
.fmt-btn.server-only {
  opacity: 1;
  cursor: pointer;
  font-weight: 700;
  color: var(--fg);
  /* Same neutral look as regular buttons — no teal until selected/hover */
  border-color: var(--border);
  background: var(--card);
}
.fmt-btn.server-only:hover {
  border-color: hsl(174,72%,50%,0.5);
  background: hsl(174,72%,50%,0.06);
}
.fmt-btn.server-only.selected {
  border-color: var(--primary);
  background: hsl(174,72%,50%,0.15);
  color: var(--primary);
  box-shadow: 0 0 18px -5px hsl(174,72%,50%,0.35), inset 0 0 18px -8px hsl(174,72%,50%,0.1);
}
.fmt-btn.server-only span {
  display: block;
  font-size: .6rem;
  font-weight: 600;
  margin-top: .2rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  /* Amber badge — clearly different from the teal "selected" colour */
  color: hsl(38,95%,60%);
  opacity: 0.9;
}
.fmt-btn.server-only.selected span {
  /* When selected, badge goes teal to match the selected state */
  color: var(--primary);
}
/* Server conversion progress panel */
#server-conv-status {
  margin-top: .75rem;
  padding: .75rem 1rem;
  border-radius: .875rem;
  background: hsl(174,72%,50%,0.08);
  border: 1px solid hsl(174,72%,50%,0.2);
  color: var(--primary);
  font-size: .8125rem;
  font-weight: 500;
  display: none;
  text-align: center;
  animation: fadeInUp 0.3s ease;
}
#server-conv-status.error {
  background: hsl(0,72%,50%,0.08);
  border-color: hsl(0,72%,50%,0.25);
  color: hsl(0,80%,65%);
}
@media (min-width: 640px) {
  #img-fmt-grid { grid-template-columns: repeat(5, 1fr) !important; }
}


/* ── Document Conversion Type Buttons ── */
.doc-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .625rem .375rem;
  border: 1px solid var(--border);
  border-radius: .875rem;
  background: var(--card);
  color: var(--muted-fg);
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
  text-align: center;
}
.doc-type-btn svg { flex-shrink: 0; }
.doc-type-btn:hover {
  border-color: hsl(174,72%,50%,0.4);
  color: var(--fg);
}
.doc-type-btn.selected {
  border-color: var(--primary);
  background: hsl(174,72%,50%,0.15);
  color: var(--primary);
  box-shadow: 0 0 18px -5px hsl(174,72%,50%,0.35), inset 0 0 18px -8px hsl(174,72%,50%,0.1);
}

