/* Bubble gradients website. Same visual language as the plugin:
   Avenir Next, one blue accent, soft shadows, quiet greys. */

:root {
  --accent: #5468ef; /* from the icon: between its violet and blue */
  --accent-hover: #6a7bf3;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --bg: #f9f9f9;
  --card: #ffffff;
  --line: #e9e9e9;
  --dark: #141416;
  --shadow: 0 2px 16px rgb(0 0 0 / 0.12);
  --radius: 20px;
  font-family: 'Avenir Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
img { display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 16px; }
h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; }
h3 { font-size: 26px; font-weight: 600; }
p { margin: 0 0 16px; }

.container { width: min(1120px, 100% - 48px); margin: 0 auto; }
.container.narrow { width: min(760px, 100% - 48px); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 600; opacity: 0.8; margin-bottom: 12px; }

/* --- Buttons ------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 26px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.button:hover { transform: translateY(-1px); }
/* Primary buttons: a gradient in the icon's colours (violet into blue),
   deep enough for white text. Hover just lifts it a touch and brightens it. */
.button.primary {
  color: #fff;
  background: linear-gradient(120deg, #7350ec 0%, #5468ef 50%, #2b7be4 100%);
  box-shadow: 0 6px 20px rgb(84 104 239 / 0.3);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.button.primary:hover { filter: brightness(1.07); box-shadow: 0 8px 24px rgb(84 104 239 / 0.4); }

/* Hero buttons, on top of the live gradient:
   the main one solid white with deep blue-violet text, the second one outlined. */
.button.light { background: #ffffff; color: #1d1a4a; box-shadow: 0 6px 20px rgb(0 0 0 / 0.14); text-shadow: none; }
.button.light:hover { background: #f4f3ff; }
.button.outline-light {
  color: #ffffff;
  background: rgb(255 255 255 / 0.16);
  border: 1.5px solid rgb(255 255 255 / 0.75);
  backdrop-filter: blur(10px);
}
.button.outline-light:hover { background: rgb(255 255 255 / 0.26); }
/* Secondary button over gradients: solid white, so it reads on any colour. */
.button.ghost { background: #ffffff; color: var(--text); box-shadow: 0 6px 20px rgb(0 0 0 / 0.12); text-shadow: none; }
.button.ghost:hover { background: #f3f3f5; }
.button.small { height: 36px; padding: 0 18px; font-size: 14px; }
.button.wide { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* --- Header -------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.label-short { display: none; }
.brand img { border-radius: 50%; }
.nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: #2c2c2e; }
.nav a:hover { color: #000000; }

/* --- Live gradients (see js/bubbles.js) ------------------------------------ */
.bubbles { position: relative; overflow: hidden; container-type: size; --unit: calc((100cqw + 100cqh) / 2); }
.bubbles-layer { position: absolute; inset: 0; transition: opacity 0.8s ease; }
.bubbles-group { position: absolute; inset: 0; isolation: isolate; }
.bubble { position: absolute; mix-blend-mode: hard-light; }
.bubble-fill {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(closest-side, rgb(0 0 0 / 0.95), rgb(0 0 0 / 0.71) 50%, transparent);
  mask-image: radial-gradient(closest-side, rgb(0 0 0 / 0.95), rgb(0 0 0 / 0.71) 50%, transparent);
}
.is-paused .bubble, .is-offscreen .bubble { animation-play-state: paused !important; }
@keyframes bubble-orbit { to { transform: rotate(360deg); } }
@keyframes bubble-up-down {
  from { transform: translateY(calc(var(--reach) * -1)); }
  to { transform: translateY(var(--reach)); }
}

.shuffle-pill {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 19px;
  border: 1px solid rgb(255 255 255 / 0.5);
  background: rgb(255 255 255 / 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.15s;
}
.shuffle-pill:hover { background: rgb(255 255 255 / 0.3); }

/* --- Hero ------------------------------------------------------------------ */
/* The hero is a large rounded panel, inset from the window edges. */
.hero {
  position: relative;
  margin: 88px 40px 0;
  min-height: min(calc(100vh - 128px), 800px);
  border-radius: 48px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate; /* keeps the rounded corners clean over the blur */
}
.hero-gradient { position: absolute; inset: 0; }
.hero-content { position: relative; padding: 72px 0; text-shadow: 0 1px 24px rgb(0 0 0 / 0.18); }
.hero-content .lead { font-size: 21px; max-width: 560px; opacity: 0.92; }
.underline { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero .shuffle-pill { position: absolute; right: 36px; bottom: 34px; } /* a little in from the rounded corner */

/* --- Sections & features ------------------------------------------------- */
.section { padding: 112px 0; }
/* Menu links land just below the fixed header, not under it. */
section[id] { scroll-margin-top: 64px; }
.section-title { text-align: center; margin-bottom: 16px; }
.section-lead { text-align: center; color: var(--muted); margin-bottom: 48px; }

.feature { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; margin-bottom: 104px; }
.feature:last-child { margin-bottom: 0; }
.feature.reverse .feature-text { order: 2; }
.feature-text h3 { font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; }
.feature-text p { color: var(--muted); font-size: 18px; }
.feature-visual { position: relative; }
.frame { aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: var(--shadow); }
.feature-visual .shuffle-pill.on-card { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); }

/* Feature visuals: a few organic shapes of different sizes, each with its own
   live gradient, arranged like a small composition. */
.composition { position: relative; aspect-ratio: 5 / 4; }
.shape { position: absolute; aspect-ratio: 1; box-shadow: 0 10px 34px rgb(0 0 0 / 0.14); }
.shape.big { width: 74%; }
.shape.small { width: 32%; }
.shape.tiny { width: 18%; }

.circle { border-radius: 50%; }
.squircle { border-radius: 34%; }
.blob-a { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
.blob-b { border-radius: 42% 58% 66% 34% / 46% 40% 60% 54%; }
.blob-c { border-radius: 36% 64% 58% 42% / 40% 42% 58% 60%; }

/* Where the shapes sit in each composition */
/* The circle overlaps the big blob by about half its width. */
.comp-shuffle .big { left: 0; top: 10%; }
.comp-shuffle .small { left: 52%; top: 2%; z-index: 1; }
.comp-shuffle .shuffle-pill.on-card { left: 37%; bottom: 14%; z-index: 2; }

.comp-fill .big { left: 6%; top: 4%; }

.comp-editor .big { left: 2%; top: 2%; }

.comp-colors .big { right: 0; top: 0; }
.comp-colors .small { left: 0; bottom: 6%; }
.comp-colors .tiny { left: 14%; top: 4%; }

/* Small mock-ups of Figma / plugin panels, laid over the visuals */
.mock-panel {
  position: absolute;
  width: 230px;
  padding: 6px 0;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.16);
  font-size: 12px;
  color: var(--text);
}
.mock-panel.inspector { right: 0; bottom: 4%; }
.mock-panel.editor { right: 0; bottom: 0; width: 210px; }
.mock-section { padding: 10px 14px; }
.mock-section + .mock-section { border-top: 1px solid var(--line); }
.mock-title { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 8px; }
.mock-row { display: flex; align-items: center; gap: 10px; }
.mock-value { margin-left: auto; color: var(--muted); }
.mock-thumb { width: 20px; height: 20px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1); }
.mock-noise {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: repeating-conic-gradient(#d6d6d6 0% 25%, #f2f2f2 0% 50%) 50% / 4px 4px;
}
.mock-slider { display: grid; gap: 4px; margin-bottom: 8px; color: var(--muted); }
.mock-slider i { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--v), #e4e4e4 var(--v)); }
.mock-swatches { display: flex; gap: 5px; }
.mock-swatches i { width: 20px; height: 20px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1); }
.mock-shuffle { font-weight: 600; font-size: 10px; padding: 2px 10px; border: 1px solid #9797a9; border-radius: 10px; }
.mock-segmented { display: flex; padding: 2px; background: #ebebeb; border-radius: 7px; text-align: center; }
.mock-segmented > * { flex: 1; padding: 4px 0; border-radius: 5px; color: var(--muted); font-weight: 500; }
.mock-segmented b { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }

/* Styles & variables panel */
.swatch-panel {
  position: absolute;
  right: 6%;
  bottom: 0;
  width: 220px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
}
.swatch-heading { font-weight: 600; margin: 4px 0 6px; }
.swatch-heading + .swatch-row { margin-top: 0; }
.swatch-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; color: var(--muted); }
.swatch-row + .swatch-heading { margin-top: 12px; }
.dot { width: 16px; height: 16px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1); }
.dot.style { border-radius: 50%; }
.dot.variable { border-radius: 3px; }

/* --- Dark "export as code" highlight ------------------------------------------- */
.dark { background: var(--dark); color: #fff; }
.dark .feature { margin: 0 auto; } /* keep it centred like the other sections */
.dark .feature-text p { color: rgb(255 255 255 / 0.72); }
.checks { list-style: none; padding: 0; margin: 20px 0 0; }
.checks li { position: relative; padding-left: 30px; margin: 10px 0; }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.dark .checks li::before { color: #7aa2ff; }
.code-visual { display: grid; }
.code-preview { aspect-ratio: 16 / 10; }
.code {
  margin: -56px 24px 0;
  position: relative;
  padding: 20px 22px;
  background: #1f1f23;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgb(0 0 0 / 0.4);
  font: 13px/1.6 ui-monospace, 'SF Mono', Menlo, monospace;
  color: #d6d6dc;
  overflow-x: auto;
}
.code .c { color: #7d7d88; }
.code .p { color: #8fb3ff; }

/* --- Gallery ------------------------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.gallery > div { aspect-ratio: 4 / 3; border-radius: 20px; box-shadow: var(--shadow); }

/* --- Pricing ------------------------------------------------------------------- */
/* Room above and below the price, so it breathes. */
#pricing { padding: 120px 0 176px; }
/* One plan, so no card: the price and button on the left, what's included on the right. */
.pricing {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  gap: 72px;
  margin-top: 72px;
}
.pricing-main { text-align: center; }
.price .amount { font-size: 72px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.price .per { font-size: 22px; color: var(--muted); }
.price-note { color: var(--muted); margin: 8px 0 24px; }
.price-footnote { color: var(--muted); font-size: 14px; margin: 14px 0 0; }
.pricing-list { margin: 0; padding-left: 72px; border-left: 1px solid var(--line); font-size: 18px; }

/* --- FAQ ----------------------------------------------------------------------- */
#faq { padding-top: 48px; } /* plus the space under pricing: a clear gap between the two */
#faq .section-title { margin-bottom: 40px; }
details { border-bottom: 1px solid var(--line); padding: 20px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 24px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { color: var(--muted); margin: 0; padding-top: 12px; overflow: hidden; }

/* --- Closing & footer ---------------------------------------------------------------- */
.closing { position: relative; padding: 140px 0; color: #fff; text-align: center; overflow: hidden; }
.closing-gradient { position: absolute; inset: 0; }
.closing-content { position: relative; }
.closing h2 { margin-bottom: 28px; }
.footer { padding: 32px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* --- Smaller screens --------------------------------------------------------------- */
/* --- Tablets and narrow windows: one column -------------------------------------- */
@media (max-width: 900px) {
  .hero { margin: 80px 24px 0; border-radius: 40px; }
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .feature { grid-template-columns: 1fr; gap: 32px; margin-bottom: 88px; }
  .feature.reverse .feature-text { order: 0; }
  .feature-visual { width: 100%; max-width: 520px; margin: 0 auto; } /* keep visuals in proportion when stacked */
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .gallery > div:nth-child(n + 9) { display: none; } /* 8 tiles: even rows in two columns */
  .section { padding: 80px 0; }
  .pricing { grid-template-columns: 1fr; gap: 36px; }
  .pricing-list { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--line); justify-self: center; }

  /* Pricing and FAQ: much less space than on desktop, where it's needed to separate side-by-side blocks. */
  #pricing { padding: 24px 0 80px; } /* the examples section above already ends with space */
  #pricing .pricing { margin-top: 40px; }
  #faq { padding-top: 0; }

  /* Visuals sit under the text now, so centre each composition as a whole. */
  .comp-shuffle .big { left: 8%; }
  .comp-shuffle .small { left: 60%; }
  .comp-shuffle .shuffle-pill.on-card { left: 45%; }
  .comp-fill .big { left: 8%; }
  .mock-panel.inspector { right: 6%; }
}

/* --- Phones --------------------------------------------------------------------------- */
@media (max-width: 520px) {
  /* Less space around the hero panel, more space inside it. */
  .hero { margin: 72px 8px 0; border-radius: 28px; }
  .hero .container { width: calc(100% - 56px); }
  .hero-content { padding: 48px 0 104px; }
  .hero .shuffle-pill { right: 28px; bottom: 28px; }
  .header .button.small { height: 32px; padding: 0 16px; font-size: 13px; }
  .label-long { display: none; }
  .label-short { display: inline; }
  .code { margin: -40px 8px 0; font-size: 12px; }
  .mock-panel, .swatch-panel { transform: scale(0.9); transform-origin: bottom right; }
}

/* Respect "reduce motion": gradients stay still. */
@media (prefers-reduced-motion: reduce) {
  .bubble { animation-play-state: paused !important; }
}
