/* ====================================================================
   style.css  =  BASE, HEADER, HERO + CONTENT, FOOTER, WHATSAPP, TOOL
   Each block can be deleted on its own. Keep BASE (colours, fonts, layout).
   ==================================================================== */

/* ========== BASE START (keep) ========== */
:root {
  --blue: #1d4ed8;
  --navy: #0f1b4d;
  --navy2: #1b2a7a;
  --gold: #fbbf24;
  --ink: #14213d;
  --mute: #5b6779;
  --line: #dbe2ec;
  --bg: #f4f7fb;
  --foot: #0a1128;
  --foot2: #0e1733;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Inter", "Segoe UI", system-ui, sans-serif;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.w {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== BASE END ========== */

/* ========== HEADER START (top bar + header + menu; delete together with HEADER in index.html and HEADER MENU in script.js) ========== */
/* ---------- Top bar ---------- */
.topbar {
  background: var(--blue);
  color: #fff;
  font-size: .9rem;
  padding-top: env(safe-area-inset-top, 0);
}

.topbar .w {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  flex-wrap: wrap;
}

.topbar a {
  text-decoration: none;
}

.tb-left {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tb-wa {
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  padding: 4px 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, .12);
}

@media (max-width: 700px) {
  .tb-right {
    display: none;
  }
  .topbar .w {
    min-height: 44px;
  }
  .tb-left {
    gap: 14px;
    font-size: .82rem;
  }
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .w {
  max-width: 1380px;
}

.hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.bt b {
  display: block;
  font-size: 1.3rem;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.bt b i {
  color: var(--blue);
  font-style: normal;
}

.bt b small {
  font-size: .65rem;
  color: var(--blue);
  margin-left: 4px;
  letter-spacing: 0;
}

.bt em {
  display: block;
  font-style: normal;
  font-size: .72rem;
  color: var(--mute);
  margin-top: 2px;
}

#site-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

#site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}

#site-nav a:hover {
  color: var(--blue);
}

#site-nav a.cta {
  background: var(--blue);
  color: #fff;
  margin-left: 8px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(29, 78, 216, .28);
}

#site-nav a.cta:hover {
  background: #1741b5;
  color: #fff;
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 1260px) {
  .menu-btn {
    display: block;
  }
  #site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(15, 27, 77, .12);
  }
  #site-nav.open {
    display: block;
  }
  #site-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 18px;
  }
  #site-nav a {
    padding: 13px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
  }
  #site-nav a.cta {
    margin: 14px 0 0;
    justify-content: center;
    border-bottom: 0;
    border-radius: 10px;
  }
}

@media (max-width: 520px) {
  .bt b {
    font-size: 1.1rem;
  }
  .bt b small,
  .bt em {
    display: none;
  }
  .brand img {
    width: 42px;
    height: 42px;
  }
}

/* ========== HEADER END ========== */

/* ========== HERO + CONTENT START (keep) ========== */
/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, #0b1235, var(--navy2));
  color: #fff;
  padding: 52px 0 60px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  margin: 0 0 14px;
  max-width: 17ch;
}

.hero h1 span {
  color: var(--gold);
}

.hero .lead {
  color: #c9d3f2;
  max-width: 60ch;
  margin: 0 0 20px;
  font-size: 1.05rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 28px;
}

.chips li {
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .07);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .9rem;
  font-weight: 600;
}

/* ---------- Content ---------- */
.ad {
  border: 1px dashed #b9c4d6;
  color: var(--mute);
  text-align: center;
  font-size: .8rem;
  padding: 24px 10px;
  margin: 28px 0;
  border-radius: 10px;
  background: #fff;
}

.ad[hidden] {
  display: none;
}

h2 {
  font-size: 1.5rem;
  letter-spacing: -.01em;
  margin: 32px 0 12px;
}

.feat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.feat div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.feat b,
.feat h3 {
  display: block;
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

/* ---------- Privacy policy (collapsed dropdown) ---------- */
.policy {
  margin-top: 32px;
  padding: 0;
  scroll-margin-top: 80px;
}

.policy summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.policy summary::-webkit-details-marker {
  display: none;
}

.policy summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s;
  flex: none;
  margin-top: -3px;
}

.policy[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.policy summary:focus-visible {
  outline: 2px solid var(--gold, currentColor);
  outline-offset: 2px;
  border-radius: 10px;
}

.policy summary h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: inherit;
  letter-spacing: normal;
}

.policy-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--line);
}

.policy h3 {
  font-size: 1.05rem;
  margin: 22px 0 4px;
}

.policy p {
  margin: 0 0 8px;
  max-width: 78ch;
}

.policy .upd {
  color: var(--mute);
  font-size: .88rem;
  margin-top: 14px;
}
/* ========== HERO + CONTENT END ========== */

/* ========== FOOTER START (delete together with FOOTER in index.html) ========== */
/* ---------- Footer ---------- */
.site-footer {
  background: var(--foot);
  color: #c3cde6;
  margin-top: 56px;
}

.fg {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 40px;
  padding-top: 52px;
  padding-bottom: 44px;
}

.site-footer h3 {
  color: var(--gold);
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.fb-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-bottom: 16px;
}

.fb-link img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.fb-text b {
  display: block;
  font-size: 1.3rem;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.fb-text i {
  color: #6f8bff;
  font-style: normal;
}

.fb-text small {
  font-size: .65rem;
  color: #6f8bff;
  margin-left: 4px;
}

.fb-text em {
  display: block;
  font-style: normal;
  font-size: .72rem;
  color: #9fb0d8;
  margin-top: 2px;
}

.f-brand p {
  margin: 0;
  max-width: 38ch;
}

.arrow li,
.icons li {
  padding: 5px 0;
}

.arrow a::before {
  content: "";
  display: inline-block;
  border: 5px solid transparent;
  border-left: 7px solid #3b6cff;
  margin-right: 12px;
}

.icons a,
.plain {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icons a > span:first-child,
.plain > span:first-child {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.legal-bar {
  background: var(--foot);
  border-top: 1px solid #18244a;
  font-size: .88rem;
}

.lb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.lb b {
  color: #fff;
}

.heart {
  color: #ef4444;
  font-style: normal;
}

@media (max-width: 860px) {
  .fg {
    grid-template-columns: 1fr 1fr;
  }
  .f-brand {
    grid-column: 1/-1;
  }
}

@media (max-width: 520px) {
  .fg {
    grid-template-columns: 1fr;
    padding-top: 40px;
  }
}

/* ========== FOOTER END ========== */

/* ========== WHATSAPP BUTTON START (optional floating button) ========== */
/* ---------- Floating WhatsApp ---------- */
.wa {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 15;
  background: #25d366;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 1.6rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}
/* ========== WHATSAPP BUTTON END ========== */

/* ========== TOOL START (image compressor; every rule is scoped under .tsg-tool) ========== */
.tsg-tool {
  --blue: #1d4ed8;
  --navy: #0f1b4d;
  --gold: #fbbf24;
  --ink: #14213d;
  --mute: #5b6779;
  --line: #dbe2ec;
  --ok: #0b7a52;
  --warn: #b25e00;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
  font: 16px/1.5 inherit;
  font-family: inherit;
  text-align: left;
}

.tsg-tool * {
  color: inherit;
  text-transform: none;
  letter-spacing: normal;
  text-shadow: none;
}

.tsg-tool *,
.tsg-tool *::before,
.tsg-tool *::after {
  box-sizing: border-box;
}

.tsg-tool [hidden] {
  display: none !important;
}

.tsg-tool :focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.tsg-tool #tsg-file {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.tsg-tool #tsg-file:focus-visible + #tsg-drop {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.tsg-tool #tsg-drop {
  border: 2px dashed var(--blue);
  background: #f1f5ff;
  border-radius: 12px;
  padding: 14px;
}

.tsg-tool #tsg-drop.over {
  background: #e0e9ff;
}

.tsg-tool #tsg-prompt {
  display: block;
  padding: 28px 10px;
  text-align: center;
  cursor: pointer;
}

.tsg-tool #tsg-prompt b {
  display: block;
  font-size: 1.15rem;
}

.tsg-tool #tsg-prompt span {
  color: var(--mute);
}

.tsg-tool #tsg-drop.has #tsg-prompt {
  display: none;
}

.tsg-tool #tsg-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.tsg-tool .th {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  font-size: .78rem;
  overflow: hidden;
}

.tsg-tool .th img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.tsg-tool .th span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

.tsg-tool .th small {
  color: var(--mute);
}

.tsg-tool .th button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 27, 77, .85);
  color: #fff;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.tsg-tool .add {
  display: grid;
  place-items: center;
  min-height: 128px;
  border: 2px dashed var(--blue);
  border-radius: 10px;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  padding: 6px;
}

.tsg-tool .set {
  display: grid;
  grid-template-columns: 1fr 1.3fr auto;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.tsg-tool .set label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
}

.tsg-tool .set select,
.tsg-tool .set input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  margin: 0;
}

.tsg-tool .inp {
  display: flex;
}

.tsg-tool .inp input {
  border-radius: 8px 0 0 8px;
}

.tsg-tool .inp span {
  display: grid;
  place-items: center;
  padding: 0 14px;
  background: #eef2fb;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  font-weight: 700;
}

.tsg-tool .set small {
  display: block;
  color: var(--mute);
  margin-top: 4px;
  font-size: .8rem;
}

.tsg-tool .tsg-btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}

.tsg-tool .tsg-btn.gold {
  background: var(--gold);
  color: var(--navy);
}

.tsg-tool .tsg-btn.sec {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.tsg-tool #tsg-go {
  margin-top: 26px;
  padding: 11px 26px;
}

.tsg-tool #tsg-go:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.tsg-tool #tsg-res {
  margin-top: 6px;
}

.tsg-tool .bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 4px;
}

.tsg-tool .sum {
  font-weight: 700;
}

.tsg-tool .item {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-top: 10px;
}

.tsg-tool .pair {
  display: flex;
  gap: 4px;
  background: none;
  border: 0;
  padding: 0;
  position: relative;
  cursor: pointer;
}

.tsg-tool .pair img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--line);
}

.tsg-tool .pair em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 27, 77, .82);
  color: #fff;
  font: 600 .7rem/1.6 inherit;
  font-style: normal;
  text-align: center;
  border-radius: 0 0 6px 6px;
}

.tsg-tool .name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tsg-tool .meta {
  color: var(--mute);
  font-size: .88rem;
}

.tsg-tool .saved {
  color: var(--ok);
  font-weight: 700;
}

.tsg-tool .same {
  color: var(--warn);
  font-weight: 600;
}

.tsg-tool dialog {
  border: 0;
  border-radius: 14px;
  padding: 16px;
  width: min(920px, 94vw);
  max-height: 92vh;
  color: var(--ink);
  background: #fff;
}

.tsg-tool dialog::backdrop {
  background: rgba(8, 14, 40, .7);
}

.tsg-tool .ch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tsg-tool .cw {
  position: relative;
  height: min(62vh, 560px);
  background: #e9eef6;
  border-radius: 10px;
  overflow: hidden;
  user-select: none;
}

.tsg-tool .cw img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tsg-tool #tsg-cb {
  clip-path: inset(0 50% 0 0);
}

.tsg-tool .hn {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, .5);
  pointer-events: none;
}

.tsg-tool .tag {
  position: absolute;
  top: 10px;
  background: rgba(15, 27, 77, .85);
  color: #fff;
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 6px;
}

.tsg-tool .tag.l {
  left: 10px;
}

.tsg-tool .tag.r {
  right: 10px;
}

.tsg-tool #tsg-cr {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
  padding: 0;
}

@media (max-width: 700px) {
  .tsg-tool .set {
    grid-template-columns: 1fr;
  }
  .tsg-tool #tsg-go {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .tsg-tool .item {
    grid-template-columns: 1fr;
  }
  .tsg-tool .pair img {
    width: 68px;
    height: 68px;
  }
}

.tsg-tool .info {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--navy);
}

.tsg-tool .th .sz {
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: .92rem;
}

/* ---------- Tool additions: format + quality, quick values, progress, notices ---------- */
.tsg-tool .note {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: #fff7e0;
  border: 1px solid #f3d98b;
  border-radius: 10px;
  color: #6b4a00;
  font-size: .9rem;
}

.tsg-tool .set2 {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 16px;
  align-items: start;
}

.tsg-tool .set2 input[type="range"] {
  padding: 0;
  height: 40px;
  accent-color: var(--blue);
  background: none;
  border: 0;
}

.tsg-tool .set2 output {
  font-weight: 700;
  color: var(--blue);
  margin-left: 6px;
}

.tsg-tool .presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tsg-tool .presets button {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}

.tsg-tool .presets button:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}

.tsg-tool [disabled] {
  cursor: not-allowed;
}

.tsg-tool .presets button:disabled,
.tsg-tool .set select:disabled,
.tsg-tool .set input:disabled {
  opacity: .5;
}

.tsg-tool #tsg-prog {
  margin-top: 16px;
}

.tsg-tool .pbar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.tsg-tool .pbar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
  transition: width .25s;
}

.tsg-tool .prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: .9rem;
}

.tsg-tool .prow span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tsg-tool[data-busy] #tsg-drop {
  opacity: .6;
  pointer-events: none;
}

.tsg-tool .th button:disabled {
  opacity: .4;
}

@media (max-width: 700px) {
  .tsg-tool .set2 {
    grid-template-columns: 1fr;
  }
}
/* ========== TOOL END ========== */