/* Tua Agenda v4 — base styles */
:root {
  --accent: #5129a6;
  --accent-2: #8b5cf6;
  --accent-deep: #2e1466;
  --accent-tint: #ede7fa;
  --accent-tint-2: #d9ccf5;
  --bg: #f6f1ff;
  --surface: #ffffff;
  --surface-2: #ede7fa;
  --surface-3: #2e1466;
  --ink: #1a0f33;
  --ink-2: #3d2a6a;
  --muted: #6b5c8f;
  --line: rgba(81, 41, 166, 0.16);
  --line-2: rgba(81, 41, 166, 0.32);
  --glow: 0 30px 80px -20px color-mix(in oklab, var(--accent) 45%, transparent);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --pad-section: clamp(56px, 8vw, 120px) clamp(20px, 5vw, 64px);
  --maxw: 1240px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:root[data-density="compact"] {
  --pad-section: clamp(36px, 5vw, 80px) clamp(16px, 4vw, 52px);
  --radius: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { text-wrap: balance; margin: 0; letter-spacing: -0.02em; color: var(--ink); }
p { text-wrap: pretty; margin: 0; color: var(--ink-2); }

.section { padding: var(--pad-section); position: relative; }
.wrap { max-width: var(--maxw); margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .25s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 30px -10px color-mix(in oklab, var(--accent) 60%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 18px 36px -12px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent-tint); }
.btn-lg { padding: 18px 28px; font-size: 16px; border-radius: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.glass {
  background: color-mix(in oklab, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line);
}

.gradient-text {
  background: linear-gradient(95deg, var(--accent) 0%, var(--accent-2) 60%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.strike {
  position: relative;
  white-space: nowrap;
  color: var(--muted);
}
.strike::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 3px;
  background: var(--accent);
  transform: translateY(-50%) rotate(-2deg);
  border-radius: 2px;
  opacity: .85;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
:root[data-anim="off"] .reveal { opacity: 1; transform: none; transition: none; }

.glow-orb {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  pointer-events: none;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 50%, transparent) 0%, transparent 70%);
}
:root[data-glow="off"] .glow-orb { display: none; }

/* Helpers */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; }

/* Cookie banner */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  max-width: 720px; margin: 0 auto;
  padding: 14px 18px;
  z-index: 80;
  display: flex; align-items: center; gap: 14px;
  border-radius: 14px;
  font-size: 13px;
  box-shadow: var(--glow);
}
.cookie-banner p { margin: 0; flex: 1; color: var(--ink-2); }
.cookie-banner button {
  background: var(--accent); color: #fff;
  padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 13px;
}

/* Tweaks panel */
.tweaks {
  position: fixed; right: 16px; bottom: 16px;
  z-index: 90;
  width: 280px;
  border-radius: 16px;
  padding: 16px;
  font-size: 13px;
}
.tweaks h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.tweaks-section + .tweaks-section { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .15s; }
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.toggle { width: 36px; height: 20px; border-radius: 999px; background: var(--surface-2); position: relative; transition: background .2s; }
.toggle.on { background: var(--accent); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; }
.toggle.on::after { left: 18px; }
.seg { display: flex; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.seg button { flex: 1; padding: 6px 10px; border-radius: 6px; font-size: 12px; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.tweaks-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 91;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow);
}

/* IMAGE PLACEHOLDERS */
.placeholder {
  position: relative;
  width: 100%;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in oklab, var(--accent) 6%, transparent) 0 14px,
      color-mix(in oklab, var(--accent) 10%, transparent) 14px 28px
    );
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-family: var(--font-mono);
}
.placeholder__cross {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top right,
      transparent calc(50% - 0.75px),
      color-mix(in oklab, var(--accent) 35%, transparent) calc(50% - 0.75px),
      color-mix(in oklab, var(--accent) 35%, transparent) calc(50% + 0.75px),
      transparent calc(50% + 0.75px)),
    linear-gradient(to bottom right,
      transparent calc(50% - 0.75px),
      color-mix(in oklab, var(--accent) 35%, transparent) calc(50% - 0.75px),
      color-mix(in oklab, var(--accent) 35%, transparent) calc(50% + 0.75px),
      transparent calc(50% + 0.75px));
  pointer-events: none;
}
.placeholder__body {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  max-width: 80%;
  box-shadow: 0 12px 30px -10px color-mix(in oklab, var(--accent) 35%, transparent);
}
.placeholder__icon { color: var(--accent); margin-bottom: 4px; }
.placeholder__label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
  text-wrap: balance;
}
.placeholder__hint {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
  text-wrap: pretty;
  max-width: 36ch;
}
.placeholder__size {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-tint);
  border: 1px solid var(--line-2);
}
.placeholder__corner {
  position: absolute; font-family: monospace; font-size: 14px;
  color: var(--accent); opacity: .55;
  line-height: 1; padding: 4px;
}
.placeholder__corner--tl { top: 0; left: 0; }
.placeholder__corner--tr { top: 0; right: 0; }
.placeholder__corner--bl { bottom: 0; left: 0; }
.placeholder__corner--br { bottom: 0; right: 0; }

.placeholder--tint {
  background:
    repeating-linear-gradient(135deg, var(--accent-tint) 0 14px, color-mix(in oklab, var(--accent) 14%, var(--accent-tint)) 14px 28px);
}

/* Responsive */
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
}
