:root {
  --bg-1: #fdf8ec;
  --bg-2: #fff4e0;
  --text: #1f1f1f;
  --muted: #575757;
  --brand: #e4532f;
  --brand-deep: #c53f1f;
  --panel: rgba(255, 255, 255, 0.7);
  --border: rgba(31, 31, 31, 0.12);
  --shadow: 0 20px 45px rgba(138, 74, 52, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 20%, #ffd08f 0%, transparent 40%),
    radial-gradient(circle at 80% 12%, #ffbda7 0%, transparent 35%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #ffffff;
  color: #000000;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  z-index: 100;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(253, 248, 236, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Sora", sans-serif;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  transform: rotate(14deg);
  background: linear-gradient(135deg, #ff7d4d 0%, #ffa45d 100%);
  box-shadow: 0 0 0 3px rgba(228, 83, 47, 0.18);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after,
.nav-dropdown-toggle[aria-expanded="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 245, 225, 0.98);
  box-shadow: 0 14px 34px rgba(133, 74, 52, 0.2);
}

.nav-dropdown-menu a {
  display: block;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: rgba(255, 181, 123, 0.2);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
}

.primary-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.3rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-content {
  padding: 4.8rem 0 4rem;
  position: relative;
  z-index: 1;
  animation: rise-in 0.8s ease both;
}

.eyebrow {
  margin: 0;
  color: var(--brand-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.79rem;
}

.hero h1 {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4.8vw, 4rem);
  line-height: 1.08;
  margin: 0.8rem 0 1rem;
  max-width: 17ch;
}

.hero-copy {
  margin: 0;
  max-width: 60ch;
  color: var(--muted);
}

.btn-primary {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.1rem;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(130deg, #e4532f, #f26b38);
  box-shadow: 0 12px 28px rgba(196, 73, 31, 0.25);
  font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  pointer-events: none;
}

.hero-glow-1 {
  width: 340px;
  height: 340px;
  background: rgba(255, 171, 77, 0.45);
  top: -80px;
  left: -110px;
}

.hero-glow-2 {
  width: 320px;
  height: 320px;
  background: rgba(255, 124, 78, 0.34);
  right: -120px;
  top: -40px;
}

.tools {
  padding: 1.4rem 0 4rem;
}

.section-head {
  margin-bottom: 1.3rem;
}

.section-head h2,
.how-it-works h2 {
  font-family: "Sora", sans-serif;
  letter-spacing: -0.015em;
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  margin: 0;
}

.section-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
  animation: rise-in 0.6s ease both;
}

.tool-card:nth-child(2) { animation-delay: 0.04s; }
.tool-card:nth-child(3) { animation-delay: 0.08s; }
.tool-card:nth-child(4) { animation-delay: 0.12s; }
.tool-card:nth-child(5) { animation-delay: 0.16s; }
.tool-card:nth-child(6) { animation-delay: 0.2s; }
.tool-card:nth-child(7) { animation-delay: 0.24s; }
.tool-card:nth-child(8) { animation-delay: 0.28s; }

.tool-card:hover,
.tool-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(228, 83, 47, 0.35);
}

.tool-card h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.07rem;
  line-height: 1.3;
}

.tool-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-meta {
  margin-top: 0.75rem;
  display: inline-block;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--brand-deep);
  background: rgba(255, 185, 133, 0.3);
  padding: 0.24rem 0.5rem;
  border-radius: 99px;
}

.how-it-works {
  padding: 0.8rem 0 4.2rem;
}

.steps {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.63);
}

.step-num {
  display: inline-block;
  font-family: "Sora", sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--brand-deep);
  background: rgba(255, 177, 97, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
}

.step p {
  margin: 0.55rem 0 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(252, 237, 210, 0.72);
  backdrop-filter: blur(8px);
}

.footer-grid {
  padding: 2rem 0 1.2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr;
  gap: 1rem;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 0.45rem;
  font-family: "Sora", sans-serif;
}

.site-footer p,
.site-footer li {
  margin: 0;
  color: var(--muted);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--brand-deep);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 0.9rem 0 1.4rem;
  font-size: 0.92rem;
}

.tool-page {
  padding: 1.4rem 0 4rem;
}

.tool-page-header {
  margin-bottom: 1rem;
}

.tool-page-header h1 {
  margin: 0.4rem 0 0;
  font-family: "Sora", sans-serif;
  letter-spacing: -0.02em;
  font-size: clamp(1.8rem, 4.2vw, 3rem);
}

.tool-page-header p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  max-width: 65ch;
}

.tool-shell {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-main {
  padding: 1rem;
}

.dropzone {
  border: 2px dashed rgba(228, 83, 47, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  padding: 1.2rem;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.dropzone.is-dragover {
  border-color: rgba(228, 83, 47, 0.72);
  transform: translateY(-2px);
}

.dropzone h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
}

.dropzone p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.drop-actions {
  margin-top: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(228, 83, 47, 0.28);
  border-radius: 999px;
  padding: 0.62rem 0.92rem;
  text-decoration: none;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  cursor: pointer;
}

.file-pick {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compress-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.mini-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.63);
}

.mini-panel h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
}

.mini-panel p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.controls {
  margin-top: 1rem;
  padding: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.controls-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.controls h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}

.quality-meter {
  margin-top: 0.7rem;
}

.quality-meter input {
  width: 100%;
}

.range-meta {
  margin-top: 0.3rem;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

.aside-panel {
  padding: 1rem;
}

.aside-panel h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
}

.queue {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.queue li {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  padding: 0.7rem;
  font-size: 0.92rem;
}

.queue-meta {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.tool-note {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1060px) {
  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .primary-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 4vw 1.2rem;
    background: rgba(255, 245, 225, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown,
  .nav-dropdown-toggle {
    width: 100%;
    text-align: left;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    border: 0;
    border-radius: 10px;
    margin-top: 0.45rem;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.55);
  }

  .primary-nav.open {
    display: flex;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tool-shell,
  .compress-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-content {
    padding-top: 4rem;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }
}
