/* Avivo public: light gallery.
   A 3D glass logo on a pale gallery floor, light frosted glass for everything else,
   one gold accent (the dot of the i), a spinning ring of logos,
   and the collection shown as a phone home screen. */

:root {
  --wall: #cdd0d5;
  --floor: #eceef0;
  --ink: #15171b;
  --soft: #4a4e57;
  --faint: #7b808a;
  --line: rgba(255, 255, 255, .9);
  --edge: rgba(21, 23, 27, .1);
  --gold: #c9a24a;
  --focus: #ffd400;
  --sans: 'IBM Plex Sans Hebrew', system-ui, sans-serif;
  --latin: 'Geist', 'IBM Plex Sans Hebrew', system-ui, sans-serif;
  --wrap: 560px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; background: var(--floor); }
body {
  margin: 0; min-height: 100svh; color: var(--ink);
  background: linear-gradient(180deg, var(--wall) 0, #e4e6e9 46svh, var(--floor) 70svh) no-repeat, var(--floor);
  font: 400 17px/1.55 var(--sans);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 12px; }
[lang="en"] { font-family: var(--latin); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Glass, light ---- */
.glass {
  background: linear-gradient(140deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .42));
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(21, 23, 27, .06), 0 18px 40px rgba(21, 23, 27, .1);
}

.pill {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: var(--ink); color: #fff;
  border-radius: 99px; padding: 8px 16px; font-weight: 700; font-size: 15px;
}
.pill--big { display: block; width: 100%; padding: 15px; font-size: 18px; }
.pill:active, .dock-btn:active { scale: .97; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: max(12px, env(safe-area-inset-top)); z-index: 5;
  width: min(var(--wrap), calc(100% - 28px)); margin: 12px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px; padding-inline-start: 18px; border-radius: 99px;
}
.nav-name { font-weight: 900; font-size: 19px; letter-spacing: -.04em; text-decoration: none; }

/* ---- Hero ---- */
.hero { text-align: center; padding-bottom: 24px; margin-top: -64px; }
.stage { position: relative; height: min(56svh, 520px); }
.stage canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 78%, transparent 100%);
}
.flat { position: absolute; left: 50%; top: 52%; width: min(78%, 460px); translate: -50% -50%; }
.stage.live .flat { display: none; }
.lede { width: min(var(--wrap), calc(100% - 32px)); margin: -30px auto 0; font-size: 19px; color: var(--soft); position: relative; }

/* The wheel of logos. main.js turns it and sets each logo's transform (the front one grows).
   The logos are drawn at full size and shrunk by --rest, so the front one stays sharp.
   --z is the radius, --size the full size, --rest the size of a logo that is not at the front. */
.orbit {
  position: relative; height: 240px; margin: 8px 0 0; perspective: 760px;
  overflow: hidden; overflow-x: clip; overflow-y: visible;   /* the side edges are cut; the front logo's shadow is not */
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.orbit.dragging { cursor: grabbing; }
.ring { --z: 150px; --size: 100px; --rest: .62; position: absolute; left: 50%; top: 38%; transform-style: preserve-3d; rotate: x -14deg; }
.ring button {
  position: absolute; width: var(--size); height: var(--size); margin: calc(var(--size) / -2);
  padding: calc(var(--size) * .065); border-radius: calc(var(--size) * .29); cursor: inherit;
  -webkit-tap-highlight-color: transparent;
  transform: rotateY(var(--a)) translateZ(var(--z)) scale(var(--rest));
}
.ring button:focus-visible { outline-width: 5px; outline-offset: 5px; }
.ring img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--size) * .23); pointer-events: none; -webkit-user-drag: none; }

/* The name and line of the logo at the front: every app has its own, stacked in one place,
   and main.js fades each in as its logo comes to the front */
.caption { display: grid; width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; min-height: 5.2em; pointer-events: none; }
.cap { grid-area: 1 / 1; opacity: 0; }
.cap-name { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.cap-line { margin: 6px auto 0; max-width: 30ch; font-size: 18px; line-height: 1.4; color: var(--soft); text-wrap: balance; }

/* ---- Section titles ---- */
.home, .deals { width: min(var(--wrap), calc(100% - 28px)); margin: 0 auto; padding: 56px 0 8px; }
.title { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.note { margin: 4px 0 18px; color: var(--faint); font-size: 15px; }

/* ---- The home screen ---- */
.screen { border-radius: 40px; padding: 14px 14px 12px; }
.status-bar { display: flex; justify-content: space-between; direction: ltr; padding: 2px 12px 12px; font-size: 13px; font-weight: 700; }
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.widget {
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  min-height: 112px; border-radius: 24px; padding: 14px; text-align: start;
}
.widget-num { font-weight: 900; font-size: 40px; line-height: 1; letter-spacing: -.05em; direction: ltr; }
.widget-num::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-inline-start: 4px; border-radius: 50%; background: var(--gold); vertical-align: top; }
.widget-label { font-size: 13px; color: var(--soft); margin-top: 4px; }
.lab-btn { cursor: pointer; }
.folder { display: grid; grid-template-columns: repeat(3, 16px); gap: 5px; margin-bottom: auto; }
.folder i { width: 16px; height: 16px; border-radius: 5px; background: rgba(21, 23, 27, .12); }

.icons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; padding: 0 2px 20px; }
.icon {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 11.5px; line-height: 1.2; color: var(--ink);
}
.icon img { width: min(64px, 100%); height: auto; aspect-ratio: 1; border-radius: 16px; box-shadow: 0 6px 16px rgba(21, 23, 27, .18); transition: scale .15s; }
.icon:active img { scale: .9; }
.icon-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  position: absolute; top: -6px; left: calc(50% - 40px);
  background: var(--ink); color: #fff; border-radius: 99px; padding: 1px 6px;
  font-size: 10px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.badge--review { background: var(--gold); color: var(--ink); }

.dock { border-radius: 30px; padding: 8px; }
.dock-btn {
  display: block; text-align: center; text-decoration: none; font-weight: 700; font-size: 17px;
  padding: 14px; border-radius: 22px; background: var(--ink); color: #fff;
}

/* ---- The sheet ---- */
.sheet {
  width: min(var(--wrap), 100%); max-width: none; max-height: 86svh;
  margin: auto auto 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  border: 1px solid var(--line); border-bottom: 0; border-radius: 34px 34px 0 0;
  color: var(--ink);
  background: linear-gradient(160deg, rgba(255, 255, 255, .86), rgba(236, 238, 240, .8));
  -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
  box-shadow: inset 0 1px 0 #fff, 0 -10px 40px rgba(21, 23, 27, .12);
}
.sheet[open] { animation: rise .32s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes rise { from { translate: 0 100%; } }
.sheet::backdrop { background: rgba(205, 208, 213, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#sheet-body:focus { outline: none; }
.sheet-close {
  position: absolute; top: 14px; inset-inline-end: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--edge); background: rgba(255, 255, 255, .7); font-size: 22px; line-height: 1; cursor: pointer;
}
.sheet-logo { width: 104px; height: 104px; border-radius: 26px; margin: 0 auto 14px; box-shadow: 0 12px 30px rgba(21, 23, 27, .22); }
.sheet-name { margin: 0; text-align: center; font-size: 28px; font-weight: 700; line-height: 1.2; }
.sheet-status { display: table; margin: 8px auto 0; padding: 2px 12px; border-radius: 99px; border: 1px solid var(--edge); font-size: 13px; color: var(--soft); }
.sheet-teaser { margin: 14px auto 20px; max-width: 28ch; text-align: center; font-size: 18px; }
.sheet-links { display: grid; gap: 10px; }
.sheet-links a { display: block; text-align: center; text-decoration: none; padding: 13px; border-radius: 18px; font-weight: 700; }
.sheet-links .primary { background: var(--ink); color: #fff; }
.sheet-links .secondary { border: 1px solid var(--edge); background: rgba(255, 255, 255, .7); }
.sheet-links .talk { color: var(--soft); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.lab-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 20px; }
.lab-tile {
  aspect-ratio: 1; border-radius: 16px; border: 1px solid var(--line); cursor: pointer;
  background: linear-gradient(140deg, rgba(255, 255, 255, .9), rgba(205, 208, 213, .6));
  box-shadow: 0 4px 12px rgba(21, 23, 27, .08);
  display: grid; place-items: center; font-size: 11px; color: transparent;
}
.lab-tile.nope { animation: nope .5s; color: var(--ink); }
@keyframes nope { 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }

/* ---- Deals ---- */
.deal-form { border-radius: 32px; padding: 18px; }
.kinds { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind {
  position: relative; display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  padding: 14px; border-radius: 22px; border: 1px solid var(--edge); background: rgba(255, 255, 255, .55);
  transition: background .2s, color .2s;
}
.kind input { position: absolute; opacity: 0; }
.kind-word { font-weight: 700; font-size: 18px; }
.kind-note { font-size: 13px; line-height: 1.35; color: var(--soft); }
.kind:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.kind:has(input:checked) .kind-note { color: rgba(255, 255, 255, .72); }
.kind:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }

.fields { display: grid; gap: 14px; margin-top: 18px; }
.fields[data-closed] { display: none; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 15px; font-weight: 500; }
.optional { color: var(--faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  background: rgba(255, 255, 255, .75); border: 1px solid var(--edge); border-radius: 16px; padding: 12px 14px;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-inline-start: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2315171b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.form-status:empty { display: none; }
.form-status { margin: 0; color: #a3261b; font-weight: 500; }
.privacy { margin: 0; font-size: 13px; color: var(--faint); }
.sent { border-radius: 32px; padding: 32px 22px; text-align: center; }
.sent-title { margin: 0; font-size: 40px; font-weight: 700; }

.footer { padding: 56px 0 40px; text-align: center; color: var(--faint); font-size: 14px; }

@media (min-width: 700px) {
  .orbit { height: 350px; }
  .ring { --z: 210px; --size: 120px; --rest: .63; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet[open] { animation: none; }
}
