/* ============================
   TextMop — shared styles
   ============================ */

:root {
  --bg: #F6F5F0;
  --bg-card: #FFFFFF;
  --text: #1C2420;
  --text-muted: #5C6B64;
  --border: #E2DED2;
  --accent: #2F8F7B;
  --accent-dark: #1F5F50;
  --accent-light: #E3F1ED;
  --highlight: #FFB648;
  --radius: 10px;
  --font-display: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
}

/* ---------- Layout helpers ---------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent-dark);
}

.site-nav a.active {
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-small {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
[contenteditable]:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 0.9rem;
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* ---------- Sweep demo (signature element) ---------- */

.sweep-demo {
  position: relative;
  height: 130px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.sweep-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
}

.sweep-messy {
  color: var(--text-muted);
}

.sweep-messy .tag {
  color: var(--highlight);
  background: #FFF6E6;
  border-radius: 3px;
  padding: 0 2px;
}

.sweep-clean-wrap {
  clip-path: inset(0 100% 0 0);
  animation: sweepReveal 7s ease-in-out infinite;
  background: var(--bg-card);
}

.sweep-clean {
  color: var(--text);
}

.sweep-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  left: 0%;
  animation: sweepBar 7s ease-in-out infinite;
}

.sweep-bar::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  background: var(--accent);
  border-radius: 50% 50% 50% 0;
}

@keyframes sweepReveal {
  0%, 8% { clip-path: inset(0 100% 0 0); }
  50%, 60% { clip-path: inset(0 0% 0 0); }
  100% { clip-path: inset(0 100% 0 0); }
}

@keyframes sweepBar {
  0%, 8% { left: 0%; }
  50%, 60% { left: 100%; }
  100% { left: 0%; }
}

@media (prefers-reduced-motion: reduce) {
  .sweep-clean-wrap { animation: none; clip-path: inset(0 0 0 0); }
  .sweep-bar { animation: none; left: 100%; }
}

/* ---------- Tools grid ---------- */

.section-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.15s ease, transform 0.05s ease;
}

.tool-card:hover {
  border-color: var(--accent);
}

.tool-card.disabled {
  color: var(--text-muted);
  cursor: default;
}

.tool-card.disabled:hover {
  border-color: var(--border);
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  flex-grow: 1;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  align-self: flex-start;
}

.badge-live {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.badge-soon {
  background: #F1EFE8;
  color: var(--text-muted);
}

/* ---------- Privacy strip ---------- */

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
}

.privacy-note .icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.privacy-note h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.privacy-note p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Tool page ---------- */

.tool-header {
  padding: 2.5rem 0 1.5rem;
}

.tool-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}

.tool-header p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
}

.tool-app {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2.5rem;
}

.tool-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 720px) {
  .tool-panes {
    grid-template-columns: 1fr;
  }
}

.pane label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.pane .count {
  font-weight: 400;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.text-box {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}

.text-box:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}

.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tool-options label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.tool-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.tool-content {
  max-width: 680px;
}

.tool-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
}

.tool-content p {
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-dark);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}
