/* AnyDroid — homepage and 404 styles */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --ink: #202124;
  --muted: #5f6368;
  --line: #e6e8eb;
  --green: #39d982;
  --green-deep: #22b269;
  --green-ink: #127a45;
  --green-soft: #eafbf1;
  --green-ring: #c9f2da;
  --header-bg: rgba(255, 255, 255, .82);
  --btn-dark-bg: #202124;
  --btn-dark-ink: #ffffff;
  --icon-ring: #ffffff;
  --shadow: 0 1px 2px rgba(32, 33, 36, .06), 0 8px 24px rgba(32, 33, 36, .08);

  --lavender: #f4f2fc; --lavender-ring: #e8e3f8;
  --blue: #edf0fc;     --blue-ring: #dce2f8;
  --pink: #fff3f6;     --pink-ring: #f5d3de;
  --yellow: #fffae8;   --yellow-ring: #f8e8ad;
  --mint: #f0f9f7;     --mint-ring: #d8eeeb;

  --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, sans-serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: 40px;
  --radius: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #191d23;
    --ink: #eef0f3;
    --muted: #a4abb6;
    --line: #2a2f38;
    --green-ink: #5fe39b;
    --green-soft: #15261d;
    --green-ring: #1e3a2a;
    --header-bg: rgba(20, 23, 28, .82);
    --btn-dark-bg: #eef0f3;
    --btn-dark-ink: #14171c;
    --icon-ring: #232831;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);

    --lavender: #1e1c2b; --lavender-ring: #2b2741;
    --blue: #1a2031;     --blue-ring: #252e48;
    --pink: #261b21;     --pink-ring: #3a2530;
    --yellow: #24211a;   --yellow-ring: #3a3322;
    --mint: #16231f;     --mint-ring: #20372f;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--green-ink);
  outline-offset: 3px;
  border-radius: 12px;
}

.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.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: fixed;
  left: 16px; top: 12px;
  z-index: 50;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--green); color: #202124; }
.btn-primary:hover { background: #4ee391; }

.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--bg); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-dark { background: var(--btn-dark-bg); color: var(--btn-dark-ink); min-height: 48px; padding: 0 22px; font-size: 16px; }

.btn-large { min-height: 60px; padding: 0 30px; font-size: 19px; }

.text-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1px;
}
.text-link:hover { color: var(--ink); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav .nav-play {
  margin-left: 6px;
  color: var(--ink);
  border: 2px solid var(--line);
}
.nav .nav-play:hover { border-color: var(--ink); background: transparent; }
.arrow { margin-left: 6px; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-blobs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.hero-blobs path, .hero-blobs circle:not(.dot) { stroke-width: 26; stroke-linejoin: round; }
.blob-lavender { fill: var(--lavender); stroke: var(--lavender-ring); }
.blob-blue     { fill: var(--blue);     stroke: var(--blue-ring); }
.blob-pink     { fill: var(--pink);     stroke: var(--pink-ring); }
.blob-yellow   { fill: var(--yellow);   stroke: var(--yellow-ring); }
.blob-mint     { fill: var(--mint);     stroke: var(--mint-ring); }
.dot-yellow   { fill: var(--yellow-ring); }
.dot-blue     { fill: var(--blue-ring); }
.dot-mint     { fill: var(--mint-ring); }
.dot-pink     { fill: var(--pink-ring); }
.dot-lavender { fill: var(--lavender-ring); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: 48px;
  min-height: min(720px, calc(100svh - 76px));
  padding-block: 72px 96px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(56px, 8.2vw, 112px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.04em;
}

.lede {
  max-width: 30em;
  margin-top: 26px;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.hero-art {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1;
  justify-self: center;
}

.droid {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  filter: drop-shadow(0 24px 40px rgba(34, 178, 105, .28));
}
.droid-look { transition: transform .25s ease-out; }
.droid-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 5.5s infinite;
}
@keyframes blink {
  0%, 94%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(.1); }
}

/* App icons orbit the robot slowly; each chip counter-rotates so it stays upright */
.orbit { position: absolute; inset: 0; animation: spin 150s linear infinite; }
.orbit li {
  position: absolute;
  width: 0;
  height: 0;
  display: grid;
  place-items: center;
}
.orbit-1 { left: 25%;   top: 6.7%; }
.orbit-2 { left: 88.3%; top: 17.9%; }
.orbit-3 { left: 6.7%;  top: 75%; }
.orbit-4 { left: 82.1%; top: 88.3%; }
.orbit a { display: block; width: max-content; transition: transform .25s cubic-bezier(.2, .9, .3, 1); }
.orbit a:hover { transform: scale(1.1); }
.orbit-chip {
  display: block;
  padding: 6px;
  border-radius: 24px;
  background: var(--icon-ring);
  box-shadow: var(--shadow);
  animation: spin 150s linear infinite reverse;
}
.orbit img {
  width: clamp(48px, 5vw, 64px);
  max-width: none; /* the li is 0 wide on purpose, so don't let max-width:100% collapse the icon */
  height: auto;
  border-radius: 18px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Apps */
.apps { padding-block: 104px 56px; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}
.section-head h2, .support h2 {
  font-family: var(--display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.035em;
}
.section-head p { max-width: 22em; color: var(--muted); font-size: 18px; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.app {
  --tone: var(--surface);
  --tone-ring: var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--tone);
}
.app::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -110px;
  right: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 30px solid var(--tone-ring);
  transition: transform .5s ease;
}
.app:hover::after { transform: scale(1.08); }

.tone-lavender { --tone: var(--lavender); --tone-ring: var(--lavender-ring); }
.tone-mint     { --tone: var(--mint);     --tone-ring: var(--mint-ring); }
.tone-blue     { --tone: var(--blue);     --tone-ring: var(--blue-ring); }
.tone-yellow   { --tone: var(--yellow);   --tone-ring: var(--yellow-ring); }

.app-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 118px;
  margin-bottom: 24px;
  padding-right: 184px;
}
.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.app-tag {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.app h3 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.app-desc { margin-top: 12px; color: var(--muted); }

/* "Original" mark next to the app name, styled like a verified seal */
.app-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1;
}
.app-badge svg { flex: none; }
.app-badge .seal { fill: var(--green-deep); }
.app-badge .seal-check {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-claim {
  margin-top: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.app-features {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  font-weight: 600;
  font-size: 16px;
}
.app-features li {
  position: relative;
  padding-left: 34px;
}
/* Green check: circle plus a rotated corner (no image, so CSP stays strict) */
.app-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(50% - 11px);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
}
.app-features li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: calc(50% - 7px);
  width: 6px;
  height: 11px;
  border: solid #202124;
  border-width: 0 2.4px 2.4px 0;
  border-radius: 1px;
  transform: rotate(45deg);
}

.app-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: auto;
  padding-top: 32px;
}

/* Support */
.support { padding-block: 56px 112px; }
.support-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px 48px;
  padding: 56px;
  border-radius: var(--radius);
  background: var(--green-soft);
}
.support-card::before, .support-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 30px solid var(--green-ring);
}
.support-card::before { width: 260px; height: 260px; left: -120px; bottom: -150px; }
.support-card::after  { width: 180px; height: 180px; right: 22%; top: -120px; }
.support-copy p {
  max-width: 34em;
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr .7fr;
  gap: 40px;
  padding-block: 56px 40px;
}
.footer-brand p { margin-top: 12px; font-family: var(--display); font-weight: 700; font-size: 18px; }
.footer-brand .footer-small {
  max-width: 24em;
  margin-top: 6px;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  color: var(--muted);
}
.footer-links h2 {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.footer-links ul { display: grid; gap: 6px; }
.footer-links a {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-base {
  padding-block: 20px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.footer-legal {
  max-width: 72ch;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  opacity: .85;
}
.footer-legal a { color: inherit; }

/* FAQ (homepage and app pages) */
.faq-section { padding-block: 24px 64px; }
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr);
  gap: 32px 64px;
  align-items: start;
}
.faq-layout h2 {
  font-family: var(--display);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.035em;
}
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p {
  max-width: 64ch;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.7;
}

/* 404 */
.error-page {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.error-card {
  max-width: 520px;
  text-align: center;
}
.error-card .droid-404 {
  width: 120px;
  margin: 0 auto 28px;
}
.error-card h1 {
  font-family: var(--display);
  font-size: clamp(40px, 8vw, 56px);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.error-card p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.error-card .btn { margin-top: 32px; }

/* Responsive */
@media (max-width: 960px) {
  .faq-layout { grid-template-columns: 1fr; gap: 20px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
    padding-block: 56px 72px;
  }
  .hero-art { width: min(80%, 380px); order: -1; }
  .app-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .support-card { flex-direction: column; align-items: start; padding: 44px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; --radius: 26px; }
  body { font-size: 16px; }
  .header-inner { height: 64px; }
  html { scroll-padding-top: 76px; }
  .brand { font-size: 20px; }
  .brand img { width: 30px; height: 30px; }
  .nav a:not(.nav-play) { display: none; }
  .nav .nav-play { padding: 8px 14px; font-size: 15px; }
  .hero-inner { padding-block: 32px 56px; }
  .hero-art { width: min(68%, 250px); }
  .hero-actions .btn { width: 100%; }
  .apps { padding-block: 72px 32px; }
  .app { padding: 26px; }
  .app::after { width: 200px; height: 200px; top: -90px; right: -90px; border-width: 24px; }
  .app h3 { font-size: 28px; }
  .app-icon { width: 60px; height: 60px; border-radius: 17px; }
  .app-actions .btn { width: 100%; }
  .support { padding-block: 32px 72px; }
  .support-card { padding: 30px 24px; }
  .support-card .btn { width: 100%; font-size: 17px; padding: 0 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .app-top { min-height: 84px; padding-right: 126px; }
  .app-scene { width: 114px; height: 80px; }
}

/* ---------- Motion ---------- */
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pop {
  0%   { opacity: 0; transform: scale(.7); }
  70%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}
@keyframes wiggle-l {
  0%, 14%, 100% { transform: rotate(0); }
  4%  { transform: rotate(-10deg); }
  9%  { transform: rotate(6deg); }
}
@keyframes wiggle-r {
  0%, 14%, 100% { transform: rotate(0); }
  4%  { transform: rotate(10deg); }
  9%  { transform: rotate(-6deg); }
}
@keyframes happy {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-6%) scale(1.04); }
  60%  { transform: translateY(0) scale(1); }
  80%  { transform: translateY(-2%); }
  100% { transform: none; }
}

/* Hero: text rises line by line, art pops in, icons follow */
.hero-blobs { animation: fade 1.2s ease-out both; }
.hero-copy > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .15s; }
.hero-copy > :nth-child(3) { animation-delay: .28s; }
.hero-copy > :nth-child(4) { animation-delay: .4s; }
.hero-art { animation: pop .9s cubic-bezier(.2, .9, .3, 1) .2s backwards; }
.orbit img { animation: pop .6s cubic-bezier(.2, .9, .3, 1) backwards; }
.orbit-1 img { animation-delay: .6s; }
.orbit-2 img { animation-delay: .7s; }
.orbit-3 img { animation-delay: .8s; }
.orbit-4 img { animation-delay: .9s; }

/* Robot: breathes, smiles on hover or tap; antennae twitch only while it glances around */
.droid { animation: breathe 6s ease-in-out 1.2s infinite; cursor: pointer; overflow: visible; }
.droid-body {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .35s cubic-bezier(.2, .9, .3, 1);
}
.hero-art:hover .droid-body { transform: scale(1.04); }
.droid.is-happy .droid-body { animation: happy .9s cubic-bezier(.3, 1.2, .4, 1); }
.droid-mouth, .droid-smile { transition: opacity .2s ease; }
.droid-smile { opacity: 0; }
.hero-art:hover .droid-mouth, .droid.is-happy .droid-mouth { opacity: 0; }
.hero-art:hover .droid-smile, .droid.is-happy .droid-smile { opacity: 1; }
.droid-antenna { transform-box: fill-box; }
.droid-antenna-l { transform-origin: 100% 100%; }
.droid-antenna-r { transform-origin: 0% 100%; }
.droid.is-idle .droid-antenna-l { animation: wiggle-l 7s ease-in-out infinite; }
.droid.is-idle .droid-antenna-r { animation: wiggle-r 7s ease-in-out .15s infinite; }

/* Sections rise into view while scrolling (site.js adds .is-visible) */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.app-grid .app:nth-child(2) { transition-delay: .1s; }
.app-grid .app:nth-child(3) { transition-delay: .2s; }
.app-grid .app:nth-child(4) { transition-delay: .3s; }
.js .reveal .app-features li::before { transform: scale(0); transition: transform .45s cubic-bezier(.2, .9, .3, 1); }
.js .reveal.is-visible .app-features li::before { transform: scale(1); }
.app-features li:nth-child(1)::before { transition-delay: .35s; }
.app-features li:nth-child(2)::before { transition-delay: .45s; }
.app-features li:nth-child(3)::before { transition-delay: .55s; }

/* Hover details */
.app-icon { transition: transform .4s cubic-bezier(.2, .9, .3, 1); }
.app:hover .app-icon { transform: translateY(-4px) rotate(-5deg) scale(1.06); }
.btn > span:last-child { display: inline-block; transition: transform .25s ease; }
.btn:hover > span:last-child { transform: translate(2px, -2px); }
.hero-actions .btn-primary:hover > span:last-child { transform: translateY(3px); }
.nav-play .arrow { display: inline-block; transition: transform .25s ease; }
.nav-play:hover .arrow { transform: translate(2px, -2px); }
.brand img { transition: transform .35s cubic-bezier(.2, .9, .3, 1); }
.brand:hover img { transform: rotate(-12deg) scale(1.1); }

/* Robot glances around on its own while the pointer is idle (site.js toggles .is-idle) */
.droid.is-idle .droid-look { animation: glance 7s ease-in-out infinite; }
@keyframes glance {
  0%, 12%, 100% { transform: translate(0, 0); }
  20%, 32%      { transform: translate(-28px, 4px); }
  44%, 56%      { transform: translate(26px, -6px); }
  68%, 78%      { transform: translate(4px, 12px); }
}

/* Small looping scenes in each app card */
.app-scene {
  position: absolute;
  top: 0;
  right: 0;
  width: 168px;
  height: 118px;
  overflow: visible;
  pointer-events: none;
}
.app-scene g, .app-scene circle, .app-scene rect { transform-box: fill-box; transform-origin: center; }

/* S Pen Pro: an S Pen taps, draws a gesture, and "Notes" opens */
.scene-track { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 7; opacity: .16; }
.scene-ink-glow, .scene-draw {
  fill: none;
  stroke: var(--green-deep);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw 5s linear infinite;
}
.scene-ink-glow { stroke-width: 10; opacity: .16; }
.scene-draw { stroke-width: 3.6; }
@keyframes draw {
  0%, 8% { stroke-dashoffset: 100; opacity: 1; }
  70%    { stroke-dashoffset: 0;   opacity: 1; }
  92%    { stroke-dashoffset: 0;   opacity: 1; }
  100%   { stroke-dashoffset: 0;   opacity: 0; }
}
.scene-tap { fill: none; stroke: var(--green-deep); stroke-width: 2; opacity: 0; animation: tap 5s ease-out infinite; }
@keyframes tap {
  0%   { transform: scale(.4); opacity: .9; }
  14%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.scene-stylus { filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .25)); animation: fade-end 5s linear infinite; }
@keyframes fade-end {
  0%, 92% { opacity: 1; }
  100%    { opacity: 0; }
}
.stylus-body, .stylus-cap { fill: var(--ink); }
.stylus-tip { fill: var(--muted); }
.stylus-shine { fill: #fff; opacity: .35; }
.stylus-button { fill: var(--green-deep); }
/* The result chip is a white toast in both color schemes so it always reads against the card */
.scene-result { opacity: 0; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .22)); animation: result 5s cubic-bezier(.2, .9, .3, 1) infinite; }
.scene-result > rect:first-child { fill: #ffffff; }
.scene-result .result-icon { fill: var(--green-deep); }
.scene-result text { font: 700 8.5px var(--display); fill: #202124; }
@keyframes result {
  0%, 70% { opacity: 0; transform: translateY(6px) scale(.9); }
  76%, 92% { opacity: 1; transform: translateY(0) scale(1); }
  100%     { opacity: 0; transform: translateY(0) scale(1); }
}

/* Floating Widgets: widgets hover over a page */
.scene-lines rect { fill: var(--ink); opacity: .08; }
.wg { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .14)); animation: hover-float 4s ease-in-out infinite; }
.wg-2 { animation-delay: -1.3s; }
.wg-3 { animation-delay: -2.6s; }
.wg-1 > rect:first-child { fill: var(--green-deep); }
.wg-1 .wg-text { fill: #fff; opacity: .9; }
.wg-2 > rect:first-child { fill: var(--icon-ring); }
.wg-2 .wg-text { fill: var(--ink); opacity: .5; }
.wg-3 > rect:first-child { fill: var(--ink); }
.wg-3 .wg-text { fill: var(--bg); opacity: .7; }
@keyframes hover-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* Assistive Touch: a tap ripples and shortcuts fan out */
.touch-core { fill: var(--icon-ring); stroke: var(--ink); stroke-width: 3; }
.touch-inner { fill: var(--ink); }
.ripple { fill: none; stroke: var(--green-deep); stroke-width: 3; animation: ripple 2.6s ease-out infinite; }
.ripple.r2 { animation-delay: 1.3s; }
@keyframes ripple {
  0%   { transform: scale(1);   opacity: .7; }
  100% { transform: scale(2.6); opacity: 0; }
}
.act { opacity: 0; }
.act circle { fill: var(--green-deep); }
.act path { fill: none; stroke: #202124; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.act-1 { animation: act-1 5.2s ease-in-out infinite; }
.act-2 { animation: act-2 5.2s ease-in-out .15s infinite; }
.act-3 { animation: act-3 5.2s ease-in-out .3s infinite; }
@keyframes act-1 {
  0%, 12%   { transform: translate(0, 0);         opacity: 0; }
  24%, 66%  { transform: translate(-36px, -26px); opacity: 1; }
  80%, 100% { transform: translate(0, 0);         opacity: 0; }
}
@keyframes act-2 {
  0%, 12%   { transform: translate(0, 0);        opacity: 0; }
  24%, 66%  { transform: translate(36px, -26px); opacity: 1; }
  80%, 100% { transform: translate(0, 0);        opacity: 0; }
}
@keyframes act-3 {
  0%, 12%   { transform: translate(0, 0);    opacity: 0; }
  24%, 66%  { transform: translate(0, 40px); opacity: 1; }
  80%, 100% { transform: translate(0, 0);    opacity: 0; }
}

/* Quick Settings Tile: tiles switch on one after another */
.tile-bg { fill: var(--icon-ring); }
.tile-on { fill: var(--green-deep); animation: tile 6s steps(1, end) infinite; }
.t2 .tile-on { animation-delay: -4.5s; }
.t3 .tile-on { animation-delay: -3s; }
.t4 .tile-on { animation-delay: -1.5s; }
.tile-label { fill: var(--ink); opacity: .55; }
@keyframes tile {
  0%   { opacity: 1; }
  25%  { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal .app-features li::before { transform: none; }
}
