/* Simple Watermark Remover - one stylesheet, no framework.
   Layout follows the common pattern of overseas image tools: centered hero, big upload card,
   trust row, step cards, feature cards, FAQ accordion. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --fg: #0f172a;
  --muted: #526075;
  --line: #e4e8f0;
  --accent: #4f46e5;
  --accent-2: #9333ea;
  --accent-soft: #eef0ff;
  --accent-fg: #ffffff;
  --danger: #b42318;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(30, 27, 75, 0.18), 0 4px 12px rgba(15, 23, 42, 0.06);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f19;
    --bg-soft: #111827;
    --surface: #131a2a;
    --fg: #e8ebf2;
    --muted: #9aa4b8;
    --line: #243047;
    --accent: #818cf8;
    --accent-2: #c084fc;
    --accent-soft: rgba(129, 140, 248, 0.14);
    --accent-fg: #0b0f19;
    --danger: #ff8a7a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
  }
}

/* app.js toggles the hidden attribute; component display rules must never override it. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { letter-spacing: -0.02em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- header ---------- */
header.site {
  position: relative; z-index: 10;  /* sticky only on wide screens, see the media query */
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.logo { width: 30px; height: 30px; flex: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: 4px; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 12px; border-radius: 999px; }
header.site nav a:hover { color: var(--fg); background: var(--bg-soft); }
header.site nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* ---------- hero ---------- */
main.wrap { padding-bottom: 88px; }
.hero { position: relative; text-align: center; padding: 40px 0 8px; }
.hero::before {
  /* soft glow behind the heading, wider than the container */
  content: ""; position: absolute; z-index: -1; left: 50%; top: -40px; width: 1100px; max-width: 100%; height: 520px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent) 20% 30% / 60% 70% no-repeat,
    radial-gradient(closest-side, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent) 80% 20% / 55% 65% no-repeat;
  pointer-events: none;
}
h1 { font-size: 36px; line-height: 1.12; font-weight: 800; margin: 0 auto 14px; max-width: 820px; letter-spacing: -0.03em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: 17px; margin: 0 auto 28px; max-width: 660px; }

/* ---------- tool card ---------- */
.tool {
  max-width: 820px; margin: 0 auto; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 12px; box-shadow: var(--shadow-lg);
}
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  border: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--line)); border-radius: 18px;
  padding: 40px 20px 32px;
  background: linear-gradient(180deg, var(--accent-soft), transparent 75%);
  transition: border-color 0.15s, background-color 0.15s;
}
.drop:hover, .drop.over { border-color: var(--accent); }
.drop.over { background-color: var(--accent-soft); }
.drop-ico {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 10px;
  border-radius: 18px; background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm);
}
.drop-ico .ico { width: 30px; height: 30px; }
.drop-sub { color: var(--muted); margin: 10px 0 0; font-size: 15px; }
.drop-note { color: var(--muted); margin: 0; font-size: 13px; opacity: 0.85; }

/* Sample photos inside the upload box */
.samples { width: 100%; max-width: 420px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.samples-h { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.sample-list { display: flex; justify-content: center; gap: 10px; }
.sample {
  display: block; flex: 0 1 96px; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden;
  border: 2px solid var(--surface); box-shadow: var(--shadow-sm); transition: border-color 0.15s, transform 0.15s;
}
.sample img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sample:hover, .sample:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.samples-credit { margin: 10px 0 0; font-size: 12px; color: var(--muted); opacity: 0.85; }
.samples-credit a { color: inherit; }

.trust { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: 14px; font-weight: 500; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .ico { width: 18px; height: 18px; color: #16a34a; }

/* ---------- buttons ---------- */
button {
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2;
  border-radius: 999px; padding: 10px 18px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}
button:hover:not(:disabled) { background: var(--bg-soft); border-color: color-mix(in srgb, var(--fg) 18%, var(--line)); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
button.primary {
  background: var(--grad); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
button.primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.07); }
button.primary.big { font-size: 17px; padding: 14px 34px; }
button:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- editor ---------- */
/* app.js scrolls the editor into view after upload; on wide screens keep it clear of the sticky header. */
.editor { padding: 4px; scroll-margin-top: 12px; }
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin-bottom: 12px;
  padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px;
}
.toolbar label { font-size: 14px; font-weight: 500; color: var(--muted); padding-left: 4px; }
/* Phones: brush slider fills the first row, the three buttons share the second. */
.toolbar input[type="range"] { flex: 1 1 55%; min-width: 0; accent-color: var(--accent); }
.toolbar button { padding: 6px 10px; font-size: 14px; }

/* The stage shrinks to the image so the whole picture and the buttons fit on one screen;
   #paint is stretched over #img, and app.js maps pointer positions through its rect. */
.stage {
  position: relative; width: fit-content; max-width: 100%; margin: 0 auto; line-height: 0;
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); outline: 1px solid var(--line);
  background: repeating-conic-gradient(var(--line) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
}
#img { display: block; width: auto; height: auto; max-width: 100%; max-height: 62vh; }
#paint { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0.5; touch-action: none; cursor: crosshair; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.status { min-height: 1.6em; margin: 12px 0 2px; font-size: 14px; color: var(--muted); text-align: center; }
.status:empty { display: none; }
.status.error { color: var(--danger); }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px auto 4px; max-width: 420px; }
.progress div { height: 100%; width: 0; background: var(--grad); transition: width 0.2s; }

/* ---------- content blocks ---------- */
.block { margin-top: 80px; }
.section-title { font-size: 26px; line-height: 1.25; text-align: center; margin: 0 auto 28px; max-width: 720px; }

/* Before / after slider: the "before" image sits on top and is clipped at --pos (app.js). */
.ba { max-width: 900px; margin: 0 auto; }
.ba-stage {
  position: relative; overflow: hidden; border-radius: 20px; box-shadow: var(--shadow-lg);
  background: var(--bg-soft); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.ba-stage img { display: block; width: 100%; height: auto; pointer-events: none; }
.ba-stage .ba-before { position: absolute; left: 0; top: 0; height: 100%; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18); pointer-events: none;
}
.ba-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px;
  border-radius: 50%; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.ba:focus-within .ba-handle::after { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Tags sit at the bottom: the demo marks are in the sky, and a tag on top hid the logo on phones. */
.ba-tag {
  position: absolute; bottom: 12px; padding: 3px 10px; border-radius: 999px; pointer-events: none;
  background: rgba(15, 23, 42, 0.62); color: #fff; font-size: 13px; font-weight: 600;
}
.ba-tag-l { left: 12px; }
.ba-tag-r { right: 12px; }
.ba-range { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ba figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-size: 14px; }
.ba figcaption a { color: inherit; }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
ol.steps li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm);
}
ol.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 10px;
  border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; font-size: 15px;
}
ol.steps li p { margin: 0; font-size: 15px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.feat-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.feature h2 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; }
.feature p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.feature p:last-child { margin-bottom: 0; }

.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq-list details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; box-shadow: var(--shadow-sm); }
.faq-list details[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.faq-list summary { list-style: none; cursor: pointer; font-weight: 600; padding: 16px 28px 16px 0; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq-list details p { margin: 0 0 16px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; max-width: 820px; margin: 0 auto; }
.card {
  position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 52px 20px 20px; text-decoration: none; color: var(--fg); box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card strong { font-size: 17px; }
.card span { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.card-arrow { position: absolute; right: 20px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--accent); }

/* ---------- legal pages ---------- */
.prose { max-width: 760px; margin: 40px auto 0; }
.prose h1 { text-align: left; margin-left: 0; font-size: 32px; }
.prose h2 { font-size: 20px; margin: 32px 0 8px; }
.prose p { color: var(--muted); }

/* ---------- footer ---------- */
footer.site { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .wrap { padding-top: 40px; padding-bottom: 32px; }
.foot-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.foot-brand p { margin: 10px 0 0; }
footer.site nav { display: flex; flex-direction: column; gap: 6px; }
footer.site nav a { color: var(--muted); text-decoration: none; }
footer.site nav a:hover { color: var(--fg); }
.foot-h { margin: 0 0 4px; font-weight: 600; color: var(--fg); }
.foot-notes { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.foot-notes p { margin: 4px 0; }

@media (min-width: 720px) {
  .wrap { padding: 0 20px; }
  .toolbar { gap: 8px 10px; }
  header.site { position: sticky; top: 0; }
  .editor { scroll-margin-top: 80px; }
  .toolbar input[type="range"] { flex: 0 1 160px; }
  .toolbar button { padding: 7px 14px; }
  .hero { padding-top: 64px; }
  h1 { font-size: 52px; }
  .prose h1 { font-size: 40px; }
  .lede { font-size: 19px; }
  .tool { padding: 14px; }
  .drop { padding: 56px 24px 44px; }
  .section-title { font-size: 32px; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
}
