/* Cube Design · base común: estudio oscuro, latón, concreto y roble */
:root {
  color-scheme: dark;
  --bg: #0d1011;        /* estudio */
  --bg2: #161b1c;
  --bg3: #1d2324;
  --fg: #eceeec;
  --muted: #8f9b9c;
  --line: #262d2e;
  --acc: #e0a93b;       /* latón */
  --acc2: #f3c867;
  --paper: #f2f1ed;     /* lámina clara */
  --paper2: #e7e5df;
  --ink: #1d2324;
  --ink2: #5d6667;
  --concreto: #cfccc4;
  --roble: #b5824f;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); }
body { margin: 0; font: 400 16px/1.55 var(--display); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.gutter { padding-left: var(--gl); padding-right: var(--gr); }

/* Letras */
.eyebrow { font: 500 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ancha { font-weight: 800; font-variation-settings: "wdth" 125; letter-spacing: -.01em; }

/* Marca: C + firma CUBE / design */
.marca { width: 1em; height: 1em; flex: none; }
.wm { display: inline-flex; align-items: center; gap: .42em; line-height: 1; text-decoration: none; }
.wm .marca { width: 1.6em; height: 1.6em; }
.wm .nom { display: grid; gap: .22em; }
.wm .cube { font-weight: 800; font-variation-settings: "wdth" 125; letter-spacing: .06em; font-size: 1em; line-height: .86; }
.wm .design { font-weight: 500; font-size: .36em; letter-spacing: .42em; text-transform: uppercase; line-height: 1; padding-left: .08em; }

/* Barra de arriba de cada app */
.barra {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: max(10px, env(safe-area-inset-top, 0px)) var(--gr) 10px var(--gl);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.volver {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px;
  text-decoration: none; font: 600 14px/1 var(--display); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  transition: background .2s;
}
.volver:hover { background: rgba(255, 255, 255, .12); }
.volver svg { width: 18px; height: 18px; }
.barra .wm { font-size: 17px; margin-left: auto; }
.barra .app-nom { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Entrada de cada app (como si se abriera desde el inicio) */
@keyframes abrir { from { opacity: 0; transform: scale(.965); } to { opacity: 1; transform: none; } }
.entra { animation: abrir .45s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .entra { animation: none; } }

/* Barra de inicio abajo, como en el teléfono */
.home-bar {
  position: fixed; left: 50%; bottom: max(8px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30;
  width: 132px; height: 22px; display: grid; place-items: center; text-decoration: none;
}
.home-bar::before { content: ""; width: 120px; height: 5px; border-radius: 3px; background: currentColor; opacity: .5; transition: opacity .2s, width .2s; }
.home-bar:hover::before { opacity: .9; width: 128px; }
.home-bar span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
