/* ============================================================
   ImageToolX — styles.css
   Utilitarian dark-first design. Clean, fast, trustworthy.
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --brand:        #7C3AED;
  --brand-light:  #9B5CF6;
  --brand-dark:   #5B21B6;
  --accent:       #06D6A0;
  --danger:       #EF4444;
  --warning-bg:   #2D2008;
  --warning-txt:  #FBB813;
  --warning-bdr:  #F59E0B;

  /* Dark theme defaults */
  --bg:           #0D0D1A;
  --bg-2:         #13131F;
  --bg-3:         #1A1A2E;
  --bg-card:      #16162A;
  --bg-card-2:    #1E1E35;
  --border:       rgba(255,255,255,0.08);
  --border-focus: var(--brand-light);
  --text:         #E8E8F0;
  --text-2:       #A0A0B8;
  --text-3:       #6B6B88;
  --text-inv:     #0D0D1A;
  --shadow:       0 4px 24px rgba(0,0,0,0.45);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    6px;
  --nav-h:        64px;
  --font:         'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', monospace;
}

[data-theme="light"] {
  --bg:        #F8F8FF;
  --bg-2:      #F0F0FA;
  --bg-3:      #E8E8F5;
  --bg-card:   #FFFFFF;
  --bg-card-2: #F4F4FD;
  --border:    rgba(0,0,0,0.09);
  --text:      #1A1A2E;
  --text-2:    #4A4A6A;
  --text-3:    #8888AA;
  --text-inv:  #FFFFFF;
  --shadow:    0 4px 24px rgba(100,60,200,0.1);
  --shadow-sm: 0 2px 8px rgba(100,60,200,0.07);
  --warning-bg:  #FFFBEB;
  --warning-txt: #92400E;
  --warning-bdr: #F59E0B;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.25s, color 0.25s;
}

main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: var(--brand-light); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ---------- Typography ---------- */
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.85rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
p  { color: var(--text-2); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 0.5rem;
}

/* ---------- Layout ---------- */
.container        { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 760px;  margin: 0 auto; padding: 0 1.25rem; }
.section          { padding: 4rem 0; }
.section.alt      { background: var(--bg-2); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; color: var(--brand-light); }

.brand-mark {
  color: var(--brand-light);
  font-size: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.site-nav > a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-xs);
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.site-nav > a:hover,
.site-nav > a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-3);
}
.site-nav > a[aria-current="page"] { font-weight: 600; }

/* Dropdown */
.nav-dropdown { position: relative; }

.dropdown-toggle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s, background 0.15s;
}
.dropdown-toggle:hover { color: var(--text); background: var(--bg-3); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  min-width: 200px;
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  z-index: 200;
}
.nav-dropdown.open .dropdown-menu { display: flex; }

.dropdown-menu a {
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.dropdown-menu a:hover { background: var(--bg-3); color: var(--text); }

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 1rem;
  transition: background 0.15s;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-card-2); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  background: var(--bg-3);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-left: auto;
  color: var(--text);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn.primary:hover { background: var(--brand-light); border-color: var(--brand-light); }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn.ghost:hover { background: var(--bg-3); border-color: var(--text-3); }

.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn.danger:hover { background: rgba(239,68,68,0.1); }

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.15s;
  flex-shrink: 0;
}
.icon-button.active { border-color: var(--brand-light); background: rgba(124,58,237,0.12); }
.icon-button:hover  { background: var(--bg-card-2); }

/* ---------- Hero ---------- */
.hero {
  padding: 4rem 0 3.5rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-light);
  margin-bottom: 1rem;
}

.hero h1 { margin-bottom: 1rem; }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  margin-bottom: 1.5rem;
  max-width: 560px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.hero-badges span {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
}

/* ---------- Converter card ---------- */
.tool-section { padding: 2.5rem 0 3rem; }

.converter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.converter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.converter-head h2 { margin: 0; font-size: 1.3rem; }
.converter-head .eyebrow { margin-bottom: 0.25rem; }

.mini-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  margin-bottom: 1.25rem;
  background: var(--bg);
}
.drop-zone:hover,
.drop-zone.drag-over { border-color: var(--brand-light); background: rgba(124,58,237,0.04); }

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  color: var(--text-3);
}

.drop-zone h3 { margin-bottom: 0.35rem; color: var(--text); }
.drop-zone p  { font-size: 0.875rem; color: var(--text-3); margin-bottom: 0.5rem; }
.drop-zone span {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--brand-light);
  background: rgba(124,58,237,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.setting-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.setting-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.65rem;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--brand-light);
  height: 4px;
  cursor: pointer;
}
.range-row strong {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text);
  min-width: 38px;
  text-align: right;
}

.resize-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.resize-row input[type="number"] {
  flex: 1;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--text);
  transition: border-color 0.15s;
  min-width: 0;
}
.resize-row input[type="number"]:focus {
  outline: none;
  border-color: var(--border-focus);
}

.tiny-note { font-size: 0.72rem; color: var(--text-3); margin-top: 0.5rem; }

/* Notices */
.notice {
  border-radius: var(--radius-xs);
  padding: 0.65rem 1rem;
  font-size: 0.83rem;
  margin-bottom: 1rem;
}
.notice.warning {
  background: var(--warning-bg);
  color: var(--warning-txt);
  border: 1px solid var(--warning-bdr);
}

/* File list */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Action row */
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.25rem;
}

/* Progress */
.progress-wrap { margin-top: 1.25rem; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.progress-meta span { font-size: 0.8rem; color: var(--text-2); }
.progress-track {
  height: 6px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 99px;
  width: 0;
  transition: width 0.3s ease;
}

/* Stats */
.stats-area {
  margin-top: 1.25rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-2);
}

/* Results */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Recent box */
.recent-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.recent-box h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-3); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; }
.recent-list { display: flex; flex-direction: column; gap: 0.4rem; }

/* Error box */
.error-box {
  border-radius: var(--radius-xs);
  font-size: 0.83rem;
  color: var(--danger);
}
.error-box:not(:empty) {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
}

/* Trust row */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
  justify-content: center;
}
.trust-row span {
  font-size: 0.8rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Ad zones */
.ad-zone {
  margin-top: 1.5rem;
  min-height: 90px;
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.ad-zone-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

/* Preview */
.preview-area { margin-top: 1.25rem; }
.preview-area h3 { font-size: 0.85rem; font-weight: 600; color: var(--text-3); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; }
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.preview-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.preview-label {
  font-size: 0.75rem;
  color: var(--text-3);
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-panel img { width: 100%; object-fit: contain; max-height: 200px; }

/* ---------- Section headings ---------- */
.section-heading {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}
.section-heading h2 { margin-bottom: 0.6rem; }
.section-heading p  { font-size: 1rem; }

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.feature-grid.two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover { border-color: rgba(124,58,237,0.35); box-shadow: var(--shadow-sm); }
.feature-card > span { font-size: 1.5rem; display: block; margin-bottom: 0.75rem; }
.feature-card h3 { margin-bottom: 0.4rem; color: var(--text); }
.feature-card p  { font-size: 0.875rem; }

/* ---------- Steps grid ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  counter-reset: steps;
}
.steps-grid article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}
.steps-grid article b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}
.steps-grid article h3 { margin-bottom: 0.3rem; color: var(--text); }
.steps-grid article p  { font-size: 0.875rem; }

/* ---------- Tool grid / cards ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.tool-card:hover {
  border-color: rgba(124,58,237,0.4);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}
.tool-card > span {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--brand-light);
  background: rgba(124,58,237,0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
}
.tool-card h3 { color: var(--text); margin-bottom: 0.4rem; }
.tool-card p  { font-size: 0.875rem; }

/* Tool chips */
.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tool-chip {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 99px;
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tool-chip:hover {
  background: rgba(124,58,237,0.12);
  border-color: var(--brand-light);
  color: var(--brand-light);
  text-decoration: none;
}

/* ---------- CTA card ---------- */
.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
}
.cta-card h2 { margin-bottom: 0.6rem; }
.cta-card p  { margin-bottom: 1.5rem; }

/* ---------- Content card ---------- */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
}
.content-card h2 { margin-bottom: 0.75rem; margin-top: 1.75rem; }
.content-card h2:first-child { margin-top: 0; }
.content-card p  { margin-bottom: 1rem; }
.content-card ul { list-style: disc; padding-left: 1.4rem; color: var(--text-2); }
.content-card ul li { margin-bottom: 0.35rem; font-size: 0.95rem; }
.content-card.legal h2 { font-size: 1.05rem; color: var(--text); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq-item:has(.faq-question[aria-expanded="true"]) { border-color: rgba(124,58,237,0.3); }

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background 0.15s;
}
.faq-question:hover { background: var(--bg-2); }
.faq-question span {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--brand-light);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq-question[aria-expanded="true"] span { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--border);
}
.faq-answer p {
  font-size: 0.9rem;
  padding-top: 0.75rem;
  margin: 0;
}
.faq-answer.open { display: block; }

/* ---------- Blog grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.blog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.blog-card:hover {
  border-color: rgba(124,58,237,0.4);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  text-decoration: none;
}
.blog-card > span {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.blog-card h3 { color: var(--text); margin-bottom: 0.45rem; font-size: 1rem; }
.blog-card p  { font-size: 0.875rem; margin-bottom: 0.75rem; }
.blog-card small { font-size: 0.78rem; color: var(--brand-light); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-top: 3rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-brand {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.footer-brand:hover { color: var(--brand-light); text-decoration: none; }

.site-footer p {
  font-size: 0.83rem;
  color: var(--text-3);
  line-height: 1.6;
}

.site-footer h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
  margin-bottom: 0.85rem;
}

.site-footer ul li { margin-bottom: 0.4rem; }
.site-footer ul a {
  font-size: 0.875rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer ul a:hover { color: var(--brand-light); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-bottom span { font-size: 0.8rem; color: var(--text-3); }

/* ---------- Static form ---------- */
.static-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
.static-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
}
.static-form input,
.static-form textarea {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s;
}
.static-form input:focus,
.static-form textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}
.static-form textarea { min-height: 120px; resize: vertical; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .settings-grid { grid-template-columns: 1fr; }
  .preview-grid  { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }

  .site-nav { display: none; flex-direction: column; align-items: stretch; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 0.75rem 1.25rem 1rem; gap: 0.25rem; }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 0.6rem 0.5rem; }

  .dropdown-menu { position: static; transform: none; box-shadow: none; border: none; background: var(--bg-2); padding-left: 1rem; min-width: 0; }
  .nav-dropdown.open .dropdown-menu { display: flex; }

  .menu-toggle { display: flex; }
  .theme-toggle { margin-left: 0; }

  .converter-head { flex-direction: column; gap: 0.5rem; }
  .converter-card { padding: 1.25rem; }

  .content-card { padding: 1.5rem; }
  .cta-card { padding: 1.75rem 1.25rem; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero { padding: 2.5rem 0 2rem; }
  .section { padding: 2.5rem 0; }
  .action-row { flex-direction: column; }
  .action-row .btn { width: 100%; }
}
