/* Nexus Launcher website — the playful layer.
   Nexus Island, page dots and the small motions that make the site feel like
   a home screen rather than a brochure. All of it is decoration: nothing here
   carries meaning that is not also in the markup. */

/* ---------- Nexus Island ----------
   The live pill that sits at the top of the launcher's screen. Here it shows
   a playing track, which is exactly what the real Island does. */

.island {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem 0.45rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: var(--pill);
  background: rgb(2 4 8 / 94%);
  box-shadow: 0 0.8rem 1.8rem rgb(0 0 0 / 50%), inset 0 1px 0 rgb(255 255 255 / 10%);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
}

.island-glyph {
  display: grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  flex: none;
  padding-inline: 0.28rem;
  border-radius: var(--pill);
  background: color-mix(in srgb, var(--ink) 16%, transparent);
  color: var(--cyan-400);
  font-size: 0.62rem;
}

.island-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 0.85rem;
}

.island-bars i {
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan-400), var(--cyan-300));
  transform-origin: bottom;
  animation: island-bar 1.25s ease-in-out infinite;
}

.island-bars i:nth-child(2) { animation-delay: 0.16s; }
.island-bars i:nth-child(3) { animation-delay: 0.32s; }
.island-bars i:nth-child(4) { animation-delay: 0.48s; }

@keyframes island-bar {
  0%, 100% { transform: scaleY(0.32); }
  50% { transform: scaleY(1); }
}

/* ---------- page dots ----------
   The row of dots under a home screen, reused under the hero preview and as a
   section divider. */

.pagedots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
}

.pagedots button {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--pill);
  background: transparent;
  cursor: pointer;
}

.pagedots button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 24%);
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, background 0.2s ease;
}

.pagedots button[aria-pressed="true"]::before {
  width: 1.05rem;
  border-radius: var(--pill);
  background: var(--cyan-400);
  box-shadow: 0 0 0.6rem color-mix(in srgb, var(--ink) 60%, transparent);
}

.pagedots-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.15rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- tilts and float ---------- */

.tilt-l { --tilt: -2.4deg; }
.tilt-r { --tilt: 2.2deg; }

.float-slow { animation: float-slow 7s ease-in-out infinite; }

@keyframes float-slow {
  0%, 100% { transform: rotate(var(--tilt, 0deg)) translateY(0); }
  50% { transform: rotate(var(--tilt, 0deg)) translateY(-0.45rem); }
}

/* ---------- section divider ---------- */

.dots-divider {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(100% - (var(--gutter) * 2), var(--page));
  margin: clamp(2rem, 5vw, 3.4rem) auto;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.dots-divider span { margin-inline: 0.35rem; }

.dots-divider::before,
.dots-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.dots-divider i {
  width: 0.26rem;
  height: 0.26rem;
  border-radius: 50%;
  background: rgb(255 255 255 / 30%);
}

/* the divider is the launcher's page indicator: one current-page pill and the
   two dots either side of it */
.dots-divider i:first-of-type {
  width: 1.05rem;
  border-radius: var(--pill);
  background: var(--cyan-400);
  box-shadow: 0 0 0.55rem color-mix(in srgb, var(--ink) 55%, transparent);
}

/* ---------- UI style ----------
   Default is the base stylesheet. The other three restyle the same surfaces
   the launcher restyles: glass, dock, widgets and the bar. */

.style-kicker {
  margin: 1.35rem 0 0.45rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.style-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.style-switch button {
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--glass);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.style-switch button[aria-checked="true"] {
  border-color: color-mix(in srgb, var(--ink) 45%, transparent);
  background: color-mix(in srgb, var(--ink) 14%, transparent);
  color: var(--ink);
}

html[data-ui="frosted"] .nav {
  background: color-mix(in srgb, var(--bg) 42%, transparent);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
}

html[data-ui="frosted"] .widget,
html[data-ui="frosted"] .dock,
html[data-ui="frosted"] .settings-widget,
html[data-ui="frosted"] .mini-widget,
html[data-ui="frosted"] .cell,
html[data-ui="frosted"] .icon-row,
html[data-ui="frosted"] .setup-card,
html[data-ui="frosted"] .stat,
html[data-ui="frosted"] .capability,
html[data-ui="frosted"] .cta,
html[data-ui="frosted"] .privacy-strip,
html[data-ui="frosted"] .card,
html[data-ui="frosted"] .contact-card,
html[data-ui="frosted"] .nexus-form,
html[data-ui="frosted"] .toc,
html[data-ui="frosted"] .look-card {
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  border-color: color-mix(in srgb, var(--ink) 16%, transparent);
  backdrop-filter: blur(28px) saturate(130%);
  -webkit-backdrop-filter: blur(28px) saturate(130%);
}

html[data-ui="neumorph"] .nav {
  background: var(--bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--ink) 8%, transparent);
}

html[data-ui="neumorph"] .widget,
html[data-ui="neumorph"] .dock,
html[data-ui="neumorph"] .settings-widget,
html[data-ui="neumorph"] .mini-widget,
html[data-ui="neumorph"] .cell,
html[data-ui="neumorph"] .icon-row,
html[data-ui="neumorph"] .setup-card,
html[data-ui="neumorph"] .stat,
html[data-ui="neumorph"] .capability,
html[data-ui="neumorph"] .cta,
html[data-ui="neumorph"] .look-card {
  border-color: transparent;
  background: var(--surface);
  box-shadow:
    0.4rem 0.45rem 1rem rgb(0 0 0 / 42%),
    -0.3rem -0.3rem 0.8rem rgb(255 255 255 / 5%);
}

html[data-ui="liquid"] .nav {
  background: color-mix(in srgb, var(--surface) 16%, transparent);
  backdrop-filter: blur(4px) saturate(240%) contrast(1.2);
  -webkit-backdrop-filter: blur(4px) saturate(240%) contrast(1.2);
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--ink) 46%, transparent);
}

html[data-ui="liquid"] :is(
  .widget, .dock, .settings-widget, .mini-widget, .cell, .icon-row,
  .setup-card, .cta, .privacy-strip, .card, .contact-card, .nexus-form, .toc, .stat, .look-card
) {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--ink) 52%, transparent);
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--ink) 34%, transparent), transparent 36%, color-mix(in srgb, var(--ink) 8%, transparent)),
    color-mix(in srgb, var(--surface) 12%, transparent);
  backdrop-filter: blur(3px) saturate(280%) contrast(1.22);
  -webkit-backdrop-filter: blur(3px) saturate(280%) contrast(1.22);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--ink) 70%, transparent),
    inset 0 -22px 32px color-mix(in srgb, var(--ink) 16%, transparent);
}

/* The sheet is outside the nav so its cards can blur the page. The frame
   itself stays clear; a frosted frame here would hide the cards' own glass. */
html[data-ui="frosted"] .look-panel,
html[data-ui="liquid"] .look-panel,
html[data-ui="neumorph"] .look-panel {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html[data-ui="liquid"] :is(.widget, .cell, .dock, .card, .cta, .settings-widget, .stat, .contact-card, .look-card)::after {
  content: "";
  position: absolute;
  inset: -30%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, color-mix(in srgb, var(--ink) 42%, transparent) 48%, transparent 66%);
  background-size: 240% 100%;
  animation: liquid-sheen 2.8s ease-in-out infinite;
}

@keyframes liquid-sheen {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

.hero-widget.is-fading .widget-media img { opacity: 0.45; }

.hero-widget .widget-media img { transition: opacity 0.16s ease; }

.island.is-swap { animation: island-swap 0.32s ease; }

@keyframes island-swap {
  from { opacity: 0.35; transform: translateY(0.2rem); }
  to { opacity: 1; transform: none; }
}

.is-launched { animation: app-open 0.4s ease; }

@keyframes app-open {
  from { transform: scale(0.985); }
  to { transform: none; }
}

.shot-enlarge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 99rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.shot { position: relative; }

.shot-lightbox {
  display: none;
  place-items: center;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: color-mix(in srgb, var(--bg) 88%, black);
  color: var(--ink);
}

.shot-lightbox[open] { display: grid; }

.shot-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  margin: auto;
}

.shot-lightbox .shot-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 99rem;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.shot-lightbox::backdrop { background: transparent; }
