/* Cliccy landing page — Catppuccin Mocha theme */

:root {
  --base: #1e1e2e;
  --mantle: #181825;
  --crust: #11111b;
  --surface0: #313244;
  --surface1: #45475a;
  --overlay: #6c7086;
  --text: #cdd6f4;
  --subtext: #a6adc8;
  --mauve: #cba6f7;
  --blue: #89b4fa;
  --sapphire: #74c7ec;
  --green: #a6e3a1;
  --pink: #f5c2e7;
  --peach: #fab387;
  --red: #f38ba8;
  --yellow: #f9e2af;

  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--base);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ambient gradient glow */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 75% -10%, rgba(203, 166, 247, 0.16), transparent 60%),
    radial-gradient(50rem 40rem at 0% 10%, rgba(137, 180, 250, 0.12), transparent 55%),
    radial-gradient(40rem 30rem at 90% 80%, rgba(245, 194, 231, 0.08), transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0.7rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0.7rem auto 0;
  padding: 0.6rem 0.7rem 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(24, 24, 37, 0.6);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(108, 112, 134, 0.2);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 800; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  color: var(--crust);
  background: linear-gradient(135deg, var(--mauve), var(--blue));
  box-shadow: 0 4px 14px -4px rgba(203, 166, 247, 0.55);
}
.brand-name { font-size: 1.12rem; letter-spacing: -0.02em; }
.brand-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--mauve);
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(203, 166, 247, 0.12);
  border: 1px solid rgba(203, 166, 247, 0.22);
  transform: translateY(-1px);
}

/* center nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(17, 17, 27, 0.5);
  border: 1px solid rgba(108, 112, 134, 0.14);
}
.site-nav a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--subtext);
  transition: color 0.18s, background 0.18s;
}
.site-nav a:hover { color: var(--text); background: rgba(203, 166, 247, 0.1); }

.header-actions { display: flex; align-items: center; gap: 0.6rem; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  border: 1px solid rgba(108, 112, 134, 0.35);
  border-radius: 999px;
  font-weight: 600;
  transition: border-color 0.18s, background 0.18s;
}
.ghost-btn:hover { border-color: var(--mauve); background: rgba(203, 166, 247, 0.08); }
.star-pill {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.18rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow);
  border-radius: 999px;
  background: rgba(249, 226, 175, 0.12);
  border: 1px solid rgba(249, 226, 175, 0.2);
}

/* responsive: collapse nav on small screens */
@media (max-width: 720px) {
  .site-nav { display: none; }
  .ghost-btn .star-pill { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--mauve);
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(203, 166, 247, 0.3);
  border-radius: 999px;
  margin-bottom: 1.3rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.grad {
  /* punchline must stay on one line — never split "finally remembered." */
  white-space: nowrap;
  background: linear-gradient(110deg, var(--mauve), var(--pink) 45%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin: 1.4rem 0 2rem;
  font-size: 1.12rem;
  color: var(--subtext);
  max-width: 33rem;
}

/* hero inline install command */
.hero-install {
  display: flex; align-items: flex-start; gap: 0.5rem;
  max-width: 34rem;
  margin-bottom: 1rem;
  padding: 0.7rem 0.6rem 0.7rem 0.9rem;
  background: var(--crust);
  border: 1px solid rgba(108, 112, 134, 0.28);
  border-radius: 12px;
}
.hero-cmd {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* command syntax tokens */
.hero-cmd .p { color: var(--green); user-select: none; margin-right: 0.35rem; }
.t-cmd { color: var(--blue); font-weight: 500; }
.t-flag { color: var(--mauve); }
.t-url { color: var(--overlay); }
.t-pipe { color: var(--green); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.primary-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  font-weight: 700;
  color: var(--crust);
  background: linear-gradient(135deg, var(--mauve), var(--blue));
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(137, 180, 250, 0.25);
  transition: transform 0.16s, box-shadow 0.16s;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(137, 180, 250, 0.38); }

.secondary-btn {
  display: inline-flex; align-items: center;
  padding: 0.8rem 1.4rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid rgba(108, 112, 134, 0.4);
  border-radius: 999px;
  transition: border-color 0.16s, background 0.16s;
}
.secondary-btn:hover { border-color: var(--blue); background: rgba(137, 180, 250, 0.08); }

/* ---------- Mock popup (mirrors the real Cliccy GTK popup) ---------- */
.hero-demo { display: flex; justify-content: center; }
.cpopup {
  width: 100%;
  max-width: 460px;
  background: var(--base);
  border: 1px solid rgba(108, 112, 134, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.62), 0 6px 20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* header: logo + search field */
.cpopup-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0.85rem 0.7rem;
}
.cpopup-logo { width: 26px; height: 26px; flex-shrink: 0; display: block; }
.cpopup-logo svg { display: block; }

.cpopup-search {
  flex: 1; display: flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--surface0);
  border: 1px solid transparent;
  color: var(--overlay);
}
.cpopup-search.focus {
  border-color: rgba(203, 166, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(203, 166, 247, 0.16);
}
.cpopup-search svg { flex-shrink: 0; }
.cpopup-placeholder {
  flex: 1; font-size: 0.9rem; color: var(--overlay);
  letter-spacing: -0.01em; white-space: nowrap;
}
.cpopup-count {
  flex-shrink: 0; font-family: var(--mono); font-size: 0.7rem;
  color: var(--overlay); font-variant-numeric: tabular-nums;
}
.caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  background: var(--mauve);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* list */
.cpopup-list { list-style: none; padding: 0.3rem 0.5rem 0.5rem; }

.group-label {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.6rem 0.3rem; margin-top: 0.1rem;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--overlay);
}
.group-label::after { content: ""; flex: 1; height: 1px; background: rgba(108, 112, 134, 0.22); }
.group-label .pin-glyph { color: var(--mauve); display: inline-flex; }

.crow {
  position: relative;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}
.crow + .crow { margin-top: 1px; }
.crow.sel {
  background: rgba(88, 91, 112, 0.55);
  border-color: rgba(203, 166, 247, 0.26);
}
.crow.sel::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 56%; border-radius: 3px; background: var(--mauve);
}

.crow-num {
  flex-shrink: 0; width: 22px; height: 19px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 600;
  color: var(--overlay); background: rgba(108, 112, 134, 0.16);
  border-radius: 6px;
}
.crow.sel .crow-num { color: var(--mauve); background: rgba(203, 166, 247, 0.16); }

/* type glyph chip */
.crow-kind {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--surface0); color: var(--subtext);
}
.crow-kind.color-chip { border: 1px solid rgba(108, 112, 134, 0.3); }

/* image thumbnail */
.crow-thumb {
  flex-shrink: 0; width: 46px; height: 30px; border-radius: 6px;
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.crow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crow-text {
  font-size: 0.84rem; color: var(--text); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crow-text.mono { font-family: var(--mono); font-size: 0.78rem; }
.crow-sub { margin-top: 2px; font-size: 0.68rem; color: var(--overlay); }
.crow-time {
  flex-shrink: 0; font-family: var(--mono); font-size: 0.66rem;
  color: var(--overlay); font-variant-numeric: tabular-nums;
}

/* hover / selected row actions */
.crow-actions { flex-shrink: 0; display: flex; gap: 2px; opacity: 0; transition: opacity 0.12s; }
.crow:hover .crow-actions, .crow.sel .crow-actions { opacity: 1; }
.crow-act {
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; cursor: pointer;
  color: var(--overlay); transition: background 0.12s, color 0.12s;
}
.crow-act:hover { background: rgba(69, 71, 90, 0.6); color: var(--text); }
.crow-act.on { color: var(--mauve); }
.crow-act.danger:hover { color: var(--red); background: rgba(243, 139, 168, 0.14); }

/* footer hint bar */
.cpopup-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid rgba(108, 112, 134, 0.22);
  background: rgba(24, 24, 37, 0.6);
  font-size: 0.72rem; color: var(--overlay);
}
.cpopup-foot .hint { display: flex; align-items: center; gap: 0.3rem; }
.cpopup-foot kbd {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 600;
  color: var(--subtext); background: var(--surface0);
  padding: 0.12rem 0.4rem; border-radius: 5px;
  border: 1px solid rgba(108, 112, 134, 0.22); border-bottom-width: 2px;
  min-width: 18px; text-align: center;
}
.cpopup-foot .foot-spacer { flex: 1; }
.cpopup-foot .brand-tag { font-family: var(--mono); font-size: 0.66rem; opacity: 0.7; }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 4.5rem 1.5rem; }

/* feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.card {
  --ic: var(--mauve);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, rgba(49, 50, 68, 0.45), rgba(24, 24, 37, 0.45));
  border: 1px solid rgba(108, 112, 134, 0.2);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
}
/* per-card accent colors */
.card.c-mauve  { --ic: var(--mauve); }
.card.c-blue   { --ic: var(--blue); }
.card.c-peach  { --ic: var(--peach); }
.card.c-yellow { --ic: var(--yellow); }
.card.c-pink   { --ic: var(--pink); }
.card.c-green  { --ic: var(--green); }

/* top accent sheen */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ic), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
/* radial glow that follows the icon */
.card::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, color-mix(in srgb, var(--ic) 18%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--ic) 45%, transparent);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6),
              0 0 0 1px color-mix(in srgb, var(--ic) 12%, transparent);
}
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: 1.1rem;
  color: var(--ic);
  border-radius: 12px;
  background: linear-gradient(155deg,
              color-mix(in srgb, var(--ic) 20%, transparent),
              color-mix(in srgb, var(--ic) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--ic) 24%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.25s, box-shadow 0.25s;
}
.card-icon svg { width: 1.5rem; height: 1.5rem; display: block; }
.card:hover .card-icon {
  transform: scale(1.08) rotate(-3deg);
  background: linear-gradient(155deg,
              color-mix(in srgb, var(--ic) 34%, transparent),
              color-mix(in srgb, var(--ic) 12%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1),
              0 6px 16px -6px color-mix(in srgb, var(--ic) 50%, transparent);
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.card p { color: var(--subtext); font-size: 0.95rem; line-height: 1.55; }
.card code, .hero-note code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface0);
  color: var(--peach);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

/* copy button */
.copy-btn {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.78rem; font-weight: 600;
  color: var(--subtext);
  background: var(--surface0);
  border: 1px solid rgba(108, 112, 134, 0.3);
  border-radius: 8px;
  padding: 0.32rem 0.62rem;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.copy-btn:hover { color: var(--text); border-color: var(--mauve); background: rgba(203, 166, 247, 0.1); }
.copy-btn.mini { margin-left: 0; padding: 0.4rem; }
.copy-btn.mini .copy-text { display: none; }
.copy-btn .i-check { display: none; }
.copy-btn.copied { color: var(--green); border-color: rgba(166, 227, 161, 0.5); background: rgba(166, 227, 161, 0.08); }
.copy-btn.copied .i-copy { display: none; }
.copy-btn.copied .i-check { display: inline; }

/* short requirements note under the hero command */
.hero-note {
  margin-bottom: 1.6rem;
  color: var(--overlay);
  font-size: 0.9rem;
  max-width: 33rem;
}
.hero-note strong { color: var(--subtext); }

/* footer */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  align-items: center; justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid rgba(108, 112, 134, 0.18);
  color: var(--overlay);
  font-size: 0.9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .hero-demo { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}
