/* Squozi — site-wide styles. Page content keeps the design's own inline styles; this file holds
   what's shared: base type, header, footer, the mobile menu and the interactive tool states. */

:root {
  --ink: #14134A;
  --brand: #1C1A8E;
  --brand-dark: #12105E;
  --navy: #14125E;
  --lime: #8EE51B;
  --lime-soft: #EEFBD9;
  --muted: #545779;
  --line: #E3E5F0;
  --bg: #F5F6FB;
  --danger: #C62828;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img, svg, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(28, 26, 142, .45); outline-offset: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Header ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .bar { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font: 800 28px/1 Outfit, sans-serif; color: var(--brand); letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 500; padding: 0 12px; height: 44px; display: inline-flex; align-items: center; border-radius: 10px; }
.nav-link:hover { color: var(--brand); background: #F0F1FA; }
.nav-link[aria-current="page"] { background: #ECEBFA; color: var(--brand); font-weight: 700; }
.header-cta { display: flex; align-items: center; gap: 10px; }
.btn-pro { background: var(--lime); color: var(--brand-dark); font-weight: 700; font-size: 15px; text-decoration: none; padding: 0 18px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; }
.btn-pro:hover { color: var(--brand-dark); filter: brightness(.96); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: #fff; align-items: center; justify-content: center; cursor: pointer; }
.mobile-nav { display: none; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-nav.open { display: flex; flex-direction: column; padding: 8px 16px 16px; border-top: 1px solid var(--line); background: #fff; }
  .mobile-nav a { padding: 12px 8px; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: 10px; }
  .mobile-nav a[aria-current="page"] { background: #ECEBFA; color: var(--brand); }
}

/* ---- Footer ---- */
.site-footer { background: var(--brand-dark); color: #fff; padding: 64px 24px 32px; }
.site-footer .wrap { max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 32px; }
.site-footer nav { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer .head { font: 600 12px/1 "JetBrains Mono", monospace; letter-spacing: .1em; color: var(--lime); margin-bottom: 4px; }
.site-footer a { color: #C5C6EE; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { border-top: 1px solid #2A2785; padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: #C5C6EE; }

/* ---- Shared bits the design styled by class ---- */
.tool-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(20, 18, 94, .45); border-color: #B9BCE8 !important; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] .faq-plus { transform: rotate(45deg); }
.hide-sm { }
@media (max-width: 900px) { .hide-sm { display: none !important; } }

/* ---- Tools: drop zones, rows, states ---- */
[data-drop].dragging { border-color: var(--brand) !important; background: #F0F1FA !important; }
[data-drop] input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sq-row-error { color: var(--danger); font: 600 13px/1.3 "DM Sans", sans-serif; }
.sq-btn-disabled, a.sq-btn-disabled { opacity: .45; pointer-events: none; }
.sq-hidden { display: none !important; }
.sq-choice[aria-pressed="true"], .sq-choice[aria-checked="true"] { outline: 2px solid var(--lime); outline-offset: -2px; }
.sq-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50; box-shadow: 0 12px 30px -10px rgba(20, 19, 74, .5); }

/* ---- Colour picker: a rounded swatch instead of the browser's default bar ---- */
.sq-color { display: flex; align-items: center; gap: 8px; }
.sq-color input[type="color"] {
  -webkit-appearance: none; appearance: none;
  width: 44px; height: 44px; flex: 0 0 44px; padding: 0; cursor: pointer;
  border: 1px solid #E3E5F0; border-radius: 10px; background: #FFFFFF;
}
.sq-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
.sq-color input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(20, 19, 74, .15); border-radius: 7px; }
.sq-color input[type="color"]::-moz-color-swatch { border: 1px solid rgba(20, 19, 74, .15); border-radius: 7px; }
.sq-color input[type="text"] {
  flex: 1 1 auto; min-width: 0; height: 44px; border: 1px solid #E3E5F0; border-radius: 10px; padding: 0 12px;
  font: 600 14px "JetBrains Mono", monospace; color: #14134A; background: #FFFFFF; text-transform: uppercase;
}
.sq-color input[type="text"][aria-invalid="true"] { border-color: #C62828; }
.sq-color input:focus-visible { outline: 3px solid rgba(28, 26, 142, .35); outline-offset: 1px; }

/* ---- Crop Image: the frame darkens everything outside it ---- */
.sq-crop-box {
  position: absolute; box-sizing: border-box; cursor: move; touch-action: none;
  border: 2px solid #FFFFFF; outline: 1px solid rgba(20, 19, 74, .6);
  box-shadow: 0 0 0 9999px rgba(20, 18, 94, .55);
  background-image: linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)), linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)),
                    linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35)), linear-gradient(rgba(255,255,255,.35), rgba(255,255,255,.35));
  background-size: 1px 100%, 1px 100%, 100% 1px, 100% 1px;
  background-position: 33.33% 0, 66.66% 0, 0 33.33%, 0 66.66%;
  background-repeat: no-repeat;
}
.sq-crop-box:focus-visible { outline: 3px solid var(--lime); }
.sq-crop-handle { position: absolute; width: 18px; height: 18px; background: var(--lime); border: 2px solid #12105E; border-radius: 5px; touch-action: none; }
.sq-crop-handle[data-handle="nw"] { left: -10px; top: -10px; cursor: nwse-resize; }
.sq-crop-handle[data-handle="ne"] { right: -10px; top: -10px; cursor: nesw-resize; }
.sq-crop-handle[data-handle="sw"] { left: -10px; bottom: -10px; cursor: nesw-resize; }
.sq-crop-handle[data-handle="se"] { right: -10px; bottom: -10px; cursor: nwse-resize; }
@media (pointer: coarse) { .sq-crop-handle { width: 26px; height: 26px; } .sq-crop-handle[data-handle^="n"] { top: -14px; } .sq-crop-handle[data-handle^="s"] { bottom: -14px; } .sq-crop-handle[data-handle$="w"] { left: -14px; } .sq-crop-handle[data-handle$="e"] { right: -14px; } }

/* ---- JPG to PDF: page grid ---- */
.sq-pdf-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.sq-pdf-list:empty { display: none; }
.sq-pdf-item { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: grab; }
.sq-pdf-item.dragging { opacity: .4; }
.sq-pdf-item.drop-before { box-shadow: -4px 0 0 var(--brand); }
.sq-pdf-thumb { aspect-ratio: 3 / 4; border-radius: 8px; background: #F0F1FA; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sq-pdf-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.sq-pdf-num { position: absolute; top: 12px; left: 12px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--brand); color: #fff; font: 700 12px/24px "JetBrains Mono", monospace; text-align: center; }
.sq-pdf-name { font-size: 12px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-pdf-actions { display: flex; gap: 4px; }
.sq-pdf-actions button { flex: 1; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 700; color: var(--ink); }
.sq-pdf-actions button:hover { border-color: var(--brand); color: var(--brand); }
.sq-pdf-actions button[data-remove]:hover { border-color: var(--danger); color: var(--danger); }

/* ---- Cookie consent banner ---- */
.sq-consent {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60;
  width: min(960px, calc(100% - 32px)); box-sizing: border-box;
  display: flex; align-items: center; gap: 20px; padding: 18px 20px;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 40px -16px rgba(20, 18, 94, .45);
}
.sq-consent h2 { margin: 0 0 4px; font: 700 17px/1.2 Outfit, sans-serif; }
.sq-consent p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.sq-consent-text { flex: 1 1 auto; }
.sq-consent-actions { display: flex; gap: 10px; flex: 0 0 auto; }
/* Accept and Reject get the same size and weight: refusing is as easy as agreeing. */
.sq-consent-btn {
  height: 44px; min-width: 112px; padding: 0 18px; border-radius: 12px; cursor: pointer;
  font: 700 15px "DM Sans", sans-serif; border: 1.5px solid var(--brand); background: var(--brand); color: #fff;
}
.sq-consent-btn:hover { filter: brightness(1.12); }
.sq-consent-accept { background: var(--lime); border-color: var(--lime); color: var(--brand-dark); }
.sq-consent-accept:hover { filter: brightness(.96); }
@media (max-width: 640px) {
  .sq-consent { flex-direction: column; align-items: stretch; gap: 14px; bottom: 12px; }
  .sq-consent-actions .sq-consent-btn { flex: 1; }
}
.sq-link-btn { background: none; border: 0; padding: 0; font: inherit; color: #C5C6EE; cursor: pointer; }
.sq-link-btn:hover { color: #fff; }
