/* ==========================================================================
   TiggleMind AI — marketing site styles
   Purple aurora identity: a near-black ground with a violet tint, magenta to
   blue light, glass surfaces, Plus Jakarta Sans for headings, DM Sans for
   text and DM Mono for labels. The logo keeps its own navy and electric blue
   and sits on a white tile so the navy half stays visible.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Ground and ink */
  --bg: #08060c;
  --bg-2: #0c0912;
  --surface-solid: #0f0c16;
  --surface-2: #15111e;
  --ink: #f6f3fb;
  --ink-2: #d8d2e4;
  --muted: #a8a1b8;      /* 7.9:1 on --bg */
  --muted-2: #807990;    /* 4.9:1 on --bg, tertiary text only */
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.24);

  /* Aurora palette */
  --magenta: #e24bff;
  --violet: #9b5cff;
  --blue: #4f8dff;
  --cyan: #22c3e6;
  /* Accents for avatars and status chips */
  --pink: #f472b6;
  --coral: #ff8f7a;
  --amber: #fbbf24;
  --green: #4ade80;
  --yes: #4ade80;
  --no: #f87171;
  --grad: linear-gradient(115deg, #e24bff 0%, #9b5cff 50%, #4f8dff 100%);
  /* Deeper stops where white text sits on the gradient (4.7:1 or better) */
  --grad-btn: linear-gradient(115deg, #b52fd6 0%, #7c3aed 55%, #2f6fe0 100%);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  --font-display: "Plus Jakarta Sans", "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-serif: Georgia, "Times New Roman", serif;

  --container: 1200px;
  --gutter: clamp(18px, 4vw, 48px);
  --nav-h: 68px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); background: var(--bg); scrollbar-color: #3a2f4d var(--bg); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
::selection { background: rgba(226, 75, 255, 0.45); color: #fff; }
:focus-visible { outline: 2px solid #cfb0ff; outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -64px; z-index: 1000; padding: 12px 16px; border-radius: var(--r); background: #fff; color: #0b0812; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: clamp(42px, 7vw, 92px); font-weight: 400; line-height: 1.03; letter-spacing: -0.045em; }
h2 { font-size: clamp(30px, 4.2vw, 54px); font-weight: 600; line-height: 1.08; letter-spacing: -0.038em; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
h4 { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }

.lead { max-width: 60ch; font-size: clamp(16.5px, 1.35vw, 19px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* Light from the aurora, painted into text */
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Split into words for animation, each word shows its own slice of the one gradient */
.w .grad { background-size: calc(var(--gn, 1) * 100%) 100%; background-position: calc(var(--gi, 0) / max(var(--gn, 1) - 1, 1) * 100%) 0; }

/* Small mono label with a short rule of light in front */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; line-height: 1.3; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--grad); }

/* Text link with an arrow that nudges forward */
.link { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); transition: color var(--dur) var(--ease); }
.link .icon { width: 16px; height: 16px; stroke-width: 2; color: #d9b3ff; transition: transform 0.35s var(--ease); }
.link:hover { color: #fff; }
.link:hover .icon { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(64px, 8.5vw, 116px); }
.section--tight { padding-block: clamp(48px, 6vw, 84px); }
.section-head { display: grid; gap: 18px; max-width: 780px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head--center { margin-inline: auto; justify-items: center; text-align: center; }
.center { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 52px); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r);
  font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1; letter-spacing: -0.005em;
  white-space: nowrap; cursor: pointer; user-select: none; touch-action: manipulation;
  transition: transform var(--dur) var(--ease), box-shadow 0.3s var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn .icon { width: 17px; height: 17px; stroke-width: 2; transition: transform 0.35s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-down:hover .icon { transform: translateY(3px); }
.btn-primary { background: #fff; color: #0b0812; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 12px 34px -14px rgba(226, 75, 255, 0.7); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 18px 46px -12px rgba(226, 75, 255, 0.95); }
.btn-primary:active { transform: scale(0.98); }
.btn-glass { background: rgba(255, 255, 255, 0.06); border-color: var(--line-2); color: var(--ink); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.11); border-color: var(--line-3); }
.btn-grad { background: var(--grad-btn); color: #fff; box-shadow: 0 14px 40px -14px rgba(155, 92, 255, 0.9); }
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 20px 52px -14px rgba(180, 80, 255, 1); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 26px; border-radius: 14px; font-size: 16px; }
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.75; }
/* A long label on wide screens, a short one on phones */
.m-short { display: none; }
@media (max-width: 480px) { .m-long { display: none; } .m-short { display: inline; } }

/* --------------------------------------------------------------------------
   Pills, tags, chips, avatars, ratings
   -------------------------------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
a.pill:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-3); }
.pill__tag { padding: 4px 10px; border-radius: var(--r-pill); background: var(--grad-btn); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.pill__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }

.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; font-family: var(--font-display); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; color: #fff; background: color-mix(in srgb, var(--c, var(--violet)) 30%, #15101f); border: 1px solid color-mix(in srgb, var(--c, var(--violet)) 62%, transparent); }

.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 9px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 38%, transparent); font-size: 11.5px; font-weight: 500; white-space: nowrap; color: color-mix(in srgb, var(--c) 55%, #fff); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.chip--green { --c: var(--green); }
.chip--blue { --c: #60a5fa; }
.chip--yellow { --c: var(--amber); }
.chip--pink { --c: var(--pink); }

.rating { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.rating strong { font-weight: 600; color: var(--ink); }
.rating__stars { display: inline-flex; gap: 2px; color: #ffd166; }
.rating__stars svg { width: 15px; height: 15px; fill: currentColor; }
.rating .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }

/* --------------------------------------------------------------------------
   Cards, with a light that follows the pointer along the border
   -------------------------------------------------------------------------- */
.card { position: relative; padding: 28px; border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); border: 1px solid var(--line); transition: border-color 0.35s var(--ease), transform 0.35s var(--ease); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.glow { isolation: isolate; }
.glow::before, .glow::after { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.4s var(--ease); }
.glow::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(180, 80, 255, 0.16), transparent 60%); }
.glow::after {
  z-index: 1; padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(232, 120, 255, 0.95), rgba(120, 130, 255, 0.4) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glow:hover::before, .glow:hover::after, .glow:focus-within::before, .glow:focus-within::after { opacity: 1; }
@media (hover: none) { .glow::before, .glow::after { display: none; } }

/* --------------------------------------------------------------------------
   Motion primitives (only while JS is running)
   -------------------------------------------------------------------------- */
/* The stagger delay applies to the reveal only, so hover states stay immediate */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease) var(--delay, 0ms), transform 0.9s var(--ease) var(--delay, 0ms), translate 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.4s var(--ease), background-color 0.3s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Headline words sharpen in one by one */
.js [data-split] .w { display: inline-block; opacity: 0; transform: translateY(0.35em); filter: blur(14px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--i, 0) * 60ms + var(--delay, 0ms)); }
.js [data-split].is-in .w { opacity: 1; transform: none; filter: blur(0); }
.js [data-scrub] .w { display: inline-block; transition: opacity 0.35s linear; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js [data-split] .w { opacity: 1; transform: none; filter: none; transition: none; }
  .btn, .btn .icon, .card, .link .icon { transition: none; }
}
