/* CleanBub site: white, Apple-like, one blue accent (the Mac app's palette). */
:root {
  --ink: #0b1533;
  --muted: #5b6478;
  --line: #e7eaf1;
  --soft: #f5f7fb;
  --brand: #1f6bff;
  --brand-light: #3d8bff;
  --green: #12a974;
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Be Vietnam Pro", "Hiragino Sans", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.nav nav { display: flex; gap: 26px; margin: 0 auto; font-size: 14px; }
.nav nav a { color: var(--muted); }
.nav nav a:hover { color: var(--ink); text-decoration: none; }
.lang { border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; border: 0;
}
.pill:hover { text-decoration: none; }
.pill.big { padding: 15px 28px; font-size: 17px; }
.pill.blue { background: linear-gradient(90deg, var(--brand), var(--brand-light)); box-shadow: 0 10px 24px rgba(31, 107, 255, 0.28); }
.pill.soon { cursor: default; }

/* Hero */
.hero { text-align: center; padding: 72px 0 0; background: radial-gradient(1200px 520px at 50% -10%, #e9f1ff 0%, #fff 70%); }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(27, 58, 143, 0.08);
}
.chip img { width: 26px; height: 26px; }
h1 {
  margin: 22px auto 0; max-width: 900px;
  font-size: clamp(42px, 7.4vw, 88px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800;
}
h1 .accent, h2 .accent { color: var(--brand); }
.lead { margin: 22px auto 0; max-width: 640px; color: var(--muted); font-size: 19px; }
.cta { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.meta { color: var(--muted); font-size: 13.5px; }

/* The Mac that shows the app */
.mac { margin: 54px auto 0; max-width: 1040px; padding: 0 20px; }
.mac .screen {
  border-radius: 22px 22px 0 0; padding: 12px 12px 0; background: #0d1117;
  box-shadow: 0 40px 90px rgba(27, 58, 143, 0.22);
}
.mac .screen img { border-radius: 12px 12px 0 0; width: 100%; }
.mac .base { height: 16px; margin: 0 -28px; border-radius: 0 0 18px 18px; background: linear-gradient(#d9dde6, #b9bfcc); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px auto 0; padding: 0 20px; }
.tabs button {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Sections */
section { padding-top: 120px; }
h2 { margin: 0; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 800; }
.sub { margin: 18px 0 0; max-width: 620px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.card { background: var(--soft); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 16px 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.tile {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  color: #fff; font-size: 20px; font-weight: 700;
}
.tile.green { background: linear-gradient(135deg, #4ccf9f, var(--green)); }
.tile.orange { background: linear-gradient(135deg, #ffb35c, #e8730c); }
.tile.slate { background: linear-gradient(135deg, #a9b0c2, #6f7890); }
.tile.blue { background: linear-gradient(135deg, #6aa8ff, var(--brand)); }
.tile.plum { background: linear-gradient(135deg, #b98be0, #8e4ec6); }

/* Dark panel: an example scan */
.panel {
  margin-top: 36px; border-radius: 28px; padding: 34px; color: #fff;
  background: radial-gradient(900px 400px at 85% 0%, #1b3a8f 0%, #0b1533 60%);
}
.panel .label { color: #9fb4e6; font-size: 14px; font-weight: 600; }
.panel .big { font-size: clamp(54px, 9vw, 112px); line-height: 1; letter-spacing: -0.05em; font-weight: 800; margin: 10px 0 6px; }
.panel .big span { color: #63e0b0; }
.bar { display: flex; gap: 3px; height: 12px; border-radius: 999px; overflow: hidden; margin: 24px 0 18px; }
.bar i { display: block; }
.legend { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 20px; font-size: 14.5px; color: #c9d5f2; }
.legend b { display: block; color: #fff; font-size: 17px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.note { margin-top: 18px; font-size: 13px; color: #8ea3d6; }

/* Two-column feature rows */
.row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px; align-items: center; }
.row.flip > :first-child { order: 2; }
.shot { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(27, 58, 143, 0.14); }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; }
.ticks li { padding-left: 30px; position: relative; margin-top: 10px; color: var(--muted); }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }

/* iPhone teaser */
.teaser { margin-top: 0; border-radius: 28px; background: linear-gradient(120deg, #eef3fc, #f6f8fd); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.teaser .text { padding: 44px; }
.teaser img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; min-height: 300px; }

/* FAQ and footer */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 650; font-size: 18px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; color: var(--muted); max-width: 760px; }
footer { margin-top: 120px; background: var(--soft); border-top: 1px solid var(--line); padding: 36px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
footer .links { margin-left: auto; display: flex; gap: 22px; }

/* Policy pages */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 0; }
.doc h1 { font-size: 44px; text-align: left; margin: 0; }
.doc h2 { font-size: 24px; margin-top: 40px; letter-spacing: -0.02em; }
.doc p, .doc li { color: #2c3550; }
.doc .updated { color: var(--muted); font-size: 14px; }

@media (max-width: 860px) {
  .nav nav { display: none; }
  .nav .wrap { gap: 12px; }
  .lang { margin-left: auto; }
  .cards, .row, .teaser { grid-template-columns: 1fr; }
  .row.flip > :first-child { order: 0; }
  .legend { grid-template-columns: repeat(2, 1fr); }
  section { padding-top: 84px; }
  .panel { padding: 24px; }
  .teaser .text { padding: 28px; }
  .mac .base { margin: 0 -10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Motion: staged hero entrance, scroll reveals, a floating Bub, a marquee and
   a tilting Mac. All of it is switched off for people who ask for less motion. */
.hero { position: relative; overflow: hidden; }
.glow {
  position: absolute; inset: -20% -10% auto; height: 620px; pointer-events: none;
  background:
    radial-gradient(420px 300px at 22% 40%, rgba(61, 139, 255, 0.28), transparent 70%),
    radial-gradient(460px 320px at 78% 30%, rgba(99, 224, 176, 0.22), transparent 70%),
    radial-gradient(380px 280px at 55% 70%, rgba(255, 190, 110, 0.20), transparent 70%);
  filter: blur(20px);
  animation: drift 14s ease-in-out infinite alternate;
}
.hero .wrap, .mac, .tabs { position: relative; }
@keyframes drift { from { transform: translate3d(-3%, 0, 0) scale(1); } to { transform: translate3d(3%, 4%, 0) scale(1.08); } }
.hero .chip, .hero h1 > span, .hero .lead, .hero .cta { opacity: 0; transform: translateY(22px); animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.hero h1 > span { display: inline-block; }
.hero h1 > span:nth-of-type(1) { animation-delay: 0.08s; }
.hero h1 > span:nth-of-type(2) { animation-delay: 0.2s; }
.hero .lead { animation-delay: 0.34s; }
.hero .cta { animation-delay: 0.46s; }
@keyframes rise { to { opacity: 1; transform: none; } }
h1 .accent, h2 .accent {
  background: linear-gradient(90deg, var(--brand), #49b6ff, var(--brand)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 6s linear infinite;
}
@keyframes sheen { to { background-position: -200% 0; } }
.mac { perspective: 1600px; }
.mac .screen, .mac .base { transform: rotateX(var(--tilt, 14deg)) scale(var(--zoom, 0.94)); transform-origin: 50% 100%; transition: transform 0.12s linear; will-change: transform; }
.mac .base { transform: scale(var(--zoom, 0.94)); transform-origin: 50% 0; }
.mac .screen img { transition: opacity 0.35s ease; }
.mac .screen img.swap { opacity: 0; }
.floater {
  position: absolute; right: -10px; top: -150px; width: 210px; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 22px 26px rgba(27, 58, 143, 0.28));
  animation: bob 4.5s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
.tabs button { transition: background 0.2s, color 0.2s, transform 0.2s; }
.tabs button:hover { transform: translateY(-2px); }
.pill.blue { position: relative; overflow: hidden; }
.pill.blue::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.marquee { margin-top: 70px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee .track { display: flex; gap: 12px; width: max-content; animation: slide 38s linear infinite; }
.marquee span { padding: 9px 18px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
@keyframes slide { to { transform: translateX(-50%); } }

.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.shot.reveal { transform: translateY(40px) scale(0.96); }
.shot.reveal.in { transform: none; }
.card, .shot { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s, opacity 0.8s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(27, 58, 143, 0.12); }
.shot:hover { transform: translateY(-6px) scale(1.01); }
.tile { transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.card:hover .tile { transform: scale(1.12) rotate(-6deg); }
.bar i { transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.panel.in .bar i { transform: none; }
.panel.in .bar i:nth-child(2) { transition-delay: 0.1s; } .panel.in .bar i:nth-child(3) { transition-delay: 0.2s; }
.panel.in .bar i:nth-child(4) { transition-delay: 0.3s; } .panel.in .bar i:nth-child(5) { transition-delay: 0.4s; }
.panel.in .bar i:nth-child(6) { transition-delay: 0.5s; } .panel.in .bar i:nth-child(7) { transition-delay: 0.6s; }
.teaser img { animation: pan 18s ease-in-out infinite alternate; }
@keyframes pan { from { transform: scale(1.04) translateX(-1.5%); } to { transform: scale(1.1) translateX(1.5%); } }
details p { animation: rise 0.4s ease both; }

@media (max-width: 860px) { .floater { width: 120px; top: -84px; right: 6px; } .marquee { margin-top: 48px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero .chip, .hero h1 > span, .hero .lead, .hero .cta, .reveal { opacity: 1; transform: none; }
  .bar i { transform: none; }
  .mac .screen, .mac .base { transform: none; }
  h1 .accent, h2 .accent { color: var(--brand); background: none; }
}
