:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #0b1220;
  --muted: #5b6475;
  --brand: #0b5cff;
  --card: #f6f8fb;
  --border: #e5e9f2;
  --page-max: 1200px;   /* match your nav’s ideal width */
  --page-pad: 16px;
  --tool-height: 820px; /* default iframe height; tweak per tool if needed */  
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f17;
    --fg: #e7ecf5;
    --muted: #a9b2c3;
    --card: #121826;
    --border: #223049;
  }
}

/* Responsive collapse */
@media (max-width: 1024px){
  .tool-layout{
    grid-template-columns: 1fr;
  }
}

/* Prevent accidental horizontal scroll */
html, body { overflow-x: hidden; }

/* Generic container used by header + pages + tool pages */
.container{
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  box-sizing: border-box;
  width: 100%;
}

/* Make tool sections use the same centered max-width as the header */
.tool-header,
.tool-layout{
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  box-sizing: border-box;
  width: 100%;
}

/* Two-column layout when sidebar is on */
.tool-layout{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

/* One-column when sidebar is off */
.tool-layout.no-sidebar{
  display: block;
}

/* Iframe sizing */
.embed-wrap iframe{
  display: block;
  width: 100%;
  max-width: 100%;
  height: var(--tool-height);
  border: 0;
}

.tool-embed .tool-iframe{
  display: block;
  width: 100%;
  max-width: 100%;
  height: var(--tool-height);
  border: 0;
}

/* Tool page embed wrapper + iframe */
.tool-embed{
  max-width: var(--page-max);
  margin: 0 auto;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.6);
  backdrop-filter: saturate(150%) blur(8px);
}
@media (prefers-color-scheme: dark) {
  .navbar { background: rgba(11,15,23,0.6); }
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: 0.2px;
}
.nav-links {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  gap: 16px;
}
.nav-links a {
  text-decoration: none;
  color: var(--fg);
  opacity: 0.9;
}
.nav-links a:hover { opacity: 1; }

/* Hero */
.hero {
  padding: 48px 0 24px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.1;
}
.hero .sub {
  margin: 0 auto 16px;
  max-width: 720px;
  color: var(--muted);
}
.cta {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  background: var(--brand);
}

/* Tool Grid */
/* Responsive equal-height card grid */
.tool-grid {
  padding: 24px 0 56px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* <-- key */
  align-items: stretch; /* makes items in each row equal height */
}

/* If you wrapped the whole card in <a class="tool-card-link">… */
.tool-card-link {
  display: block;      /* ensure it fills the grid cell */
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* Card fills its parent and uses flex to push footer/CTA down */
.tool-card {
  height: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.tool-title { margin: 0; }
.tool-blurb { margin: 8px 0 0; color: var(--muted); }

/* If you keep a visible CTA line inside the card */
.tool-cta, .tool-link { margin-top: auto; font-weight: 600; }

/* Hover/focus styling on the full-card link */
.tool-card-link:hover .tool-card,
.tool-card-link:focus-visible .tool-card {
  border-color: var(--brand);
  color: var(--brand);
}
@media (min-width: 540px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 8px;
}
.tool-icon { opacity: 0.9; }
.tool-title { margin: 0; font-size: 18px; }
.tool-blurb { margin: 0; color: var(--muted); }
.tool-link {
  margin-top: 8px;
  justify-self: start;
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 16px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
}
.footer-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 12px;
}
.footer-links a { color: var(--fg); text-decoration: none; opacity: 0.9; }
.footer-links a:hover { opacity: 1; }


/* Tool pages */
.tool-header { margin: 24px 0 8px; }
.tool-title { margin: 0 0 6px; font-size: clamp(22px, 3vw, 32px); }
.tool-intro { margin: 0 0 16px; color: var(--muted); }

.tool-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr; /* mobile */
}

/* Sidebar appears on wider screens */
@media (min-width: 980px) {
  .tool-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

.tool-main { min-width: 0; }

/* Iframe embed area */
.embed-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  /* Reserve height to avoid CLS while iframe loads */
  min-height: 700px;
}

/* Make the iframe fill the wrapper */
.embed-wrap iframe {
  display: block;
  width: 100%;
  height: 75vh;        /* responsive height */
  min-height: 700px;   /* ensures reasonable viewport on desktop */
  border: 0;
}

/* When there is no sidebar, make the grid single-column and lift the iframe height */
.tool-layout.no-sidebar {
  grid-template-columns: 1fr !important;
}

.tool-layout.no-sidebar .embed-wrap iframe {
  height: 85vh;      /* taller so controls don’t get pushed below the fold */
  min-height: 900px; /* generous floor for desktop */
}


/* On small screens, ensure good height even with sidebar already hidden by layout */
@media (max-width: 979px) {
  .embed-wrap iframe {
    height: 80vh;
    min-height: 800px;
  }
}

/* Wider page options */
.container.wide {
  max-width: 1600px;        /* was 1200px */
}

.container.fullbleed {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* When no sidebar, let the embed breathe even more */
.tool-layout.no-sidebar .embed-wrap {
  border-radius: 0;         /* optional, looks nicer when very wide */
}

/* Ensure iframe fills wrapper width */
.embed-wrap iframe {
  width: 100%;
}

/* Icon base */
.icon {
  width: 28px;
  height: 28px;
  display: inline-block;
  background-color: currentColor;
  vertical-align: middle;
}

/* Masks: map slug → file */
.icon-convert {
  -webkit-mask: url("/static/img/icons/convert.svg") no-repeat center / contain;
          mask: url("/static/img/icons/convert.svg") no-repeat center / contain;
}
.icon-extract {
  -webkit-mask: url("/static/img/icons/extract.svg") no-repeat center / contain;
          mask: url("/static/img/icons/extract.svg") no-repeat center / contain;
}
.icon-frames {
  -webkit-mask: url("/static/img/icons/extract-multiple.svg") no-repeat center / contain;
          mask: url("/static/img/icons/extract-multiple.svg") no-repeat center / contain;
}
.icon-audio {
  -webkit-mask: url("/static/img/icons/extract-audio.svg") no-repeat center / contain;
          mask: url("/static/img/icons/extract-audio.svg") no-repeat center / contain;
}
.icon-compress {
  -webkit-mask: url("/static/img/icons/compress.svg") no-repeat center / contain;
          mask: url("/static/img/icons/compress.svg") no-repeat center / contain;
}
.icon-sprite {
  -webkit-mask: url("/static/img/icons/image-grid.svg") no-repeat center / contain;
          mask: url("/static/img/icons/image-grid.svg") no-repeat center / contain;
}
.icon-subclip {
  -webkit-mask: url("/static/img/icons/subclip.svg") no-repeat center / contain;
          mask: url("/static/img/icons/subclip.svg") no-repeat center / contain;
}

.icon-flip {
  -webkit-mask: url("/static/img/icons/flip.svg") no-repeat center / contain;
          mask: url("/static/img/icons/flip.svg") no-repeat center / contain;
}

.icon-greyscale {
  -webkit-mask: url("/static/img/icons/greyscale.svg") no-repeat center / contain;
          mask: url("/static/img/icons/greyscale.svg") no-repeat center / contain;
}

.icon-watermark {
  -webkit-mask: url("/static/img/icons/watermark.svg") no-repeat center / contain;
          mask: url("/static/img/icons/watermark.svg") no-repeat center / contain;
}



.tool-card-link {
  text-decoration: none;
  color: inherit;
}
.tool-card-link:hover .tool-card {
  border-color: #0b5cff;
  color: #0b5cff;
}

.home-sections.two-col {
  display: grid;
  gap: 2rem;
}

/* Two columns on wider screens; stacks naturally on mobile */
@media (min-width: 960px) {
  .home-sections.two-col {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;   /* make both columns equal height */
  }

  .home-sections.two-col > section {
    display: flex;          /* allow inner content to flow vertically */
    flex-direction: column;
  }
}

/* Optional: light card look for readability */
.home-sections section {
  background: var(--panel-bg, #fff);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

/* Keep lists tidy */
.home-sections h2 { margin-top: 0; }
.home-sections ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.home-sections li { margin: .4rem 0; }


body {
  /* Keep your existing background if you have one */
  background-color: #fff;
  background-image: none;             /* ensure clean mobile */
  background-attachment: scroll;      /* avoid fixed on mobile */
}

@media (min-width: 1100px) {
  body {
    background-image: repeating-linear-gradient(
      45deg,
    rgba(130,130,130,0.1) 0 2px,
      transparent 2px 6px
  );
    background-attachment: fixed;
  }
} 

.container
{
  background-color: #fff;   /* solid panel hides hatch behind content */
  max-width: 1200px;        /* your current content width */
  margin: 0 auto;           /* center */
  position: relative;       /* ensures layering */
  z-index: 1;
}


/* Mobile hard override: ensure no pattern or fixed attachment; kill frosted nav */
@media (max-width: 960px) {
  body {
    background: #fff !important;         /* solid white, no transparency */
    background-image: none !important;    /* no hatch at all */
    background-attachment: scroll !important;
  }
  .navbar {
    background: #fff !important;          /* remove translucency */
    backdrop-filter: none !important;      /* avoid the grey/blur wash */
  }
  .home-sections section {
    background: var(--card);
  }
}

/* Use themed background for the page and the centered panel */
body { background-color: var(--bg) !important; }
.container { background-color: var(--bg) !important; }

/* Legal pages */
.legal {
  max-width: 860px;        /* narrower column for long text */
  padding: 24px 0 56px;
}
.legal h1 { margin: 0 0 12px; font-size: clamp(24px, 3.2vw, 36px); }
.legal h2 { margin: 24px 0 8px; font-size: 1.15rem; }
.legal p  { margin: 0 0 12px; color: var(--fg); }
.legal ul { margin: 0 0 12px 1.25rem; }
.legal a  { color: var(--brand); text-decoration: none; }
.legal a:hover { text-decoration: underline; }

:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --card-bg: #ffffff;
  --card-fg: #0f172a;
  --muted-fg: #334155;
  --stripe: rgba(0,0,0,.06); /* hatch for light */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --fg: #e5e7eb;
    --card-bg: #131a2a;
    --card-fg: #e5e7eb;
    --muted-fg: #a3b1c6;
    --stripe: rgba(255,255,255,.08); /* hatch for dark */
  }
}

.card, .panel, .tile 
{ 
  background: var(--card-bg); color: var(--card-fg); 
}

.why, .workflows {
  background: var(--card-bg) !important;
  color: var(--card-fg) !important;
}

.ad-banner {
  text-align: center;
  margin: 0; /* optional spacing */
}

@media (max-width: 740px) {
  .ad-banner {
    display: none; /* or load a smaller Adsterra tag */
  }
}

